The following functionality is provided for deployment unit support:
The method deployModel of the AdministrationService with parameters of types list of DeploymentElement and DeploymentOptions cumulates all the functionality mentioned above. This method takes a list of deployment elements, each one having one model to be deployed. The deployment options do apply to all units that are deployed within this call.
List<DeploymentInfo> deployModel(List<DeploymentElement> deploymentElements, DeploymentOptions options) throws DeploymentException;
The method returns a list of type DeploymentInfo with all deployment information, including possible errors and warnings. For each successful deploy operation, a corresponding entry is inserted into the log_entry table. For detailed information on this table, refer to section LOG_ENTRY TABLE of the chapter The Repository Model. The required permission to execute this method is deployProcessModel.
Note that it is possible to deploy an empty set of models. It is possible that this can also result in a change in the audit trail. If the PredefinedModel is not already present in the audit trail, it will be deployed in any case.
Refer to the following sections for details on classes and interfaces with deployment details:
The deployment element contains the raw deployment data, for example the content of the model file to be deployed.
public class DeploymentElement implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* The byte array containing the model definition in XPDL format.
*/
private byte[] content;
/**
* Creates a new deployment element.
*
* @param content the content of the deployment element in binary form.
*/
public DeploymentElement(byte[] content)
{
this.content = content;
}
/**
* Retrieves the content of the deployment element.
*
* @return the raw deployment data.
*/
public byte[] getContent()
{
return content;
}
}
The deployment options contains the following:
private String comment;Retrieving the deployment comment:
public String getComment()
{
return comment;
}
Setting the deployment comment:
public void setComment(String comment)
{
this.comment = comment;
}private Date validFrom;Retrieving the moment from when the deployed models will be valid, or null if there are no validity restrictions:
public Date getValidFrom()
{
return validFrom;
}
Setting the validity start time:
public void setValidFrom(Date validFrom)
{
this.validFrom = validFrom;
}private boolean ignoreWarnings;Retrieving flag to determine if the warnings should be ignored during deployment or treated like errors:
public boolean isIgnoreWarnings()
{
return ignoreWarnings;
}
Setting flag that warnings should be ignored during deployment
or be treated as errors:
public void setIgnoreWarnings(boolean ignoreWarnings)
{
this.ignoreWarnings = ignoreWarnings;
}The interface DeployedModelDescription provides the following methods to retrieve deployment information for a workflow model, like linked provider and consumer models and available implementation alternatives:
List<Long> getProviderModels() -
lists the Model OIDs of all linked Provider Models.List<Long> getConsumerModels() -
lists the Model OIDs of all linked Consumer Models.Map<String, List<ImplementationDescription>> getImplementationProcesses() -
describes all available implementation alternatives and indicates
which one is the Primary Implementation
per process interface ID.