changeDeploymentTenantId

EXPERIMENTAL FEATURE!
Changes the tenant identifier of a deployment to match the given tenant identifier.
This change will cascade to any related entity:
- process definitions related to the deployment
- process instances related to those process definitions
- executions related to those process instances
- tasks related to those process instances
- jobs related to the process definitions and process instances
This method can be used in the case that there was no tenant identifier set
on the deployment or those entities before.
This method can be used to remove a tenant identifier from the
deployment and related entities (simply pass null).
Important: no optimistic locking will be done while executing the tenant identifier change!
This is an experimental feature, mainly because it WILL NOT work
properly in a clustered environment without special care:
suppose some process instance is in flight. The process definition is in the
process definition cache. When a task or job is created when continuing the process
instance, the process definition cache will be consulted to get the process definition
and from it the tenant identifier. Since it's cached, it will not be the new tenant identifier.
This method does clear the cache for this engineinstance , but it will not be cleared
on other nodes in a cluster (unless using a shared process definition cache).

Parameters:

deploymentId - The id of the deployment of which the tenant identifier will be changed.

createNativeDeploymentQuery

suspendProcessDefinitionById

Suspends the process definition with the given id.
If a process definition is in state suspended, it will not be possible to start new process instances
based on the process definition.
Note: all the process instances of the process definition will still be active
(ie. not suspended)!

suspendProcessDefinitionByKey

Suspends the all process definitions with the given key (= id in the bpmn20.xml file).
If a process definition is in state suspended, it will not be possible to start new process instances
based on the process definition.
Note: all the process instances of the process definition will still be active
(ie. not suspended)!

suspendProcessDefinitionByKey

Suspends the all process definitions with the given key (= id in the bpmn20.xml file).
If a process definition is in state suspended, it will not be possible to start new process instances
based on the process definition.

Parameters:

suspendProcessInstances - If true, all the process instances of the provided process definition
will be suspended too.

suspensionDate - The date on which the process definition will be suspended. If null, the
process definition is suspended immediately.
Note: The job executor needs to be active to use this!

getBpmnModel

Returns the BpmnModel corresponding with the process definition with
the provided process definition id. The BpmnModel is a pojo versions
of the BPMN 2.0 xml and can be used to introspect the process definition
using regular Java.

validateProcess

Validates the given process definition against the rules for executing a process definition
on the Activiti engine.
To create such a BpmnModel from a String, following code may be used:
XMLInputFactory xif = XMLInputFactory.newInstance();
InputStreamReader in = new InputStreamReader(new ByteArrayInputStream(myProcess.getBytes()), "UTF-8"); // Change to other streams for eg from classpath
XMLStreamReader xtr = xif.createXMLStreamReader(in);
bpmnModel = new BpmnXMLConverter().convertToBpmnModel(xtr);