Class DelegateHelper
JavaDelegate,
ActivityBehavior, ExecutionListener and TaskListener
interfaces.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressioncreateExpressionForField(org.activiti.bpmn.model.FieldExtension fieldExtension) Creates anExpressionfor theFieldExtension.static org.activiti.bpmn.model.BpmnModelgetBpmnModel(DelegateExecution execution) Returns theBpmnModelmatching the process definition bpmn model for the process definition of the passedDelegateExecution.getExtensionElements(DelegateExecution execution) static org.activiti.bpmn.model.FieldExtensiongetField(DelegateExecution execution, String fieldName) Returns theFieldExtensionmatching the provided 'fieldName' which is defined for the current activity of the providedDelegateExecution.static ExpressiongetFieldExpression(DelegateExecution execution, String fieldName) Returns theExpressionfor the field defined for the current activity of the providedDelegateExecution.static ExpressiongetFieldExpression(DelegateTask task, String fieldName) Similar togetFieldExpression(DelegateExecution, String), but for use within aTaskListener.static List<org.activiti.bpmn.model.FieldExtension> getFields(DelegateExecution execution) Returns the list of field extensions, represented as instances ofFieldExtension, for the current activity of the passedDelegateExecution.static org.activiti.bpmn.model.FlowElementgetFlowElement(DelegateExecution execution) Returns the currentFlowElementwhere theDelegateExecutionis currently at.getFlowElementExtensionElements(DelegateExecution execution) static org.activiti.bpmn.model.FieldExtensiongetFlowElementField(DelegateExecution execution, String fieldName) static ExpressiongetFlowElementFieldExpression(DelegateExecution execution, String fieldName) static List<org.activiti.bpmn.model.FieldExtension> getFlowElementFields(DelegateExecution execution) getListenerExtensionElements(DelegateExecution execution) static org.activiti.bpmn.model.FieldExtensiongetListenerField(DelegateExecution execution, String fieldName) static ExpressiongetListenerFieldExpression(DelegateExecution execution, String fieldName) static List<org.activiti.bpmn.model.FieldExtension> getListenerFields(DelegateExecution execution) static booleanisExecutingExecutionListener(DelegateExecution execution) Returns whether or not the provided execution is being use for executing anExecutionListener.static voidleaveDelegate(DelegateExecution delegateExecution) To be used in anActivityBehaviororJavaDelegate: leaves according to the default BPMN 2.0 rules: all sequenceflow with a condition that evaluates to true are followed.static voidleaveDelegate(DelegateExecution delegateExecution, String sequenceFlowId) To be used in anActivityBehaviororJavaDelegate: leaves the current activity via one specific sequenceflow.
-
Constructor Details
-
DelegateHelper
public DelegateHelper()
-
-
Method Details
-
leaveDelegate
To be used in anActivityBehaviororJavaDelegate: leaves according to the default BPMN 2.0 rules: all sequenceflow with a condition that evaluates to true are followed. -
leaveDelegate
To be used in anActivityBehaviororJavaDelegate: leaves the current activity via one specific sequenceflow. -
getBpmnModel
Returns theBpmnModelmatching the process definition bpmn model for the process definition of the passedDelegateExecution. -
getFlowElement
Returns the currentFlowElementwhere theDelegateExecutionis currently at. -
isExecutingExecutionListener
Returns whether or not the provided execution is being use for executing anExecutionListener. -
getExtensionElements
public static Map<String,List<org.activiti.bpmn.model.ExtensionElement>> getExtensionElements(DelegateExecution execution) Returns for the activityId of the passedDelegateExecutiontheMapofExtensionElementinstances. These represent the extension elements defined in the BPMN 2.0 XML as part of that particular activity.If the execution is currently being used for executing an
ExecutionListener, the extension elements of the listener will be used. Use thegetFlowElementExtensionElements(DelegateExecution)orgetListenerExtensionElements(DelegateExecution)instead to specifically get the extension elements of either the flow element or the listener. -
getFlowElementExtensionElements
public static Map<String,List<org.activiti.bpmn.model.ExtensionElement>> getFlowElementExtensionElements(DelegateExecution execution) -
getListenerExtensionElements
public static Map<String,List<org.activiti.bpmn.model.ExtensionElement>> getListenerExtensionElements(DelegateExecution execution) -
getFields
Returns the list of field extensions, represented as instances ofFieldExtension, for the current activity of the passedDelegateExecution.If the execution is currently being used for executing an
ExecutionListener, the fields of the listener will be returned. UsegetFlowElementFields(DelegateExecution)orgetListenerFields(DelegateExecution)if needing the flow element of listener fields specifically. -
getFlowElementFields
public static List<org.activiti.bpmn.model.FieldExtension> getFlowElementFields(DelegateExecution execution) -
getListenerFields
public static List<org.activiti.bpmn.model.FieldExtension> getListenerFields(DelegateExecution execution) -
getField
public static org.activiti.bpmn.model.FieldExtension getField(DelegateExecution execution, String fieldName) Returns theFieldExtensionmatching the provided 'fieldName' which is defined for the current activity of the providedDelegateExecution.Returns null if no such
FieldExtensioncan be found.If the execution is currently being used for executing an
ExecutionListener, the field of the listener will be returned. UsegetFlowElementField(DelegateExecution, String)orgetListenerField(DelegateExecution, String)for specifically getting the field from either the flow element or the listener. -
getFlowElementField
public static org.activiti.bpmn.model.FieldExtension getFlowElementField(DelegateExecution execution, String fieldName) -
getListenerField
public static org.activiti.bpmn.model.FieldExtension getListenerField(DelegateExecution execution, String fieldName) -
createExpressionForField
public static Expression createExpressionForField(org.activiti.bpmn.model.FieldExtension fieldExtension) Creates anExpressionfor theFieldExtension. -
getFieldExpression
Returns theExpressionfor the field defined for the current activity of the providedDelegateExecution.Returns null if no such field was found in the process definition xml.
If the execution is currently being used for executing an
ExecutionListener, it will return the field expression for the listener. UsegetFlowElementFieldExpression(DelegateExecution, String)orgetListenerFieldExpression(DelegateExecution, String)for specifically getting the flow element or listener field expression. -
getFieldExpression
Similar togetFieldExpression(DelegateExecution, String), but for use within aTaskListener. -
getFlowElementFieldExpression
public static Expression getFlowElementFieldExpression(DelegateExecution execution, String fieldName) -
getListenerFieldExpression
-