You can specify preconditions that must be met before the
activity is ready to start. Activities can start automatically after
all the preconditions are met or manually by a user after all the
preconditions are met. If you do not set any preconditions, automatic
activities start as soon as the case is launched and manual activities
must be started by a user.
About this task
Case management functions
are only available if you have IBM BPM Advanced with the Basic Case
Management feature installed.
A precondition consists of two parts, a precondition event, and
a precondition expression. The two parts together determine when
the activity starts:
- If both are defined, then when the precondition event occurs,
the precondition expression is evaluated. If the expression
evaluates to true, the activity starts.
- If there is a precondition event but no precondition expression,
the activity starts when the precondition event is met.
Note: In addition to determining when the activity first
starts, the precondition also determines when an activity that is
already started changes state. For example, from a waiting
state to a working state. See
Runtime states for activities in process applications.
Procedure
To set a precondition:
- Open the case type.
- In the case type editor, switch to Activities, and select
the activity that you want.
- Switch to the Preconditions page.
- In the Precondition Event section,
select the event that triggers the precondition expression to
be evaluated.
Precondition event |
Description |
No precondition event for this activity |
Automatic activities start as soon as the case is launched.
Manual activities must be started by a user. |
A document is filed in the case |
The activity starts when a document is added to the case. - Any document type
- The activity starts when a document is added to the case. This
option applies to all documents, including documents that
are not contained in this process application.
- Choose one or more document types
- The activity starts when a document of any of the specified document
types is added to the case.
Inside the implementation of the activity, you can
use JavaScript to access the identifier of the document that
caused the activity to start: tw.system.currentAdHocActivityInstance.enablingDocumentID
You can use this identifier to further process
the document within the activity by using Enterprise Content
Management operations.
|
A case property or variable is updated |
You can select multiple case properties or variables from
the list provided. The activity starts when any of the specified
properties or variables are updated. |
A precondition expression is met |
There is no precondition event to be triggered. You must
specify a precondition expression, and when the expression
is met, the activity starts. |
- Create an expression if your precondition requires it.
The expression must evaluate to true at the time the precondition
event occurs, for the activity to start.
- Click the + icon in the Precondition Expression section
heading.
- Specify the parameters of the expression. For
example, you might specify claimAmount is greater than 100.
You can specify multiple expressions for the precondition.
For example, you might specify creditCardNumber is
not equal to 0 and vendorName is not like
Unknown.
- Select Match All if both expressions
must evaluate to true for the activity to start. Select Match
Any if the activity can start when any one expression
evaluates to true.