Interface IWorkflowNodeBpmnModeler<Model>

    • Method Detail

      • modelNode

        void modelNode​(IModelWorkflowNodeParams<Model> params,
                       IWorkflowBpmnModelContext context)
        Models a WorkflowNode in the BPMN diagram. This method is called once for the root node of each WorkflowTask in the workflow. Implementations for nodes that have children should call context.modelNode(node) on their child nodes if needed.

        The responsibility of each modeler is to access the provided params.partBuilder() and add the appropriate data to that builder. That data then gets used to create a IStructuredBpmnModelPart for the node, see the class-level documentation of IStructuredBpmnModelPart for more info.

        When modelling a workflow node as BPMN, the usual approach is to create a nested tree of alignment items, making use of the layouter. This tree then gets resolved to a flat map. Finally, the various method on IFlattenedAlignmentItemMap can be used to create the BPMN shapes, BPMN edges and sequence flows.

        Parameters:
        params - The parameters for the modeler, containing the WorkflowNode to model and its deserialized custom properties model, as well as the part builder to fill with data.
        context - The context for creating the BPMN diagram, its lifecycle starts when the conversion (of the workflow to a BPMN diagram) starts and ends when the conversion ends. The context lets you access various helper methods such as the layouter() or colorizer, and also provides access to all global data such as all triggers and nodes in the workflow.