Class CommandExecutionResult
OptimaJet.Workflow.Core.Runtime.CommandExecutionResult
Represents the outcome of a workflow command execution.
Namespace: OptimaJet.Workflow.Core.Runtime
public class CommandExecutionResultConstructors
public CommandExecutionResult(string commandName, bool wasExecuted, ProcessInstance processInstance, string message = null) #Creates a new CommandExecutionResult with execution details.
Parameters
Name
Type
Description
commandNameStringThe name of the executed command.
wasExecutedBooleanIndicates whether the command was executed.
processInstanceProcessInstanceThe process instance after executing the command.
messageStringAn optional diagnostic message copied verbatim to CommandExecutionResult.Message. See that property for the cases in which the runtime supplies a value.
Properties
public string CommandName { get; set; } #Gets or sets the name of the command that was executed.
public bool WasExecuted { get; set; } #Gets or sets a value indicating whether the command has been executed.
public ProcessInstance ProcessInstance { get; set; } #Gets or sets the process instance at the result stage.
public string Message { get; set; } #Gets or sets an optional diagnostic message supplied by the code that produced this result.
Remarks
This is not a value returned by a workflow action or activity. Regular command execution through WorkflowRuntime.ExecuteCommandAsync(WorkflowCommand, string, string, CancellationToken, bool) leaves this property null, including when no eligible transition is found and CommandExecutionResult.WasExecuted is false.
The OfflineApi batch command API populates this property for commands that it cannot execute:
- For the first command that fails, it contains the caught exception's message. This also includes the internally generated
Command didn't found.message when no matching available command is found. - If the process identifier is empty, it contains
Process doesn't exists.. - For commands skipped after an earlier command in the same process command chain fails, it contains
The command chain is interrupted..
Callers that create or modify a result directly may supply other text.