Cora Knowledge Center


Assign Values to Workflow Parameters

Use the API to assign values to workflow parameters when the workflow is executed.

using System;
using System.Collections.Generic;
using PNMsoft.Sequence;
using PNMsoft.Sequence.Runtime;
namespace SequenceEx.Samples
 public class StartingWorkflowSample
 public WorkflowInstance StartWorkflowInstance()
 Guid workflowId = Guid.Empty; //assign a valid workflow ID.
 Dictionary<string, object> variables = new Dictionary<string,object>();
 variables["var1"] = "var value";
 variables["var2"] = 1;
 IWorkflowExecutionService svc = WorkflowRuntime.Engine.GetService<IWorkflowExecutionService>();
 return svc.StartWorkflow(workflowId, variables);