Skip to main content

Interface IWorkflowActionProvider

Interface of a action provider, which provide execution of actions specified in activities ActivityDefinition.Implementation and ActivityDefinition.PreExecutionImplementation and execution of conditions ConditionDefinition.Action

Namespace: OptimaJet.Workflow.Core.Runtime

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public interface IWorkflowActionProvider

Methods

ExecuteAction(string, ProcessInstance, WorkflowRuntime, string)

Execute action

Declaration
void ExecuteAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter)
Parameters
TypeNameDescription
stringnameName of the action to execute
ProcessInstanceprocessInstanceReference to ProcessInstance from which action is executed <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref>
WorkflowRuntimeruntimeReference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref>
stringactionParameterAdditional action parameter <xref href="OptimaJet.Workflow.Core.Model.ActionDefinitionReference.ActionParameter" data-throw-if-not-resolved="false"></xref>

ExecuteActionAsync(string, ProcessInstance, WorkflowRuntime, string, CancellationToken)

Execute action asynchronously

Declaration
Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)
Parameters
TypeNameDescription
stringnameName of the action to execute
ProcessInstanceprocessInstanceReference to ProcessInstance from which action is executed <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref>
WorkflowRuntimeruntimeReference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref>
stringactionParameterAdditional action parameter <xref href="OptimaJet.Workflow.Core.Model.ActionDefinitionReference.ActionParameter" data-throw-if-not-resolved="false"></xref>
CancellationTokentokenCancellation token
Returns
TypeDescription
Task

ExecuteCondition(string, ProcessInstance, WorkflowRuntime, string)

Check condition

Declaration
bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter)
Parameters
TypeNameDescription
stringnameName of the condition to check
ProcessInstanceprocessInstanceReference to ProcessInstance from which condition is checked <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref>
WorkflowRuntimeruntimeReference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref>
stringactionParameterAdditional action parameter <xref href="OptimaJet.Workflow.Core.Model.ActionDefinitionReference.ActionParameter" data-throw-if-not-resolved="false"></xref>
Returns
TypeDescription
boolCondition result

ExecuteConditionAsync(string, ProcessInstance, WorkflowRuntime, string, CancellationToken)

Check condition asynchronously

Declaration
Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)
Parameters
TypeNameDescription
stringnameName of the condition to check
ProcessInstanceprocessInstanceReference to ProcessInstance from which condition is checked <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref>
WorkflowRuntimeruntimeReference to WorkflowRuntime object which managed specified process instance <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowRuntime" data-throw-if-not-resolved="false"></xref>
stringactionParameterAdditional action parameter <xref href="OptimaJet.Workflow.Core.Model.ActionDefinitionReference.ActionParameter" data-throw-if-not-resolved="false"></xref>
CancellationTokentokenCancellation token
Returns
TypeDescription
Task<bool>Condition result

IsActionAsync(string, string)

Checks whether the action should be called asynchronously

Declaration
bool IsActionAsync(string name, string schemeCode)
Parameters
TypeNameDescription
stringnameName of the action
stringschemeCodeScheme code
Returns
TypeDescription
bool

IsConditionAsync(string, string)

Checks whether the condition should be called asynchronously

Declaration
bool IsConditionAsync(string name, string schemeCode)
Parameters
TypeNameDescription
stringnameName of the condition
stringschemeCodeScheme code
Returns
TypeDescription
bool

GetActions(string, NamesSearchType)

Return all user actions names

Declaration
List<string> GetActions(string schemeCode, NamesSearchType namesSearchType)
Parameters
TypeNameDescription
stringschemeCodeScheme code
NamesSearchTypenamesSearchType
Returns
TypeDescription
List<string>List of actions names

GetConditions(string, NamesSearchType)

Return all user conditions names

Declaration
List<string> GetConditions(string schemeCode, NamesSearchType namesSearchType)
Parameters
TypeNameDescription
stringschemeCodeScheme code
NamesSearchTypenamesSearchType
Returns
TypeDescription
List<string>List of conditions names

Extension Methods