Class BPMNUtil

java.lang.Object
org.imixs.workflow.bpmn.BPMNUtil

public class BPMNUtil extends Object
The BPMNUtil provides convenient methods to access elements and bpmn2:extension tags within a Open-BPMN Model Example for a :
 
 <bpmn2:task id="Task_2" imixs:processid="1900" name="Approve">
      <bpmn2:extensionElements>
        <imixs:item name="user.name" type="xs:string">John</imixs:item>
        ....
      </bpmn2:extensionElements>
        
  • Field Details

  • Method Details

    • getNamespace

      public static String getNamespace()
    • getNamespaceURI

      public static String getNamespaceURI()
    • getVersion

      public static String getVersion(org.openbpmn.bpmn.BPMNModel model)
      This method resolves the imixs version of a model.

      The method parses the version directly form the imixs:extension element from teh definitions node. Note: we can not call findDefinition here because of recursive call

      Parameters:
      model -
      Returns:
    • getItemValueList

      public static List<String> getItemValueList(Element imixsItemElement)
      This helper method returns a value list of a given imixs extension element. If no values exists, than the method returns an empty List The method also avoids duplicates as this can of course not be handled by the react component.
      Parameters:
      itemName - - name of the item
      referenceList - - optional list of allowed values
      Returns:
      the itemValue list.
    • findAllImixsElements

      public static Set<Element> findAllImixsElements(Element parent, String type)
      This helper method returns a set of all imixs:ELEMENTS for the given parent node. If no nodes were found, the method returns an empty list.

      The type can be either 'item' or 'value' Example:

      <imixs:item name="user.name" type=
       "xs:string">John</imixs:item>
      Parameters:
      parent -
      nodeName -
      Returns:
      - list of nodes. If no nodes were found, the method returns an empty list
    • isImixsTaskElement

      public static boolean isImixsTaskElement(org.openbpmn.bpmn.elements.core.BPMNElementNode element)
      Returns true if the given BPMNElement is a Imixs Task element <bpmn2:task id="Task_2" imixs:processid="1000" name="Task 1">
      Returns:
    • isImixsEventElement

      public static boolean isImixsEventElement(org.openbpmn.bpmn.elements.core.BPMNElementNode element)
      Returns true if the given BPMNElement is a Imixs Event element <bpmn2:intermediateCatchEvent id="CatchEvent_2" imixs:activityid="20" >
      Returns:
    • isLinkCatchEventElement

      public static boolean isLinkCatchEventElement(org.openbpmn.bpmn.elements.core.BPMNElementNode element)
      Returns true if the given BPMNElement is a BPMN TROW_EVENT with a Link definition
      <bpmn2:intermediateThrowEvent id="event_ounTaA" name="HOLD">
         <bpmn2:linkEventDefinition id="linkEventDefinition_343OGA"/>
         ....
       </bpmn2:intermediateCatchEvent>
      Returns:
    • isParallelGatewayElement

      public static boolean isParallelGatewayElement(org.openbpmn.bpmn.elements.core.BPMNElementNode element)
      Returns true if the given BPMNElement is a BPMN ParallelGateway
      Returns:
    • isInitEventNode

      public static boolean isInitEventNode(org.openbpmn.bpmn.elements.core.BPMNElementNode eventNode)
      Returns true if the given node is a an ImixsEvent node with no incoming nodes or with one incoming node that comes from a Start event.