org.activiti.engine.delegate

## Class DelegateHelper

- java.lang.Object
- - org.activiti.engine.delegate.DelegateHelper

-     public class DelegateHelper
      extends Object

  Class that provides helper operations for use in the `JavaDelegate`, `ActivityBehavior`, `ExecutionListener` and `TaskListener` interfaces.
  Author:
    Joram Barrez

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DelegateHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Expression` | `createExpressionForField(org.activiti.bpmn.model.FieldExtension fieldExtension)` Creates an `Expression` for the `FieldExtension`.
    `static org.activiti.bpmn.model.BpmnModel` | `getBpmnModel(DelegateExecution execution)` Returns the `BpmnModel` matching the process definition bpmn model for the process definition of the passed `DelegateExecution`.
    `static Map<String,List<org.activiti.bpmn.model.ExtensionElement>>` | `getExtensionElements(DelegateExecution execution)` Returns for the activityId of the passed `DelegateExecution` the `Map` of `ExtensionElement` instances.
    `static org.activiti.bpmn.model.FieldExtension` | `getField(DelegateExecution execution, String fieldName)` Returns the `FieldExtension` matching the provided 'fieldName' which is defined for the current activity of the provided `DelegateExecution`.
    `static Expression` | `getFieldExpression(DelegateExecution execution, String fieldName)` Returns the `Expression` for the field defined for the current activity of the provided `DelegateExecution`.
    `static List<org.activiti.bpmn.model.FieldExtension>` | `getFields(DelegateExecution execution)` Returns the list of field extensions, represented as instances of `FieldExtension`, for the current activity of the passed `DelegateExecution`.
    `static org.activiti.bpmn.model.FlowElement` | `getFlowElement(DelegateExecution execution)` Returns the current `FlowElement` where the `DelegateExecution` is currently at.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DelegateHelper

          public DelegateHelper()

  - ### Method Detail

    - #### getBpmnModel

          public static org.activiti.bpmn.model.BpmnModel getBpmnModel(DelegateExecution execution)

      Returns the `BpmnModel` matching the process definition bpmn model for the process definition of the passed `DelegateExecution`.

    - #### getFlowElement

          public static org.activiti.bpmn.model.FlowElement getFlowElement(DelegateExecution execution)

      Returns the current `FlowElement` where the `DelegateExecution` is currently at.

    - #### getExtensionElements

          public static Map<String,List<org.activiti.bpmn.model.ExtensionElement>> getExtensionElements(DelegateExecution execution)

      Returns for the activityId of the passed `DelegateExecution` the `Map` of `ExtensionElement` instances. These represent the extension elements defined in the BPMN 2.0 XML as part of that particular activity.

    - #### getFields

          public static List<org.activiti.bpmn.model.FieldExtension> getFields(DelegateExecution execution)

      Returns the list of field extensions, represented as instances of `FieldExtension`, for the current activity of the passed `DelegateExecution`.

    - #### getField

          public static org.activiti.bpmn.model.FieldExtension getField(DelegateExecution execution,
                                                                        String fieldName)

      Returns the `FieldExtension` matching the provided 'fieldName' which is defined for the current activity of the provided `DelegateExecution`. Returns null if no such `FieldExtension` can be found.

    - #### createExpressionForField

          public static Expression createExpressionForField(org.activiti.bpmn.model.FieldExtension fieldExtension)

      Creates an `Expression` for the `FieldExtension`.

    - #### getFieldExpression

          public static Expression getFieldExpression(DelegateExecution execution,
                                                      String fieldName)

      Returns the `Expression` for the field defined for the current activity of the provided `DelegateExecution`. Returns null if no such field was found in the process definition xml.

Copyright © 2016 Alfresco. All rights reserved.