Skip to main content

Interface IBulkApi

API for executing WorkflowRuntime methods in bulk processing mode.

Namespace: OptimaJet.Workflow.Core.Runtime.Bulk

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public interface IBulkApi

Methods

CreateInstanceAsync(IEnumerable<CreateInstanceParams>, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync(OptimaJet.Workflow.Core.Runtime.CreateInstanceParams%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> CreateInstanceAsync(IEnumerable<CreateInstanceParams> createInstanceParams, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<CreateInstanceParams>createInstanceParamsCollection of CreateInstanceParams for each process instance will be created.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is <xref href="OptimaJet.Workflow.Core.Runtime.CreateInstanceParams.ProcessId" data-throw-if-not-resolved="false"></xref>.

CreateInstanceAsync(IEnumerable<Guid>, string, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync(System.String%2cSystem.Guid%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> CreateInstanceAsync(IEnumerable<Guid> processIds, string schemaCode, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for each process instance will be created.
stringschemaCodeSchema code for which process instances will be created.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

CreateInstanceAsync(IEnumerable<Guid>, string, string, string, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync(System.String%2cSystem.Guid%2cSystem.String%2cSystem.String%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> CreateInstanceAsync(IEnumerable<Guid> processIds, string schemaCode, string identityId, string impersonatedIdentityId, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for each process instance will be created.
stringschemaCodeSchema code for which process instances will be created.
stringidentityIdThe user ID that executes the initial command if the command is available.
stringimpersonatedIdentityIdThe user ID whose behalf the command is executed if the command is available.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

CreateInstanceAsync(IEnumerable<Guid>, string, IDictionary<string, object>, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync(System.String%2cSystem.Guid%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> CreateInstanceAsync(IEnumerable<Guid> processIds, string schemaCode, IDictionary<string, object> schemeCreationParameters, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for each process instance will be created.
stringschemaCodeSchema code for which process instances will be created.
IDictionary<string, object>schemeCreationParametersParameters for creating the process scheme (defining parameters).
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

CreateInstanceAsync(IEnumerable<Guid>, string, string, string, IDictionary<string, object>, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.CreateInstanceAsync(System.String%2cSystem.Guid%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> CreateInstanceAsync(IEnumerable<Guid> processIds, string schemaCode, string identityId, string impersonatedIdentityId, IDictionary<string, object> schemeCreationParameters, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for each process instance will be created.
stringschemaCodeSchema code for which process instances will be created.
stringidentityIdThe user ID that executes the initial command if the command is available.
stringimpersonatedIdentityIdThe user ID whose behalf the command is executed if the command is available.
IDictionary<string, object>schemeCreationParametersParameters for creating the process scheme (defining parameters).
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

GetProcessInstanceAndFillProcessParametersAsync(IEnumerable<Guid>, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstance>>?, int?, bool?, CancellationToken)

Executes WorkflowRuntime.GetProcessInstanceAndFillProcessParametersAsync(Guid) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<ProcessInstance>>> GetProcessInstanceAndFillProcessParametersAsync(IEnumerable<Guid> processIds, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstance>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for which process instance will be obtained.
EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstance>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<ProcessInstance>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

GetProcessInstancesTreeAsync(IEnumerable<Guid>, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstancesTreeAsync(System.Guid%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<ProcessInstancesTree>>> GetProcessInstancesTreeAsync(IEnumerable<Guid> rootProcessIds, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>rootProcessIdsCollection of process ids for which process instance tree will be obtained.
EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<ProcessInstancesTree>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">rootProcessIds</code> items.

GetProcessInstancesTreeAsync(IEnumerable<ProcessInstance>, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetProcessInstancesTreeAsync(OptimaJet.Workflow.Core.Model.ProcessInstance%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<ProcessInstancesTree>>> GetProcessInstancesTreeAsync(IEnumerable<ProcessInstance> processInstances, EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<ProcessInstance>processInstancesCollection of process instances for which process instance tree will be obtained.
EventHandler<BulkTaskFinalizedEventArgs<Guid, ProcessInstancesTree>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<ProcessInstancesTree>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is the <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.ProcessId" data-throw-if-not-resolved="false"></xref>.

GetAvailableCommandsAsync(IEnumerable<ProcessInstance>, IEnumerable<string>, string?, string?, CultureInfo?, bool, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync(OptimaJet.Workflow.Core.Model.ProcessInstance%2cSystem.Collections.Generic.IEnumerable%7bSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Globalization.CultureInfo%2cSystem.Boolean%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>> GetAvailableCommandsAsync(IEnumerable<ProcessInstance> processInstances, IEnumerable<string> identityIds, string? commandNameFilter = null, string? mainIdentityId = null, CultureInfo? culture = null, bool conditionCheck = false, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<ProcessInstance>processInstancesCollection of process instances for which the search for
available commands will be performed.
IEnumerable<string>identityIdsList of user IDs for which the initial commands list is formed.
stringcommandNameFilterSelects only the specified command if not null.
stringmainIdentityIdUser ID for priority checking of rules.
CultureInfocultureCulture to localize command and command parameter names.
boolconditionCheckIf true, commands with failed condition checks will be excluded.
EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is the <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.ProcessId" data-throw-if-not-resolved="false"></xref>.

GetAvailableCommandsAsync(IEnumerable<ProcessInstance>, string, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync(OptimaJet.Workflow.Core.Model.ProcessInstance%2cSystem.Collections.Generic.IEnumerable%7bSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Globalization.CultureInfo%2cSystem.Boolean%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>> GetAvailableCommandsAsync(IEnumerable<ProcessInstance> processInstances, string identityId, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<ProcessInstance>processInstancesCollection of process instances for which the search for
available commands will be performed.
stringidentityIdUser IDs for whom the initial commands list is formed.
EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is the <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance.ProcessId" data-throw-if-not-resolved="false"></xref>.

GetAvailableCommandsAsync(IEnumerable<Guid>, IEnumerable<string>, string?, string?, CultureInfo?, bool, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync(System.Guid%2cSystem.Collections.Generic.IEnumerable%7bSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Globalization.CultureInfo%2cSystem.Boolean%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>> GetAvailableCommandsAsync(IEnumerable<Guid> processIds, IEnumerable<string> identityIds, string? commandNameFilter = null, string? mainIdentityId = null, CultureInfo? culture = null, bool conditionCheck = false, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for which the search for
available commands will be performed.
IEnumerable<string>identityIdsList of user IDs for which the initial commands list is formed.
stringcommandNameFilterSelects only the specified command if not null.
stringmainIdentityIdUser ID for priority checking of rules.
CultureInfocultureCulture to localize command and command parameter names.
boolconditionCheckIf true, commands with failed condition checks will be excluded.
EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

GetAvailableCommandsAsync(IEnumerable<Guid>, string, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync(System.Guid%2cSystem.Collections.Generic.IEnumerable%7bSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Globalization.CultureInfo%2cSystem.Boolean%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>> GetAvailableCommandsAsync(IEnumerable<Guid> processIds, string identityId, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for which the search for
available commands will be performed.
stringidentityIdUser IDs for whom the initial commands list is formed.
EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

GetAvailableCommandsAsync(IEnumerable<Guid>, string, CultureInfo, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.GetAvailableCommandsAsync(System.Guid%2cSystem.Collections.Generic.IEnumerable%7bSystem.String%7d%2cSystem.String%2cSystem.String%2cSystem.Globalization.CultureInfo%2cSystem.Boolean%2cSystem.Threading.CancellationToken) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>> GetAvailableCommandsAsync(IEnumerable<Guid> processIds, string identityId, CultureInfo culture, EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<Guid>processIdsCollection of process ids for which the search for
available commands will be performed.
stringidentityIdUser IDs for whom the initial commands list is formed.
CultureInfocultureCulture to localize command and command parameter names.
EventHandler<BulkTaskFinalizedEventArgs<Guid, List<WorkflowCommand>>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<List<WorkflowCommand>>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

ExecuteCommandAsync(IEnumerable<WorkflowCommand>, string, string, bool, EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommandAsync(OptimaJet.Workflow.Core.Runtime.WorkflowCommand%2cSystem.String%2cSystem.String%2cSystem.Threading.CancellationToken%2cSystem.Boolean) for each of the specified commands .

Declaration
Task<Dictionary<Guid, BulkTaskResult<CommandExecutionResult>>> ExecuteCommandAsync(IEnumerable<WorkflowCommand> commands, string identityId, string impersonatedIdentityId, bool checkRestrictions = false, EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<WorkflowCommand>commandsA collection of commands for which the command execution will be performed.
stringidentityIdThe user ID that initiates the command execution.
stringimpersonatedIdentityIdThe user ID on whose behalf the command is executed (impersonation).
boolcheckRestrictionsIf set to true, actor restriction check will be performed for every transition.
EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<CommandExecutionResult>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is the <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand.ProcessId" data-throw-if-not-resolved="false"></xref>.

ExecuteCommandWithRestrictionCheckAsync(IEnumerable<WorkflowCommand>, string, string, EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.ExecuteCommandWithRestrictionCheckAsync(OptimaJet.Workflow.Core.Runtime.WorkflowCommand%2cSystem.String%2cSystem.String%2cSystem.Threading.CancellationToken) for each of the specified commands .

Declaration
Task<Dictionary<Guid, BulkTaskResult<CommandExecutionResult>>> ExecuteCommandWithRestrictionCheckAsync(IEnumerable<WorkflowCommand> commands, string identityId, string impersonatedIdentityId, EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
IEnumerable<WorkflowCommand>commandsA collection of commands for which the command execution will be performed.
stringidentityIdThe user ID that initiates the command execution.
stringimpersonatedIdentityIdThe user ID on whose behalf the command is executed (impersonation).
EventHandler<BulkTaskFinalizedEventArgs<Guid, CommandExecutionResult>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<CommandExecutionResult>>>Dictionary with the results of the operation and the final state of each individual task,
where the key is the <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand.ProcessId" data-throw-if-not-resolved="false"></xref>.

UpdateSchemeIfObsoleteAsync(List<Guid>, IDictionary<string, object>, bool, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes OptimaJet.Workflow.Core.Runtime.WorkflowRuntime.UpdateSchemeIfObsoleteAsync(System.Guid%2cSystem.Collections.Generic.IDictionary%7bSystem.String%2cSystem.Object%7d%2cSystem.Boolean) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> UpdateSchemeIfObsoleteAsync(List<Guid> processIds, IDictionary<string, object> parameters, bool ignoreAutoSchemeUpdate = false, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
List<Guid>processIdsCollection of process ids for which scheme update will be performed.
IDictionary<string, object>parametersParameters for creating the scheme of the process.
boolignoreAutoSchemeUpdateIf set to true, the attribute of the Activity — IsAutoScheme update will be ignored.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

UpdateSchemeIfObsoleteAsync(List<Guid>, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes WorkflowRuntime.UpdateSchemeIfObsoleteAsync(Guid) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> UpdateSchemeIfObsoleteAsync(List<Guid> processIds, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
List<Guid>processIdsCollection of process ids for which scheme update will be performed.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

DeleteInstanceAsync(List<Guid>, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>?, int?, bool?, CancellationToken)

Executes WorkflowRuntime.DeleteInstanceAsync(Guid) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<Empty>>> DeleteInstanceAsync(List<Guid> processIds, EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
List<Guid>processIdsCollection of process IDs for which the process instance will be deleted.
EventHandler<BulkTaskFinalizedEventArgs<Guid, Empty>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<Empty>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

IsProcessExistsAsync(List<Guid>, EventHandler<BulkTaskFinalizedEventArgs<Guid, bool>>?, int?, bool?, CancellationToken)

Executes WorkflowRuntime.IsProcessExistsAsync(Guid) for each of the specified .

Declaration
Task<Dictionary<Guid, BulkTaskResult<bool>>> IsProcessExistsAsync(List<Guid> processIds, EventHandler<BulkTaskFinalizedEventArgs<Guid, bool>>? taskFinalizedHandler = null, int? maxDegreeOfParallelism = null, bool? throwOnError = null, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
List<Guid>processIdsCollection of process ids to be checked for existence.
EventHandler<BulkTaskFinalizedEventArgs<Guid, bool>>taskFinalizedHandlerEvent handler invoked upon the completion of each individual task in the entire list.
It takes the task's progress and intermediate result as arguments <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskFinalizedEventArgs%602" data-throw-if-not-resolved="false"></xref>,
allowing you to display a progress bar or perform other useful work during the execution of a bulk task.
int?maxDegreeOfParallelismMaximum degree of parallelism that determines the maximum number of concurrently executing tasks in BulkApi methods.
bool?throwOnErrorWhen set to true, if at least one task has been processed with an error,
after all tasks are completed, an <xref href="System.AggregateException" data-throw-if-not-resolved="false"></xref> will be thrown
with a collection of all thrown exceptions.
CancellationTokencancellationTokenCancellation Token will be observed during the execution of tasks.
If cancellation is requested, new tasks will stop being executed,
while the waiting for already launched tasks will continue.
Returns
TypeDescription
Task<Dictionary<Guid, BulkTaskResult<bool>>>Dictionary with the results of the operation and the final state of each individual task,
where the keys are <code data-dev-comment-type="paramref" class="paramref">processIds</code> items.

Extension Methods