Interface IWorkflowProcessBpmnModeler


  • public interface IWorkflowProcessBpmnModeler
    Interface for modeling workflow processes in a BPMN 2.0 diagram. Used to create a BPMN diagram of the entire workflow.

    The modeler does not need to have any state and can be immutable. The modeler must be thread-safe.

    Since:
    8.4.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • modelProcess

        void modelProcess​(IModelWorkflowProcessParams params,
                          IWorkflowBpmnModelContext context)
        Models a WorkflowProcess in the BPMN diagram. This method is called once for each process of a version in the workflow. Implementations should usually call context.modelTask(task) on each of the process's tasks and align the tasks appropriately.

        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 process, see the class-level documentation of IStructuredBpmnModelPart for more info.

        When modelling a workflow process 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 WorkflowProcess to 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.