/// <summary>
 /// creates a new <see cref="SuspendState"/>
 /// </summary>
 /// <param name="workflow">suspended workflow</param>
 /// <param name="node">suspended node</param>
 /// <param name="variables">variables of executing workflow</param>
 /// <param name="language">default language of workflow</param>
 /// <param name="profiling">determines whether profiling is enabled</param>
 /// <param name="subflow">suspended sub workflow (optional)</param>
 public SuspendState(WorkflowIdentifier workflow, IInstanceNode node, StateVariableProvider variables, ScriptLanguage?language, bool profiling, SuspendState subflow = null)
 {
     Variables = variables;
     Node      = node;
     Subflow   = subflow;
     Language  = language;
     Profiling = profiling;
     Workflow  = workflow;
 }
 /// <summary>
 /// creates a new <see cref="WorkflowInstanceState"/>
 /// </summary>
 /// <param name="workflow">currently executing workflow</param>
 /// <param name="logger">access to logging</param>
 /// <param name="variables">workflow state variables</param>
 /// <param name="workflowprovider">provides workflows by name</param>
 /// <param name="workflowexecutor">executor for workflows</param>
 /// <param name="language">default language used for code execution</param>
 /// <param name="profiling">determines whether to profile performance</param>
 public WorkflowInstanceState(WorkflowIdentifier workflow, WorkableLogger logger, StateVariableProvider variables, Func <string, Task <WorkflowInstance> > workflowprovider, IWorkflowExecutionService workflowexecutor, ScriptLanguage?language, bool profiling)
 {
     this.workflowprovider = workflowprovider;
     Logger           = logger;
     Variables        = variables;
     WorkflowExecutor = workflowexecutor;
     Language         = language;
     Profiling        = profiling;
     Workflow         = workflow;
 }