To terminate a process instance, perform the following
tasks:
Include project files.
Create a ProcessManager Client API object.
Terminate the process instance.
Include project files
Include necessary files into your development
project. If you are creating a client application by using Java,
include the necessary JAR files. If you are using web services,
make sure that you include the proxy files.
Create a ProcessManager Client API object
Before you can programmatically
terminate a process instance, you must create a ProcessManager object.
Terminate the process instance
To terminate a process instance,
ensure that it is a valid process instance. If you attempt to terminate
a process instance that does not exist or was previously terminated,
a run-time exception is generated. To successfully terminate a process
instance, you require the process invocation identifier that can
be obtained when invoking a long-lived process by using the Invocation
API.