WorkflowContext::newRootWorkflowContext Method [AX 2012]
Creates an instance of a root WorkflowContext Class.
Syntax
client server public static WorkflowContext newRootWorkflowContext(
CompanyId _companyId,
RefTableId _tableId,
RefRecId _recId,
WorkflowCorrelationId _correlationId)
Run On
Called
Parameters
- _companyId
Type: CompanyId Extended Data Type
- _tableId
Type: RefTableId Extended Data Type
- _recId
Type: RefRecId Extended Data Type
- _correlationId
Type: WorkflowCorrelationId Extended Data Type
Return Value
Type: WorkflowContext Class
An instance of the WorkflowContext class.
Remarks
The newRootWorkflowContext method should only be used at activation time to create a WorkflowContext class instance for a new enabled workflow.
The root correlation ID is equal to the workflow correlation ID for a root workflow. Therefore, the newWorkflowContext method sets the root correlation ID to the input workflow correlation ID. In addition, a root workflow does not have a parent workflow. Therefore, the newWorkflowContext method sets the parent correlation ID to an empty GUID.