Interface WorkflowPublisher


  • public interface WorkflowPublisher
    Publishes one or more workflow.

    If no version label is defined, a default one is automatically generated for the publication.

    It is possible to publish one or more workflow models by using the addPublicationSpec(PublicationSpec) and addAllPublicationSpecs(Collection) methods.

    Once the publisher object is correctly set up, the publish() method is used to publish the workflows.

    Limitation: it is not possible to publish several workflows in a single publication if one of them contains sub-workflows (same behavior as the publication by the user interface). For this use case, it is necessary to create several WorkflowPublisher (and thus several versions).

    Since:
    5.7.1 but public in 6.1.3
    See Also:
    WorkflowEngine.getWorkflowPublisher()
    • Method Detail

      • setVersionLabel

        void setVersionLabel​(UserMessage aVersionLabel)
        Sets the label of the version associated with the publication.

        This version is created from the dataspace that contains all the workflow models.

      • setVersionDescription

        void setVersionDescription​(UserMessage aVersionDescription)
        Sets the description of the version associated with the publication.

        This version is created from the dataspace that contains all the workflow models.

      • getVersionLabel

        UserMessage getVersionLabel()
        Gets the label of the version associated with the publication.

        This version is created from the dataspace that contains all the workflow models.

      • getVersionDescription

        UserMessage getVersionDescription()
        Gets the description of the version associated with the publication.

        This version is created from the dataspace that contains all the workflow models.

      • addPublicationSpec

        void addPublicationSpec​(PublicationSpec aPublicationSpec)
                         throws OperationException
        Adds a publication specification.

        This specification selects the workflow models to be published and specifies the publication mode and the publication name.

        Throws:
        OperationException -
        • If the name is already used for a new publication,
        • If the workflow model has no step,
        • If the workflow model contains sub workflows and others publication specifications exists.
      • addAllPublicationSpecs

        void addAllPublicationSpecs​(Collection<PublicationSpec> aPublicationSpecs)
                             throws OperationException
        Adds a collection of publication specifications.

        Each specification selects the workflow models to be published and specifies the publication mode and the publication name.

        Throws:
        OperationException -
        • If the name is already used for a new publication,
        • If the workflow model has no step,
        • If the workflow model contains sub workflows and others publication specifications exists.