IBM V2.3 Automobile Accessories User Manual


 
Chapter 5. Starting and Deleting Process Instances
The most obvious way to start a FlowMark process is to open your process list,
copy a process template and start the instance manually. But it is probably better
to provide a simple FlowMark API program to do that. This program could be
accessible to users via an icon on their desktop, or could be called by one of your
application programs that determines the need for a process to start as the result of
some business event.
5.1 Starting Instances
If you have an application that collects many of these requests, be careful when
you decide to start many process instances. Starting 200 instances might be fine
in the middle of the night when there are no users on the system. But a program
that does this during normal working hours will likely take over the server, much to
the detriment of user response time. If you do have the need to process
accumulated queues of requests during working hours, consider programming a
delay in the creation loop to give your users a chance to get their work done.
Investigate the ExmcStartProcess API call. While doing that, consider providing the
instance name yourself. You will find that having instance-specific information in
the process instance name makes using your process list, the monitor and the audit
trail much easier. Customer name, invoice number, account number and other
information might be made part of the instance name.
5.2 Deleting Process Instances
A process instance is called “finished” when the workflow has progressed through
all defined activities to the end of the process. A process instance is called
“terminated” if the process was forced to finish by an authorized user or by the API
call ExmTerminateProcess.
Finished or terminated process instances are automatically removed from the work
lists and deleted from the database if the user who creates the process instance
has checked the checkbox “Delete finished items” in the personal data settings
notebook. It lets you define the following for each user:
Activities that have the status finished, disabled, or force-finished are
automatically deleted from the user's work list.
Process instances created by the user with the status finished or terminated
are automatically deleted from the database when they are finished or
terminated.
Whenever an instance is deleted, all activities for the process instance are deleted
from the work lists, as are all subprocesses for the process instance.
If the “Delete finished items” checkbox is not checked, you have several other
options for deleting process instances:
Delete them manually from the process list.
Have them automatically deleted by the server. after a specified interval during
a nightly database processing run
Copyright IBM Corp. 1996, 1998 9