Documentation

CBPWorkflow

CBPWorkflow - workflow instance class. It manages a workflow, can send its activities for execution, translate and process events.

Each workflow instance has Its own wrapper object. You can receive a wrapper object via CreateWorkflow and GetWorkflow runtime methods:

$runtime = CBPRuntime::GetRuntime();
$wi = $runtime->CreateWorkflow($workflowTemplateId, $documentId, $arParameters);

Wrapper object in the activity code for a workflow (that includes this activity) is available via workflow-member variable:

$this->workflow->ExecuteActivity($activity);

Class methods

MethodDescriptionAvailable from version
ConstructorCreates new class instance.
GetServiceReturns runtime service by its name.
GetRuntimeReturns runtime instance.
GetInstanceIdReturns workflow ID.
GetExecutionStatusReturns workflow completion status.
GetExecutionResultReturns workflow completion result.
GetDocumentIdReturns document ID for which the workflow is launched.


© «Bitrix24», 2001-2024
Up