Codeunit "Workflow Management"

ID 1501
Namespace: System.Automation

Properties

Name Value
Permissions TableData Workflow = R, TableData "Workflow Step" = R, TableData "Workflow Step Instance" = Rimd, TableData "Workflow Table Relation Value" = rimd, tabledata "Workflow Event" = r, TableData "Workflow Event Queue" = rimd, TableData "Workflow Step Argument" = rd, TableData "Workflow - Record Change" = rimd, TableData "Workflow Record Change Archive" = rimd, TableData "Workflow Step Instance Archive" = rimd, TableData "Workflow Step Argument Archive" = rimd, tabledata "Workflow - Table Relation" = r

Methods

TrackWorkflow

procedure TrackWorkflow(Variant: Variant, var WorkflowStepInstance: Record "Workflow Step Instance")

Parameters

Name Type Description
Variant Variant
WorkflowStepInstance Table System.Automation."Workflow Step Instance"

FindWorkflowStepInstance

procedure FindWorkflowStepInstance(Variant: Variant, xVariant: Variant, var WorkflowStepInstance: Record "Workflow Step Instance", FunctionName: Code[128]): Boolean

Parameters

Name Type Description
Variant Variant
xVariant Variant
WorkflowStepInstance Table System.Automation."Workflow Step Instance"
FunctionName Code[128]

Returns

Type Description
Boolean

CanExecuteWorkflow

procedure CanExecuteWorkflow(Variant: Variant, FunctionName: Code[128]): Boolean

Parameters

Name Type Description
Variant Variant
FunctionName Code[128]

Returns

Type Description
Boolean

MarkChildrenStatus

procedure MarkChildrenStatus(WorkflowStepInstance: Record "Workflow Step Instance", NewStatus: Option)

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"
NewStatus Option

MarkSiblingStatus

procedure MarkSiblingStatus(WorkflowStepInstance: Record "Workflow Step Instance", NewStatus: Option)

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"
NewStatus Option

UpdateStatus

procedure UpdateStatus(var WorkflowStepInstance: Record "Workflow Step Instance", NewStatus: Option, ChildrenStatus: Option, SiblingsStatus: Option)

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"
NewStatus Option
ChildrenStatus Option
SiblingsStatus Option

FindWorkflow

procedure FindWorkflow(RecRef: RecordRef, xRecRef: RecordRef, FunctionName: Code[128], var Workflow: Record Workflow): Boolean

Parameters

Name Type Description
RecRef RecordRef
xRecRef RecordRef
FunctionName Code[128]
Workflow Table System.Automation.Workflow

Returns

Type Description
Boolean

WorkflowExists

procedure WorkflowExists(Variant: Variant, xVariant: Variant, FunctionName: Code[128]): Boolean

Parameters

Name Type Description
Variant Variant
xVariant Variant
FunctionName Code[128]

Returns

Type Description
Boolean

ArchiveWorkflowInstance

procedure ArchiveWorkflowInstance(WorkflowStepInstance: Record "Workflow Step Instance")

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"

FindResponse

procedure FindResponse(var ResponseWorkflowStepInstance: Record "Workflow Step Instance", PreviousWorkflowStepInstance: Record "Workflow Step Instance"): Boolean

Parameters

Name Type Description
ResponseWorkflowStepInstance Table System.Automation."Workflow Step Instance"
PreviousWorkflowStepInstance Table System.Automation."Workflow Step Instance"

Returns

Type Description
Boolean

FindEventWorkflowStepInstance

procedure FindEventWorkflowStepInstance(var WorkflowStepInstance: Record "Workflow Step Instance", FunctionName: Code[128], Variant: Variant, xVariant: Variant): Boolean

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"
FunctionName Code[128]
Variant Variant
xVariant Variant

Returns

Type Description
Boolean

HandleEvent

procedure HandleEvent(FunctionName: Code[128], Variant: Variant)

Parameters

Name Type Description
FunctionName Code[128]
Variant Variant

HandleEventWithxRec

procedure HandleEventWithxRec(FunctionName: Code[128], Variant: Variant, xVariant: Variant)

Parameters

Name Type Description
FunctionName Code[128]
Variant Variant
xVariant Variant

HandleEventOnKnownWorkflowInstance

