Interface WorkflowPublisher
-
public interface WorkflowPublisherPublishes 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)andaddAllPublicationSpecs(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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAllPublicationSpecs(Collection<PublicationSpec> aPublicationSpecs)Adds a collection of publication specifications.voidaddPublicationSpec(PublicationSpec aPublicationSpec)Adds a publication specification.Collection<PublicationSpec>getPublicationSpecs()Gets the publication specifications.UserMessagegetVersionDescription()Gets the description of the version associated with the publication.UserMessagegetVersionLabel()Gets the label of the version associated with the publication.VersionKeypublish()Publishes the defined workflow models according to the publication specifications.voidsetVersionDescription(UserMessage aVersionDescription)Sets the description of the version associated with the publication.voidsetVersionLabel(UserMessage aVersionLabel)Sets the label of the version associated with the publication.
-
-
-
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.
-
getPublicationSpecs
Collection<PublicationSpec> getPublicationSpecs()
Gets the publication specifications.
-
addPublicationSpec
void addPublicationSpec(PublicationSpec aPublicationSpec) throws OperationException
Adds a publication specification.This specification selects the workflow models to be published and specifies the
publication modeand 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 modeand 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.
-
publish
VersionKey publish() throws OperationException
Publishes the defined workflow models according to the publication specifications.- Throws:
OperationException
-
-