@Component public class ActivitiRuntimeHelper extends Object
RuntimeService.
This class is distinguished from ActivitiHelper in that it has direct access to a RuntimeService. This class was separated from ActivitiHelper
implementation due to a circular dependency introduced if RuntimeService is autowired into ActivitiHelper. The circular dependency is as thus:
RuntimeService -> ProcessEngine -> ProcessEngineConfiguration -> HerdCommandInvoker -> ActivitiHelper -> RuntimeService
So instead, this class breaks the circularity:
RuntimeService -> ProcessEngine -> ProcessEngineConfiguration -> HerdCommandInvoker -> ActivitiHelper ActivitiRuntimeHelper -> RuntimeService
Due to historical reasons, some methods that were previously in ActivitiHelper have been moved into this class.| Modifier and Type | Field and Description |
|---|---|
static String |
TASK_STATUS_ERROR |
static String |
TASK_STATUS_SUCCESS |
static String |
TASK_VARIABLE_MARKER |
static String |
VARIABLE_ERROR_MESSAGE |
static String |
VARIABLE_STATUS |
| Constructor and Description |
|---|
ActivitiRuntimeHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildTaskWorkflowVariableName(String activitiId,
String variableName)
Builds a workflow variable name based on the template.
|
void |
setTaskErrorInWorkflow(org.activiti.engine.delegate.DelegateExecution execution,
String errorMessage,
Exception exception)
Sets the task error status and message in workflow variables.
|
void |
setTaskSuccessInWorkflow(org.activiti.engine.delegate.DelegateExecution execution)
Sets the task success status in a workflow variable.
|
void |
setTaskWorkflowVariable(org.activiti.engine.delegate.DelegateExecution execution,
String variableName,
Object variableValue)
Sets a workflow variable name based on the template.
|
void |
setTaskWorkflowVariable(String executionId,
String activitiId,
String variableName,
Object variableValue)
Sets the workflow variable whose name references the task which produced the variable.
|
void |
signal(String processInstanceId,
String signalTaskId)
Signals a task by its process instance ID and the ID of the task to signal.
|
public static final String VARIABLE_STATUS
public static final String VARIABLE_ERROR_MESSAGE
public static final String TASK_STATUS_SUCCESS
public static final String TASK_STATUS_ERROR
public static final String TASK_VARIABLE_MARKER
public void signal(String processInstanceId, String signalTaskId)
processInstanceId - The process instance ID of the waiting task.signalTaskId - The ID of the task to signal.public void setTaskWorkflowVariable(String executionId, String activitiId, String variableName, Object variableValue)
executionId - The execution IDactivitiId - The task's IDvariableName - Name of the variable without the task referencevariableValue - The value of the variable.public void setTaskWorkflowVariable(org.activiti.engine.delegate.DelegateExecution execution,
String variableName,
Object variableValue)
execution - the workflow executionvariableName - the variable namevariableValue - the variable valuepublic void setTaskSuccessInWorkflow(org.activiti.engine.delegate.DelegateExecution execution)
execution - the workflow execution.public void setTaskErrorInWorkflow(org.activiti.engine.delegate.DelegateExecution execution,
String errorMessage,
Exception exception)
execution - the workflow execution.errorMessage - the error message.exception - an optional exception that caused the error.Copyright © 2021. All rights reserved.