Interface IWorkflowBpmnModelContext
-
public interface IWorkflowBpmnModelContextInterface 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:
IWorkflowProcessBpmnModeler,IWorkflowTaskBpmnModeler,IWorkflowTriggerBpmnModeler,IWorkflowNodeBpmnModeler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IBpmnElementStorebpmnElements()Gets the store to access all BPMN element in the BPMN model being created.IWorkflowBpmnColorizercolorizer()Gets the colorizer with helper methods for apply color to BPMN shapes, edges, and labels.IBpmnCompatibilitySettingscompatibilitySettings()Compatibility-related settings with various BPMN tools, used when creating a BPMN diagram.ECartesianAxis2DcrossFlowAxis()The cross flow axis, i.e.ECardinalDirection2DcrossFlowDirection()The cross flow direction, which is theflowDirectionrotated by 90 degrees anti-clockwise.EAxisPolaritycrossFlowPolarity()Theaxis polarityof the cross flow direction, which is theflowDirectionrotated by 90 degrees anti-clockwise.doublecrossFlowSpacing()Gets the default spacing in thecrossFlowDirection().doublecrossFlowSpacing(double scalingFactor)Gets the default spacing in thecrossFlowDirection(), multiplied by the given scaling factor.Point2DDoublecrossFlowUnitVector()APoint2DDoublerepresenting a unit vector in thecross flow direction, with a magnitude of 1.Point2DDoublecrossFlowUnitVector(double magnitude)APoint2DDoublerepresenting a unit vector in thecross flow direction, scaled to the given magnitude.Point2DDoublecrossFlowVector()APoint2DDoublerepresenting a vector in thecross flow direction, with a magnitude equal to thecross flow direction spacing.Point2DDoublecrossFlowVector(double scalingFactor)APoint2DDoublerepresenting a vector in thecross flow direction, with a magnitude equal to thecross flow direction spacingscaled by the given scaling factor.IWorkflowBpmnDataStoredata()Gets the data store that provides access to custom data associated with the current BPMN model context.de.xima.bpmn_model.api.model.BpmnElementFactoryelementFactory()Contextual factory for creating BPMN elements.IWorkflowBpmnEnvironmentStoreenvironment()Gets the store to access various data from the environment, such as entities that might be referenced by the workflow, e.g.IWorkflowFlowAnalysisflowAnalysis()The flow analysis of allprocessing chainsin the workflow.ECartesianAxis2DflowAxis()The flow axis, i.e.ECardinalDirection2DflowDirection()The direction of the flow indicating how BPMN elements are laid out in the diagram.EAxisPolarityflowPolarity()Theaxis polarityof the direction of the flow indicating how BPMN elements are laid out in the diagram.doubleflowSpacing()Gets the default spacing in theflowDirection().doubleflowSpacing(double scalingFactor)Gets the default spacing in theflowDirection(), multiplied by the given scaling factor.Point2DDoubleflowUnitVector()APoint2DDoublerepresenting a unit vector in theflow direction, with a magnitude of 1.Point2DDoubleflowUnitVector(double magnitude)APoint2DDoublerepresenting a unit vector in theflow direction, scaled to the given magnitude.Point2DDoubleflowVector()APoint2DDoublerepresenting a vector in theflow direction, with a magnitude equal to theflow direction spacing.Point2DDoubleflowVector(double scalingFactor)APoint2DDoublerepresenting a vector in theflow direction, with a magnitude equal to theflow direction spacing, scaled by the given scaling factor.IWorkflowBpmnLayouterlayouter()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.IWorkflowBpmnLayoutSettingslayoutSettings()Gets the layout settings that affect how the BPMN diagram for the workflow is created.IWorkflowBpmnLocalizationlocalization()The object providing access to the localization of the BPMN model.IStructuredBpmnModelPartmodelNode(WorkflowNode node)Models the given node as a BPMN model part.IStructuredBpmnModelPartmodelProcess(WorkflowProcess process)Models the given process as a BPMN model part.IStructuredBpmnModelPartmodelTask(WorkflowTask task)Models the given task as a BPMN model part.IStructuredBpmnModelPartmodelTrigger(WorkflowTrigger node)Models the given trigger as a BPMN model part.ECardinalDirection2DnegativeCrossFlowDirection()Thecross flow axisinnegativedirection.ECardinalDirection2DnegativeFlowDirection()ECardinalDirection2DpositiveCrossFlowDirection()Thecross flow axisinpositivedirection.ECardinalDirection2DpositiveFlowDirection()ECardinalDirection2DreverseCrossFlowDirection()Thereverseof thecross flow direction.EAxisPolarityreverseCrossFlowPolarity()Thepolarityof thecross flow direction.Point2DDoublereverseCrossFlowUnitVector()APoint2DDoublerepresenting a unit vector in thereverse cross flow direction, with a magnitude of 1.Point2DDoublereverseCrossFlowUnitVector(double magnitude)APoint2DDoublerepresenting a unit vector in thereverse cross flow direction, scaled to the given magnitude.Point2DDoublereverseCrossFlowVector()APoint2DDoublerepresenting a vector in thereverse cross flow direction, with a magnitude equal to thecross flow direction spacing.Point2DDoublereverseCrossFlowVector(double scalingFactor)APoint2DDoublerepresenting a vector in thereverse cross flow direction, with a magnitude equal to thecross flow direction spacing, scaled by the given scaling factor.ECardinalDirection2DreverseFlowDirection()Thereverseof theflow direction.EAxisPolarityreverseFlowPolarity()Thepolarityof theflow direction.Point2DDoublereverseFlowUnitVector()APoint2DDoublerepresenting a unit vector in thereverse flow direction, with a magnitude of 1.Point2DDoublereverseFlowUnitVector(double magnitude)APoint2DDoublerepresenting a unit vector in thereverse flow direction, scaled to the given magnitude.Point2DDoublereverseFlowVector()APoint2DDoublerepresenting a vector in thereverse flow direction, with a magnitude equal to theflow direction spacing.Point2DDoublereverseFlowVector(double scalingFactor)APoint2DDoublerepresenting a vector in thereverse flow direction, with a magnitude equal to theflow direction spacing, scaled by the given scaling factor.booleanshouldRenderTask(WorkflowTask task)Whether the given task should be rendered in the BPMN diagram.doublespacing(ECardinalDirection2D side)Gets the default spacing for the given side.doublespacing(ECartesianAxis2D axis)Gets the default spacing for the given side.IWorkflowElementStoreworkflowElements()Gets the store to access all triggers and nodes in the workflow for which the BPMN model is created.
-
-
-
Method Detail
-
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
IWorkflowBpmnColorizer 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. theaxisof thecrossFlowDirection.- Returns:
- The cross flow axis, never null.
-
crossFlowDirection
ECardinalDirection2D crossFlowDirection()
The cross flow direction, which is theflowDirectionrotated by 90 degrees anti-clockwise.- Returns:
- The cross flow direction, never null.
-
crossFlowPolarity
EAxisPolarity crossFlowPolarity()
Theaxis polarityof the cross flow direction, which is theflowDirectionrotated by 90 degrees anti-clockwise.- Returns:
- The cross flow polarity, never null.
-
crossFlowSpacing
double crossFlowSpacing()
Gets the default spacing in thecrossFlowDirection().- Returns:
- The default spacing in the cross flow direction.
-
crossFlowSpacing
double crossFlowSpacing(double scalingFactor)
Gets the default spacing in thecrossFlowDirection(), 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()
APoint2DDoublerepresenting a unit vector in thecross 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)
APoint2DDoublerepresenting a unit vector in thecross 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()
APoint2DDoublerepresenting a vector in thecross flow direction, with a magnitude equal to thecross flow direction spacing.- Returns:
- A point representing a vector in the cross flow direction, never null.
-
crossFlowVector
Point2DDouble crossFlowVector(double scalingFactor)
APoint2DDoublerepresenting a vector in thecross flow direction, with a magnitude equal to thecross flow direction spacingscaled 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
IWorkflowBpmnDataStore 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 inIStructuredBpmnModelPart.ownedBpmnElements().- Returns:
- The BPMN element factory.
-
environment
IWorkflowBpmnEnvironmentStore environment()
Gets the store to access various data from the environment, such as entities that might be referenced by the workflow, e.g. theclientorform files.- Returns:
- The store providing access to environmental data, never null.
-
flowAnalysis
IWorkflowFlowAnalysis flowAnalysis()
The flow analysis of allprocessing chainsin the workflow.- Returns:
- The flow analysis of all
processing chainsin the workflow, never null.
-
flowAxis
ECartesianAxis2D flowAxis()
The flow axis, i.e. theaxisof theflowDirection.- 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 aslayoutSettings().direction().- Returns:
- The direction of the flow, never null.
-
flowPolarity
EAxisPolarity flowPolarity()
Theaxis polarityof the direction of the flow indicating how BPMN elements are laid out in the diagram. This is the same aslayoutSettings().direction().polarity().- Returns:
- The direction of the flow, never null.
-
flowSpacing
double flowSpacing()
Gets the default spacing in theflowDirection().- Returns:
- The default spacing in the flow direction.
-
flowSpacing
double flowSpacing(double scalingFactor)
Gets the default spacing in theflowDirection(), 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()
APoint2DDoublerepresenting a unit vector in theflow direction, with a magnitude of 1.- Returns:
- A point representing a vector in the flow direction, never null.
-
flowUnitVector
Point2DDouble flowUnitVector(double magnitude)
APoint2DDoublerepresenting a unit vector in theflow 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()
APoint2DDoublerepresenting a vector in theflow direction, with a magnitude equal to theflow direction spacing.- Returns:
- A point representing a vector in the flow direction, never null.
-
flowVector
Point2DDouble flowVector(double scalingFactor)
APoint2DDoublerepresenting a vector in theflow direction, with a magnitude equal to theflow 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
IWorkflowBpmnLayouter 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
IWorkflowBpmnLocalization localization()
The object providing access to the localization of the BPMN model.- Returns:
- The localization object for the BPMN model, never null.
-
modelNode
IStructuredBpmnModelPart modelNode(WorkflowNode node)
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
IStructuredBpmnModelPart modelProcess(WorkflowProcess process)
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
IStructuredBpmnModelPart modelTask(WorkflowTask task)
Models the given task as a BPMN model part. Usually you'd call this method when modeling aWorkflowProcess, 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
IStructuredBpmnModelPart modelTrigger(WorkflowTrigger node)
Models the given trigger as a BPMN model part. Usually you'd call this method when modeling aWorkflowTask, 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()
Thecross flow axisinnegativedirection.- Returns:
- The negative cross flow direction, never null.
-
negativeFlowDirection
ECardinalDirection2D negativeFlowDirection()
- Returns:
- The negative flow direction, never null.
-
positiveCrossFlowDirection
ECardinalDirection2D positiveCrossFlowDirection()
Thecross flow axisinpositivedirection.- Returns:
- The positive cross flow direction, never null.
-
positiveFlowDirection
ECardinalDirection2D positiveFlowDirection()
- Returns:
- The positive flow direction, never null.
-
reverseCrossFlowDirection
ECardinalDirection2D reverseCrossFlowDirection()
Thereverseof thecross flow direction.- Returns:
- The reverse cross flow direction, never null.
-
reverseCrossFlowPolarity
EAxisPolarity reverseCrossFlowPolarity()
Thepolarityof thecross flow direction.- Returns:
- The reverse cross flow polarity, never null.
-
reverseCrossFlowUnitVector
Point2DDouble reverseCrossFlowUnitVector()
APoint2DDoublerepresenting a unit vector in thereverse 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)
APoint2DDoublerepresenting a unit vector in thereverse 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()
APoint2DDoublerepresenting a vector in thereverse cross flow direction, with a magnitude equal to thecross flow direction spacing.- Returns:
- A point representing a vector in the reverse cross flow direction, never null.
-
reverseCrossFlowVector
Point2DDouble reverseCrossFlowVector(double scalingFactor)
APoint2DDoublerepresenting a vector in thereverse cross flow direction, with a magnitude equal to thecross 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()
Thereverseof theflow direction.- Returns:
- The reverse flow direction, never null.
-
reverseFlowPolarity
EAxisPolarity reverseFlowPolarity()
Thepolarityof theflow direction.- Returns:
- The reverse flow polarity, never null.
-
reverseFlowUnitVector
Point2DDouble reverseFlowUnitVector()
APoint2DDoublerepresenting a unit vector in thereverse 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)
APoint2DDoublerepresenting a unit vector in thereverse 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()
APoint2DDoublerepresenting a vector in thereverse flow direction, with a magnitude equal to theflow direction spacing.- Returns:
- A point representing a vector in the reverse flow direction, never null.
-
reverseFlowVector
Point2DDouble reverseFlowVector(double scalingFactor)
APoint2DDoublerepresenting a vector in thereverse flow direction, with a magnitude equal to theflow 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 eitherflowDirectionSpacingorcrossFlowDirectionSpacing, 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 eitherflowDirectionSpacingorcrossFlowDirectionSpacing, 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.
-
-