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
Method | Description | Available from version |
---|---|---|
Constructor | Creates new class instance. | |
GetService | Returns runtime service by its name. | |
GetRuntime | Returns runtime instance. | |
GetInstanceId | Returns workflow ID. | |
GetExecutionStatus | Returns workflow completion status. | |
GetExecutionResult | Returns workflow completion result. | |
GetDocumentId | Returns document ID for which the workflow is launched. |
© «Bitrix24», 2001-2024