Removing dependent relationships between process instances by using JavaScript
Use a JavaScript API to remove dependent relationships between two process instances.
Removing a dependent relationship
To remove a dependent relationship from the current process instance to a dependent process instance, complete the following steps:- Decide whether you want to check the user's authorization.
- Get the instance ID of the dependent instance.
- Remove the relationship by using the removeDependentProcessRelationship() method,
which has the following signature:
TWProcessInstance.removeDependentProcessRelationship(processInstanceID, checkAuthorization)
- processInstanceID
- The process instance ID of the dependent process instance.
- checkAuthorization
- A Boolean value that the method uses to determine whether it should check the user's authorization. The default is false.
TWProcessInstance.removeDependentProcessRelationship(processInstanceID, true);
Removing a dependency relationship
To remove a relationship between the current instance and the instance that it depends on, complete the following steps:- Decide whether you want to check the user's authorization.
- Get the instance ID of the process instance that the current instance depends on.
- Remove the relationship by using the removeDependedOnProcessRelationship() method,
which has the following signature:
TWProcessInstance.removeDependedOnProcessRelationship(processInstanceID, checkAuthorization);
- processInstanceID
- The process instance ID of the instance that the current instance depends on.
- checkAuthorization
- A Boolean value that the method uses to determine whether it should check the user's authorization. The default is false.
TWProcessInstance.removeDependedOnProcessRelationship(processInstanceID, true);