You can terminate a process instance by using the Java
API and web service API. When terminated, a process instance no
longer performs actions. One reason to terminate a process instance
is that it is no longer applicable. Assume, for example, that a
long-lived process requires a bank manager’s input. However, because
the bank manager is not available and cannot respond to the process instance,
the process instance keeps running while waiting for the bank manager’s
input. During that time period, a potential bank customer withdraws their
mortgage application, resulting in the bank manager’s input being
unnecessary. As a result, the process instance can be terminated.
Summary of stepsTo terminate a process instance, perform the following
tasks:
Include project files.
Create a ProcessManager Client API object.
Terminate the process instance.
Include project filesInclude 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 objectBefore you can programmatically
terminate a process instance, you must create a ProcessManager object.
Terminate the process instanceTo 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.
Terminate process instances using the Java APITerminate a process instance by using the ProcessManager
API (Java):
Include project files
Include client JAR files,
such as adobe-workflow-client-sdk.jar, in your Java project’s class
path.
Create a ProcessManager Client API object
Terminate the process instance
Terminate a process
instance by invoking the ProcessManager object’s terminateProcess method
and passing a string value that specifies the process invocation
identifier value. This value can be obtained when invoking the process
by using the Invocation API.
Terminating process instances using the web service APITerminate a process instance by using the ProcessManager
API (web service):
Include project files
Create a Microsoft
.NET client assembly that consumes the ProcessManager service WSDL.
To create a proxy object that lets you invoke its operations by using
Base64 encoding, specify this WSDL definition:
http://localhost:8080/soap/services/ProcessManager?WSDL
Reference the Microsoft .NET client assembly.
Create a ProcessManager Client API object
Using the Microsoft .NET client assembly, create a ProcessManagerService object
by invoking its default constructor.
Set the ProcessManagerService object’s Credentials data member
with a System.Net.NetworkCredential value that specifies
the user name and password value.
Terminate the process instance
Terminate a process
instance by invoking the ProcessManager object’s terminateProcess method
and passing a string value that specifies the process invocation
identifier value. This value can be obtained when invoking a process
by using the Invocation API.
|
|
|