procedure HandleEventOnKnownWorkflowInstance(FunctionName: Code[128], Variant: Variant, WorkflowStepInstanceID: Guid)

Parameters

Name Type Description
FunctionName Code[128]
Variant Variant
WorkflowStepInstanceID Guid

HandleEventWithxRecOnKnownWorkflowInstance

procedure HandleEventWithxRecOnKnownWorkflowInstance(FunctionName: Code[128], Variant: Variant, xVariant: Variant, WorkflowStepInstanceID: Guid)

Parameters

Name Type Description
FunctionName Code[128]
Variant Variant
xVariant Variant
WorkflowStepInstanceID Guid

ExecuteResponses

procedure ExecuteResponses(Variant: Variant, xVariant: Variant, ActionableWorkflowStepInstance: Record "Workflow Step Instance")

Parameters

Name Type Description
Variant Variant
xVariant Variant
ActionableWorkflowStepInstance Table System.Automation."Workflow Step Instance"

ChangeStatusForResponsesAndEvents

procedure ChangeStatusForResponsesAndEvents(WorkflowStepInstance: Record "Workflow Step Instance")

Parameters

Name Type Description
WorkflowStepInstance Table System.Automation."Workflow Step Instance"

EnabledWorkflowExist

procedure EnabledWorkflowExist(TableNo: Integer, EventFilter: Text): Boolean

Parameters

Name Type Description
TableNo Integer
EventFilter Text

Returns

Type Description
Boolean

NavigateToWorkflows

procedure NavigateToWorkflows(TableNo: Integer, EventFilter: Text)

Parameters

Name Type Description
TableNo Integer
EventFilter Text

BuildConditionDisplay

procedure BuildConditionDisplay(WorkflowStep: Record "Workflow Step"): Text[100]

Parameters

Name Type Description
WorkflowStep Table System.Automation."Workflow Step"

Returns

Type Description
Text[100]

ClearSupportedCombinations

procedure ClearSupportedCombinations(FunctionName: Code[128], WFEventResponseCombinationType: Option)

Parameters

Name Type Description
FunctionName Code[128]
WFEventResponseCombinationType Option

GetWebhookClientLink

procedure GetWebhookClientLink(ClientId: Guid, ClientType: Text): Text

Parameters

Name Type Description
ClientId Guid
ClientType Text

Returns

Type Description
Text

AnyWorkflowExists

procedure AnyWorkflowExists(): Boolean

Returns

Type Description
Boolean

Events

OnBeforeHandleEventWithxRec

[IntegrationEvent(False,False)]
local procedure OnBeforeHandleEventWithxRec(FunctionName: Code[128], Variant: Variant, xVariant: Variant, var IsHandled: Boolean)

Parameters

Name Type Description
FunctionName Code[128]
Variant Variant
xVariant Variant
IsHandled Boolean

OnAfterEvaluateCondition

[IntegrationEvent(False,False)]
local procedure OnAfterEvaluateCondition(RecRef: RecordRef, xRecRef: RecordRef, ArgumentID: Guid, var WorkflowRule: Record "Workflow Rule", var Result: Boolean)

Parameters

Name Type Description
RecRef RecordRef
xRecRef RecordRef
ArgumentID Guid
WorkflowRule Table System.Automation."Workflow Rule"
Result Boolean

OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1tersWhenNotStartWorkFlow

[IntegrationEvent(False,False)]
local procedure OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1tersWhenNotStartWorkFlow(RecordRef: RecordRef, var WorkflowStepInstanceLoop: Record "Workflow Step Instance", FunctionName: Code[128], StartWorkflow: Boolean)

Parameters

Name Type Description
RecordRef RecordRef
WorkflowStepInstanceLoop Table System.Automation."Workflow Step Instance"
FunctionName Code[128]
StartWorkflow Boolean

OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1ters

[IntegrationEvent(False,False)]
local procedure OnFindWorkflowStepInstanceWithOptionalWorkflowStartOnAfterSetWorkflowStepInstanceLoopFi1ters(RecordRef: RecordRef, var WorkflowStepInstanceLoop: Record "Workflow Step Instance", FunctionName: Code[128], StartWorkflow: Boolean)

Parameters

Name Type Description
RecordRef RecordRef
WorkflowStepInstanceLoop Table System.Automation."Workflow Step Instance"
FunctionName Code[128]
StartWorkflow Boolean

See also