Interface IWorkflowBpmnModelContext


public interface IWorkflowBpmnModelContext
Interface for the context available when a workflow flowchart is converted to a BPMN diagram. The context is created when the conversion starts and discarded when the conversion ends. The context can be used to access data that is global to the conversion process, such as the entire workflow process to be converted, or the created BPMN elements. It also contains various helper methods you can use to create the BPMN diagram.

The BPMN diagram for a workflow consists of nested IStructuredBpmnModelPart, see the class-level documentation for that class for more info.

Since:
8.4.0
Author:
XIMA MEDIA GmbH
See Also:
  • Method Details

    • bpmnElements

      IBpmnElementStore bpmnElements()
      Gets the store to access all BPMN element in the BPMN model being created.
      Returns:
      The store providing access to BPMN elements, never null.
    • colorizer

      Gets the colorizer with helper methods for apply color to BPMN shapes, edges, and labels.
      Returns:
      The colorizer for the BPMN diagram, never null.
    • compatibilitySettings

      IBpmnCompatibilitySettings compatibilitySettings()
      Compatibility-related settings with various BPMN tools, used when creating a BPMN diagram.
      Returns:
      The compatibility settings for the BPMN diagram, never null.
    • crossFlowAxis

      ECartesianAxis2D crossFlowAxis()
      The cross flow axis, i.e. the axis of the crossFlowDirection.
      Returns:
      The cross flow axis, never null.
    • crossFlowDirection

      ECardinalDirection2D crossFlowDirection()
      The cross flow direction, which is the flowDirection rotated by 90 degrees anti-clockwise.
      Returns:
      The cross flow direction, never null.
    • crossFlowPolarity

      EAxisPolarity crossFlowPolarity()
      The axis polarity of the cross flow direction, which is the flowDirection rotated by 90 degrees anti-clockwise.
      Returns:
      The cross flow polarity, never null.
    • crossFlowSpacing

      double crossFlowSpacing()
      Gets the default spacing in the crossFlowDirection().
      Returns:
      The default spacing in the cross flow direction.
    • crossFlowSpacing

      double crossFlowSpacing(double scalingFactor)
      Gets the default spacing in the crossFlowDirection(), multiplied by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply to the default spacing.
      Returns:
      The default spacing in the cross flow direction, scaled by the given factor.
    • crossFlowUnitVector

      Point2DDouble crossFlowUnitVector()
      A Point2DDouble representing a unit vector in the cross flow direction, with a magnitude of 1.
      Returns:
      A point representing a vector in the cross flow direction, never null.
    • crossFlowUnitVector

      Point2DDouble crossFlowUnitVector(double magnitude)
      A Point2DDouble representing a unit vector in the cross flow direction, scaled to the given magnitude.
      Parameters:
      magnitude - The magnitude of the vector to create. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the cross flow direction, never null.
    • crossFlowVector

      Point2DDouble crossFlowVector()
      A Point2DDouble representing a vector in the cross flow direction, with a magnitude equal to the cross flow direction spacing.
      Returns:
      A point representing a vector in the cross flow direction, never null.
    • crossFlowVector

      Point2DDouble crossFlowVector(double scalingFactor)
      A Point2DDouble representing a vector in the cross flow direction, with a magnitude equal to the cross flow direction spacing scaled by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the cross flow direction, never null.
    • data

      Gets the data store that provides access to custom data associated with the current BPMN model context. Can be used, for example, as a generic way to cache data temporarily during the BPMN model creation process. All data will be discarded after the BPMN model was created.
      Returns:
      The generic data store for this context, never null.
    • elementFactory

      de.xima.bpmn_model.api.model.BpmnElementFactory elementFactory()
      Contextual factory for creating BPMN elements. This is a wrapper around the underlying factory that ensures all created elements will appear in IStructuredBpmnModelPart.ownedBpmnElements().
      Returns:
      The BPMN element factory.
    • environment

      Gets the store to access various data from the environment, such as entities that might be referenced by the workflow, e.g. the client or form files.
      Returns:
      The store providing access to environmental data, never null.
    • flowAnalysis

      IWorkflowFlowAnalysis flowAnalysis()
      The flow analysis of all processing chains in the workflow.
      Returns:
      The flow analysis of all processing chains in the workflow, never null.
    • flowAxis

      ECartesianAxis2D flowAxis()
      The flow axis, i.e. the axis of the flowDirection.
      Returns:
      The flow axis, never null.
    • flowDirection

      ECardinalDirection2D flowDirection()
      The direction of the flow indicating how BPMN elements are laid out in the diagram. This is the same as layoutSettings().direction().
      Returns:
      The direction of the flow, never null.
    • flowPolarity

      EAxisPolarity flowPolarity()
      The axis polarity of the direction of the flow indicating how BPMN elements are laid out in the diagram. This is the same as layoutSettings().direction() .polarity().
      Returns:
      The direction of the flow, never null.
    • flowSpacing

      double flowSpacing()
      Gets the default spacing in the flowDirection().
      Returns:
      The default spacing in the flow direction.
    • flowSpacing

      double flowSpacing(double scalingFactor)
      Gets the default spacing in the flowDirection(), multiplied by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply to the default spacing.
      Returns:
      The default spacing in the flow direction, scaled by the given factor.
    • flowUnitVector

      Point2DDouble flowUnitVector()
      A Point2DDouble representing a unit vector in the flow direction, with a magnitude of 1.
      Returns:
      A point representing a vector in the flow direction, never null.
    • flowUnitVector

      Point2DDouble flowUnitVector(double magnitude)
      A Point2DDouble representing a unit vector in the flow direction, scaled to the given magnitude.
      Parameters:
      magnitude - The magnitude of the vector to create. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the flow direction, never null.
    • flowVector

      Point2DDouble flowVector()
      A Point2DDouble representing a vector in the flow direction, with a magnitude equal to the flow direction spacing.
      Returns:
      A point representing a vector in the flow direction, never null.
    • flowVector

      Point2DDouble flowVector(double scalingFactor)
      A Point2DDouble representing a vector in the flow direction, with a magnitude equal to the flow direction spacing, scaled by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the flow direction, never null.
    • layoutSettings

      IWorkflowBpmnLayoutSettings layoutSettings()
      Gets the layout settings that affect how the BPMN diagram for the workflow is created.
      Returns:
      The layout settings for the BPMN diagram, never null.
    • layouter

      Gets the layout helper that can be used to lay out the BPMN diagram, such as aligning the parts of a workflow node in a sequence.
      Returns:
      The layout helper for the BPMN diagram, never null.
    • localization

      The object providing access to the localization of the BPMN model.
      Returns:
      The localization object for the BPMN model, never null.
    • modelNode

      Models the given node as a BPMN model part. Usually you'd call this method for the children of a node, then assemble the parts into a single BPMN model part. IStructuredBpmnModelPart.childParts() should contain the modeled children.
      Parameters:
      node - The node to model.
      Returns:
      The BPMN model part for the given node, never null if the node is not null. Null when the given node is null.
    • modelProcess

      Models the given process as a BPMN model part.
      Parameters:
      process - The process to model.
      Returns:
      The BPMN model part for the given task, never null.
    • modelTask

      Models the given task as a BPMN model part. Usually you'd call this method when modeling a WorkflowProcess, the combine the parts for all tasks together and assemble the parts into a single BPMN model part.
      Parameters:
      task - The task to model.
      Returns:
      The BPMN model part for the given task, never null.
    • modelTrigger

      Models the given trigger as a BPMN model part. Usually you'd call this method when modeling a WorkflowTask, the combine the trigger with the node to assemble the parts into a single BPMN model part.
      Parameters:
      node - The trigger to model.
      Returns:
      The BPMN model part for the given trigger, never null.
    • negativeCrossFlowDirection

      ECardinalDirection2D negativeCrossFlowDirection()
      The cross flow axis in negative direction.
      Returns:
      The negative cross flow direction, never null.
    • negativeFlowDirection

      ECardinalDirection2D negativeFlowDirection()
      The flow axis in negative direction.
      Returns:
      The negative flow direction, never null.
    • positiveCrossFlowDirection

      ECardinalDirection2D positiveCrossFlowDirection()
      The cross flow axis in positive direction.
      Returns:
      The positive cross flow direction, never null.
    • positiveFlowDirection

      ECardinalDirection2D positiveFlowDirection()
      The flow axis in positive direction.
      Returns:
      The positive flow direction, never null.
    • reverseCrossFlowDirection

      ECardinalDirection2D reverseCrossFlowDirection()
      Returns:
      The reverse cross flow direction, never null.
    • reverseCrossFlowPolarity

      EAxisPolarity reverseCrossFlowPolarity()
      Returns:
      The reverse cross flow polarity, never null.
    • reverseCrossFlowUnitVector

      Point2DDouble reverseCrossFlowUnitVector()
      A Point2DDouble representing a unit vector in the reverse cross flow direction, with a magnitude of 1.
      Returns:
      A point representing a vector in the reverse cross flow direction, never null.
    • reverseCrossFlowUnitVector

      Point2DDouble reverseCrossFlowUnitVector(double magnitude)
      A Point2DDouble representing a unit vector in the reverse cross flow direction, scaled to the given magnitude.
      Parameters:
      magnitude - The magnitude of the vector to create. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the reverse cross flow direction, never null.
    • reverseCrossFlowVector

      Point2DDouble reverseCrossFlowVector()
      A Point2DDouble representing a vector in the reverse cross flow direction, with a magnitude equal to the cross flow direction spacing.
      Returns:
      A point representing a vector in the reverse cross flow direction, never null.
    • reverseCrossFlowVector

      Point2DDouble reverseCrossFlowVector(double scalingFactor)
      A Point2DDouble representing a vector in the reverse cross flow direction, with a magnitude equal to the cross flow direction spacing, scaled by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the reverse cross flow direction, never null.
    • reverseFlowDirection

      ECardinalDirection2D reverseFlowDirection()
      Returns:
      The reverse flow direction, never null.
    • reverseFlowPolarity

      EAxisPolarity reverseFlowPolarity()
      Returns:
      The reverse flow polarity, never null.
    • reverseFlowUnitVector

      Point2DDouble reverseFlowUnitVector()
      A Point2DDouble representing a unit vector in the reverse flow direction, with a magnitude of 1.
      Returns:
      A point representing a vector in the reverse flow direction, never null.
    • reverseFlowUnitVector

      Point2DDouble reverseFlowUnitVector(double magnitude)
      A Point2DDouble representing a unit vector in the reverse flow direction, scaled to the given magnitude.
      Parameters:
      magnitude - The magnitude of the vector to create. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the reverse flow direction, never null.
    • reverseFlowVector

      Point2DDouble reverseFlowVector()
      A Point2DDouble representing a vector in the reverse flow direction, with a magnitude equal to the flow direction spacing.
      Returns:
      A point representing a vector in the reverse flow direction, never null.
    • reverseFlowVector

      Point2DDouble reverseFlowVector(double scalingFactor)
      A Point2DDouble representing a vector in the reverse flow direction, with a magnitude equal to the flow direction spacing, scaled by the given scaling factor.
      Parameters:
      scalingFactor - The scaling factor to apply. If negative, the vector will point in the opposite direction.
      Returns:
      A point representing a vector in the reverse flow direction, never null.
    • shouldRenderTask

      boolean shouldRenderTask(WorkflowTask task)
      Whether the given task should be rendered in the BPMN diagram. If false, the task should be omitted from the BPMN diagram.
      Parameters:
      task - The task to check.
      Returns:
      True if the task should be rendered, false if it should be omitted.
    • spacing

      double spacing(ECardinalDirection2D side)
      Gets the default spacing for the given side. Returns either flowDirectionSpacing or crossFlowDirectionSpacing, depending on the given side.
      Parameters:
      side - The side for which to get the spacing.
      Returns:
      The spacing for the given side, never null.
    • spacing

      double spacing(ECartesianAxis2D axis)
      Gets the default spacing for the given side. Returns either flowDirectionSpacing or crossFlowDirectionSpacing, depending on the given axis.
      Parameters:
      axis - The axis for which to get the spacing.
      Returns:
      The spacing for the given side, never null.
    • workflowElements

      IWorkflowElementStore workflowElements()
      Gets the store to access all triggers and nodes in the workflow for which the BPMN model is created.
      Returns:
      The store providing access to triggers and nodes, never null.