Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class OfflineApi

Inheritance

↳ object

    ↳ OfflineApi

Inherited Members

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Runtime

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public sealed class OfflineApi

Constructors

OfflineApi(WorkflowRuntime)

Declaration
public OfflineApi(WorkflowRuntime runtimeOwner)
Parameters
TypeNameDescription
WorkflowRuntimeruntimeOwner

Methods

GetApprovalMapAsync(ProcessDefinition, Func<TransitionDefinition, Task<bool>>, bool)

Get map of possible approval by process scheme

Declaration
public Task<Dictionary<string, ActivityDto>> GetApprovalMapAsync(ProcessDefinition scheme, Func<TransitionDefinition, Task<bool>> predicate = null, bool ignoreSubprocesses = false)
Parameters
TypeNameDescription
ProcessDefinitionscheme
Func<TransitionDefinition, Task<bool>>predicateAdditional validation for each transition
boolignoreSubprocessesIgnore or not subprocesses on mapping
Returns
TypeDescription
Task<Dictionary<string, ActivityDto>>Collection of activity (<xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.ActivityDto" data-throw-if-not-resolved="false"></xref>) and his transition (<xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.TransitionDto" data-throw-if-not-resolved="false"></xref>) in another activity

GetApprovalMapAsync(ProcessInstance, string)

Get map of possible approval by ProcessInstance for identity Id

Declaration
public Task<Dictionary<string, ActivityDto>> GetApprovalMapAsync(ProcessInstance pi, string identityId)
Parameters
TypeNameDescription
ProcessInstancepiProcess Instance
stringidentityIdUser id
Returns
TypeDescription
Task<Dictionary<string, ActivityDto>>Collection of activity (<xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.ActivityDto" data-throw-if-not-resolved="false"></xref>) and his transition (<xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.TransitionDto" data-throw-if-not-resolved="false"></xref>) in another activity for <code data-dev-comment-type="paramref" class="paramref">identityId</code>

ExecuteSomeCommandsAsync(IEnumerable<Command>)

Try to execute several commands grouped by processId and sorted by DateTime

Declaration
public Task<List<CommandExecutionResult>> ExecuteSomeCommandsAsync(IEnumerable<Command> commands)
Parameters
TypeNameDescription
IEnumerable<Command>commandsCollection command for execute. In parameter ProcessId of <xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.Command" data-throw-if-not-resolved="false"></xref> is required for success execution
Returns
TypeDescription
Task<List<CommandExecutionResult>>Result of execution for each command in some order like input commands

ExecuteSomeCommandsAsync(Guid, IEnumerable<Command>)

Try to execute several commands of one process sorted by DateTime

Declaration
public Task<List<CommandExecutionResult>> ExecuteSomeCommandsAsync(Guid processId, IEnumerable<Command> commands)
Parameters
TypeNameDescription
GuidprocessIdId of <xref href="OptimaJet.Workflow.Core.Model.ProcessInstance" data-throw-if-not-resolved="false"></xref> for which the commands are executed
IEnumerable<Command>commandsCollection command for execute. In this method parameter ProcessId of <xref href="OptimaJet.Workflow.Core.Model.ApprovalMap.Command" data-throw-if-not-resolved="false"></xref> is ignored
Returns
TypeDescription
Task<List<CommandExecutionResult>>Result of execution for each command in some order like input commands

Extension Methods