All workflow definitions include several FileNet® P8-supplied system maps:
Workflow, Terminate, and Malfunction.
Workflow system executes the system maps as needed during
the course of standard or exception processing. Note that there is
not a single version of each system map which is shared by all workflow
definitions—instead, each workflow definition has its own copies
of the system maps.
The Workflow system map
The main map in
each workflow definition is named Workflow. When you create or open
a workflow definition, Process Designer automatically starts with
the Workflow map displayed. When a workflow is launched, processing
begins with the execution of the Launch step on the Workflow map in
the work item's workflow definition.
In deciding how to organize
steps on the Workflow map and any submaps, you must decide how you
intend to use a particular workflow definition: If the workflow will
be essentially a standalone process, you can place all the steps,
or the primary sequence of steps (if you are using submaps), on the
Workflow map. However, if the workflow definition is actually a container
for submaps that will be inherited in various workflows, you should
have only the minimum steps on the Workflow map because the Workflow
map will be overridden in each of the derived (inherited) workflows.
The Terminate and Malfunction system maps
In
general, there is no need to be aware of these system maps because
workflow system executes these maps as needed. The default Terminate
and Malfunction maps are shown graphically in Process Designer, but
they are read-only. If you would like to alter the processing defined
on either map to meet your system's specific requirements, you can
do so by creating a submap in your workflow definition with the same
name as the system map you want to override.
Important: Use
care when overriding these system maps. The conditions under which
workflow system executes the system maps do not change even if you
override these maps. Fundamentally changing the definition of a system
map can cause unexpected results in subsequent processing. For example,
if you modify the Terminate system map to send work items to a work
queue rather than removing them, you will have deleted the primary
mechanism for removing completed work items from the system.
Following are overviews of the Terminate and Malfunction
system maps.
- Terminate
- This map is called automatically at the end of the Workflow map. (For the exception to this
rule, see the notice that follows this paragraph.) By default, the Terminate map has no steps; it
simply removes the work item from the system. You can manually execute the Terminate map via the
TerminateProcess system function or by terminating a work item in the administration console.
Note: The Terminate system map executes when a parent work item terminates. When a child work
item reaches the end of its Workflow map, the work item is automatically removed from the system,
but the Terminate system map is not called. Within a running workflow, a child work item is created
for each participant in a multi-participant step and for each route taken simultaneously from a step
that has multiple outgoing routes.
- Malfunction
- This map executes when an error occurs during workflow execution.
Workflow system calls Malfunction for specific errors such as dividing
by zero, invalid date/time mask, or invalid participant. In addition,
a software developer can define a custom step processor or other application
to call the Malfunction system map when specific errors occur.
By default, the Malfunction map moves the work item to the Conductor system queue for review by
the administrator. When the administrator completes the appropriate corrective action, the work item
returns to the calling map in one of the following states:
- The state it was in when the Malfunction map was called (repeat)
- The next state (skip)
The Enable consistent returns runtime option determines which of these
actions it takes. You can also override this setting by adding a Return system function to the
Malfunction map, setting the Boolean expression as you want.
- Note that workflow system disables all timers for the work item
when it executes the Malfunction system map.
Tip: While
you cannot alter the circumstances under which workflow system executes
the Malfunction system map, you can create your own exception-handling
workflow maps and call them as needed within your business process.
For example, in the code for a custom step processor, a software developer
can include a call to execute a user-defined map if a certain error
occurs when the step processor is running.