Class AServiceTaskBpmnModeler<Model>

    • Constructor Detail

      • AServiceTaskBpmnModeler

        public AServiceTaskBpmnModeler()
    • Method Detail

      • createDetails

        protected String createDetails​(IModelWorkflowNodeParams<Model> params,
                                       IWorkflowBpmnModelContext context,
                                       IBoundMessageLocalizer localizer)
        Creates additional details regarding the configuration of the service task. These details are included in the text annotation of the service task, usually placed above the rectangle that represents the task in the BPMN diagram.
        Parameters:
        params - The parameters with the node to model, as provided by the workflow engine.
        context - The BPMN model context, as provided by the workflow engine.
        localizer - The localizer to use for localizing the name. This is the same as the boundMessageLocalizer obtained from the context.
        Returns:
        The details of the service task in the BPMN model.
      • createIoSpecification

        protected de.xima.bpmn_model.api.element.bpmn.data.InputOutputSpecification createIoSpecification​(IModelWorkflowNodeParams<Model> params,
                                                                                                          IWorkflowBpmnModelContext context)
        Creates the input/output specification for the service task. This is used to define the input and output data of the service task, such as data objects that are read or written by the task. The default implementation creates an empty specification with a single (1) empty InputSet and single (1) empty OutputSet.

        When you override this method, you can either create your own IO specification from scratch, or call this super implementation and populate the returned InputOutputSpecification with your data.

        Parameters:
        params - The parameters with the node to model, as provided by the workflow engine.
        context - The BPMN model context, as provided by the workflow engine.
        Returns:
        The input/output specification for the service task, never null.
      • createName

        protected abstract String createName​(IModelWorkflowNodeParams<Model> params,
                                             IWorkflowBpmnModelContext context,
                                             IBoundMessageLocalizer localizer)
        Creates the name of the service task in the BPMN model. This is the name of the service task, usually placed inside the rectangle that represents the task in the BPMN diagram.

        The rectangle always has a defined width and height, independent of the name's length, so the name should be short and concise. If the name is too long, it may be truncated in the BPMN diagram. As a best practice, try not to include any user-configurable details in the name, simply use a static name that describes the type of action. Details about the action should be included in the task's annotation, see createDetails.

        By convention, name a task using an object and a verb in the infinitive. By doing this, you consistently describe what you do with an object. For example:

        • Review draft
        • Check invoice
        • Announce job
        Parameters:
        params - The parameters with the node to model, as provided by the workflow engine.
        context - The BPMN model context, as provided by the workflow engine.
        localizer - The localizer to use for localizing the name. This is the same as the boundMessageLocalizer obtained from the context.
        Returns:
        The name of the service task in the BPMN model.
      • createTaskLayoutPostProcessor

        protected AServiceTaskBpmnModeler.IStatefulTaskLayoutPostProcessor createTaskLayoutPostProcessor​(IModelWorkflowNodeParams<Model> params,
                                                                                                         IWorkflowBpmnModelContext context)
        Creates a post-processor for the service task layout. This allows you to enrich the service task with additional data and BPMN elements, such as adding data objects that represent the input or output of the service task. The default implementation returns a no-op post-processor that does enrich the task in any way.

        Usually you should create a new instance for each call to this method. This instance does not need to be thread-safe and is used only for the duration of a single modeling operation. The instance may store state that is accessed by its various methods.

        Parameters:
        params - The parameters with the node to model, as provided by the workflow engine.
        context - The BPMN model context, as provided by the workflow engine.
        Returns:
        A post-processor for the service task layout, never null. The default implementation returns a no-op that does not enrich the service task in any way.