Class CodeActionsInvoker
OptimaJet.Workflow.Core.CodeActions.CodeActionsInvoker
Stores compiled actions, conditions, and rules and invokes them by their logical names.
Namespace: OptimaJet.Workflow.Core.CodeActions
public sealed class CodeActionsInvokerMethods
public void AddCompilledType(Type compilledType) #Discovers generated public static code-action methods on
compilledType and registers delegates for invoking them.Parameters
Name
Type
Description
compilledTypeTypeThe compiled type that contains code action methods.
Exceptions
Type
Description
ArgumentExceptionThrown when a public static method does not end with a recognized CodeActionType, or when the same generated method name is registered more than once.
Remarks
The final underscore-delimited segment of each method name, before an optional
Async suffix, must identify its CodeActionType. Invocation methods reconstruct the registered method name with CodeActionUtils.GetMethodName(string, CodeActionType) or CodeActionUtils.GetAsyncMethodName(string, CodeActionType).public bool InvokeCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter) #Invokes a synchronous CodeActionType.Condition code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked condition.
Returns
Type
Description
BooleanThe Boolean value returned by the condition.
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no synchronous condition is registered for
name.public Task<bool> InvokeConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter, CancellationToken token) #Invokes an asynchronous CodeActionType.Condition code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked condition.
Returns
Type
Description
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no asynchronous condition is registered for
name.public void InvokeAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter) #Invokes a synchronous CodeActionType.Action code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked action.
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no synchronous action is registered for
name.public Task InvokeActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter, CancellationToken token) #Invokes an asynchronous CodeActionType.Action code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked action.
Returns
Type
Description
TaskA Task that represents the asynchronous execution.
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no asynchronous action is registered for
name.public IEnumerable<string> InvokeRuleGet(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter) #Invokes a synchronous CodeActionType.RuleGet code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked rule.
Returns
Type
Description
IEnumerable<String>The workflow participant identities returned by the rule.
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no synchronous identity-producing rule is registered for
name.public Task<IEnumerable<string>> InvokeRuleGetAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string parameter, CancellationToken token) #Invokes an asynchronous CodeActionType.RuleGet code action.
Parameters
Name
Type
Description
parameterStringThe parameter string passed to the invoked rule.
Returns
Type
Description
Task<String>The workflow participant identities returned by the rule.
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no asynchronous identity-producing rule is registered for
name.public bool InvokeRuleCheck(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string parameter) #Invokes a synchronous CodeActionType.RuleCheck code action.
Parameters
Name
Type
Description
identityIdStringThe workflow participant identity evaluated by the rule-check action.
parameterStringThe parameter string passed to the invoked rule.
Returns
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no synchronous identity-checking rule is registered for
name.public Task<bool> InvokeRuleCheckAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string parameter, CancellationToken token) #Invokes an asynchronous CodeActionType.RuleCheck code action.
Parameters
Name
Type
Description
identityIdStringThe workflow participant identity evaluated by the rule-check action.
parameterStringThe parameter string passed to the invoked rule.
Returns
Type
Description
Exceptions
Type
Description
KeyNotFoundExceptionThrown when no asynchronous identity-checking rule is registered for
name.public bool ExistsCondition(string name) #Determines whether a CodeActionType.Condition code action with the given logical name exists.
Parameters
Name
Type
Description
Returns
public bool ExistsAction(string name) #Determines whether a CodeActionType.Action code action with the given logical name exists.
Parameters
Name
Type
Description
Returns
public bool ExistsRuleGet(string name) #Determines whether a CodeActionType.RuleGet code action with the given logical name exists.
Parameters
Name
Type
Description
Returns
public bool ExistsRuleCheck(string name) #Determines whether a CodeActionType.RuleCheck code action with the given logical name exists.
Parameters
Name
Type
Description
Returns
public bool IsConditionAsync(string name) #Determines whether the named CodeActionType.Condition code action is registered as asynchronous.
Parameters
Name
Type
Description
Returns
Type
Description
Booleantrue if the condition action is available asynchronously.
public bool IsActionAsync(string name) #Determines whether the named CodeActionType.Action code action is registered as asynchronous.
Parameters
Name
Type
Description
Returns
Type
Description
Booleantrue if the action is available asynchronously.
public bool IsGetRuleAsync(string name) #Determines whether the named CodeActionType.RuleGet code action is registered as asynchronous.
Parameters
Name
Type
Description
Returns
Type
Description
Booleantrue if the rule-get action is available asynchronously.
public bool IsCheckRuleAsync(string name) #Determines whether the named CodeActionType.RuleCheck code action is registered as asynchronous.
Parameters
Name
Type
Description
Returns
Type
Description
Booleantrue if the rule-check action is available asynchronously.