Redeploy Deployment
Re-deploys an existing deployment.
The deployment resources to re-deploy can be restricted by using the properties resourceIds
or resourceNames
. If no deployment resources to re-deploy are passed then all existing resources of the given deployment are re-deployed.
Security Consideration
Deployments can contain custom code in form of scripts or EL expressions to customize process behavior. This may be abused for remote execution of arbitrary code. See the section on security considerations for custom code in the user guide for details.
Method
POST /deployment/{id}/redeploy
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the deployment to re-deploy. |
Request Body
A JSON object with the following properties:
Name | Description |
---|---|
resourceIds | A list of deployment resource ids to re-deploy. |
resourceNames | A list of deployment resource names to re-deploy. |
source | Sets the source of the deployment. |
Result
A JSON object corresponding to the DeploymentWithDefinitions
interface in the engine.
Its properties are as follows:
Name | Value | Description |
---|---|---|
links | List | Link to the newly created deployment with method , href and rel . |
id | String | The id of the deployment. |
name | String | The name of the deployment. |
source | String | The source of the deployment. |
tenantId | String | The tenant id of the deployment. |
deploymentTime | String | The time when the deployment was created. |
deployedProcessDefinitions | Object | A JSON Object containing a property for each of the process definitions, which are successfully deployed with that deployment. The key is the process definition id, the value is a JSON Object corresponding to the process definition, which is defined in the Process Definition resource. |
deployedCaseDefinitions | Object | A JSON Object containing a property for each of the case definitions, which are successfully deployed with that deployment. The key is the case definition id, the value is a JSON Object corresponding to the case definition, which is defined in the Case Definition resource. |
deployedDecisionDefinitions | Object | A JSON Object containing a property for each of the decision definitions, which are successfully deployed with that deployment. The key is the decision definition id, the value is a JSON Object corresponding to the decision definition, which is defined in the Decision Definition resource. |
deployedDecisionRequirementsDefinitions | Object | A JSON Object containing a property for each of the decision requirements definitions, which are successfully deployed with that deployment. The key is the decision requirements definition id, the value is a JSON Object corresponding to the decision requirements definition, which is defined in the Decision Requirements Definition resource. |
Response Codes
Code | Media type | Description |
---|---|---|
200 | application/json | Request successful. |
404 | application/json | Deployment or a deployment resource for the given deployment does not exist. See the Introduction for the error response format. |
Example
Request
POST /deployment/anDeploymentId/redeploy
Request Body:
{
"resourceIds": [ "aResourceId" ],
"resourceNames": [ "aResourceName" ],
"source" : "cockpit"
}
Response
Status 200.
{
"links": [
{
"method": "GET",
"href": "http://localhost:38080/rest-test/deployment/aDeploymentId",
"rel": "self"
}
],
"id": "aDeploymentId",
"name": "aName",
"source": "cockpit",
"deploymentTime": "2015-10-13T13:59:43",
"tenantId": null,
"deployedProcessDefinitions": {
"aProcDefId": {
"id": "aProcDefId",
"key": "aKey",
"category": "aCategory",
"description": "aDescription",
"name": "aName",
"version": 42,
"resource": "aResourceName",
"deploymentId": "aDeploymentId",
"diagram": "aResourceName.png",
"suspended": true,
"tenantId": null,
"versionTag": null
}
},
"deployedCaseDefinitions": null,
"deployedDecisionDefinitions": null,
"deployedDecisionRequirementsDefinitions": null
}