Occurs when a workflow instance is about to be created, It gives
possibilities to pass in start arguments to instance
Namespace:
EPiServer.WorkflowFoundationAssembly: EPiServer.WorkflowFoundation (in EPiServer.WorkflowFoundation.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
public event EventHandler<StartInstanceEventArgs> InstanceStarting |
Implements
IInstanceHandler..::.InstanceStarting
Examples
Shows how event can be used to pass start parameters to workflow instance
CopyC#
//Add a startparamter TimeLimit when instance is starting WorkflowSystem.InstanceHandler.InstanceStarting += delegate(object sender, StartInstanceEventArgs e) { if (e.WorkflowDefinition.Type == typeof(CodeSamples.WorkflowFoundation.Attributes.CustomWorkflow)) { e.NamedValueArgs.Add("TimeLimit", new TimeSpan(2,0,0)); } };