IBM® Content
Manager provides
12 classes that you can use to implement document routing functionality
into your application.
You can find details about these classes and methods in the
Application
Programming Reference. The document routing classes and methods
include:
- DKDocRoutingServiceICM
- This class provides the methods for routing and accessing workpackages
and container data through a process. For instance, start, terminate, continue, suspend, resume, listWorkPackages,
and setWorkPackageContainerData.
- DKDocRoutingServiceMgmtICM
- This class provides the methods to manage the document routing
definition classes: DKProcessICM, DKWorkNodeICM,
and DKWorkListICM, DKWorkFlowActionICM, DKWorkFlowActionListICM.
Retrieving a copy of the DKDocRoutingServiceMgmtICM object
from the DKDocRoutingServiceICM object is more
efficient than creating a DKDocRoutingServiceMgmtICM object
of your own because the API can internally share the same copy of
workflow definition data.
- DKProcessICM
- This class represents a process definition which contains a collection
of interconnecting routes that describe the steps and flows of a process
(in addition to other attributes such as timelimit) and description
of a process.
Although it is possible to create document routing
process definitions with the API directly, avoid doing so if at all
possible. Because creating document routing process with the APIs
risks unexpected behavior (such as creating illegal parallel routing
construct) and damage to the system, the graphical workflow builder
avoids this behaviour by validating a process before it is saved into
the library server.
The capability to save
the process relies on the definition of three premises:
- Process state
- Indicates whether the process has been verified or is still in
draft state. You can retrieve this status with the getState method
in DKProcessICM. This returns either DK_ICM_DR_PROCESS_DRAFT_STATE
(0) or DK_ICM_DR_PROCESS_VERIFIED_STATE (1).
Although you can toggle this status with the setState method,
use the graphical workflow builder to handle this status to avoid
any damage to the system.
- Diagram definition
- Defines the graphical appearance of the process in an array of
bytes. The maximum length is 1 Mb. The two DKProcessICM methods: setDiagramDefinition(byte[]
diagram_definition) and getDiagramDefinition(byte[]
diagram_definition) set and get the diagram definition.
- Route definition
- Defines the route. The extended DKRouteListEntryICM connects
the following types of work nodes:
- Workbasket: DK_ICM_DR_WB_NODE_TYPE (0)
- Collection point node: DK_ICM_DR_CP_NODE_TYPE (1)
- Business application node: DK_ICM_DR_BA_NODE_TYPE (2)
DKRouteListEntryICM also connects the following
virtual nodes: - Split node: DK_ICM_DR_SPLIT_NODE_TYPE (3)
- Join node: DK_ICM_DR_JOIN_NODE_TYPE (4)
- Decision point node: DK_ICM_DR_DP_NODE_TYPE (5)
- Subprocess node: DK_ICM_DR_SUB_PROCESS_NODE_TYPE (6)
- Start node: DK_ICM_DR_START_NODE_TYPE (7)
- End node: DK_ICM_DR_END_NODE_TYPE (8)
Virtual nodes are used by the system to facilitate process
navigation. They are called virtual nodes because the document routing
APIs do not return work packages for them. You can, however, query
for the location of work packages (in their raw DDO format).
The DKRouteListEntryICM methods: setDecisionRuleExternal, getDecisionRuleExternal, setDecisionRuleInternal, setPrecedence,
and getPrecedence set date for routes originating
from decision points. DecisionRuleExternal points are used by the
graphic workflow builder to display decision rules to users; DecisionRuleInternal
points are used by the library server to evaluate decision rule outcome
during run time.
The listProcessNames() and listProcesses() methods
in DKDocRoutingServiceMgmtICM list only verified
processes. Processes in draft state are not returned.
The
add(DKProcessICM
process) and
update(DKProcessICM process) methods
can save only the processes that passed the graphic workflow builder
verification. Therefore, the add and update methods work only in the
following scenarios:
- The process is in the draft state, and the route list is undefined;
but the diagram definition is defined.
- The process is in the verified state; the diagram is undefined;
and the route list is defined.
- The process is in the verified state, and both the diagram and
the route list are defined.
In these scenarios, the graphic workflow builder regulates the
proper combinations of process attributes before it is saved in order
to ensure system data correctness. The process cannot be saved for
any other combination. See the following table for all possible combinations.
Table 1. Combinations that the add(DKProcessICM
process) and update(DKProcessICM process) method can save| Process state |
Diagram definition |
Route definition |
Can be saved |
| Draft (0) |
No |
No |
No |
| Draft (0) |
No |
Yes |
No |
| Draft (0) |
Yes |
No |
Yes |
| Draft (0) |
Yes |
Yes |
No |
| Verified (1) |
No |
No |
No |
| Verified (1) |
No |
Yes |
Yes |
| Verified (1) |
Yes |
No |
No |
| Verified (1) |
Yes |
Yes |
Yes |
- DKWorkNodeICM
- This class represents a work node definition which details the
expected or applicable tasks (such as ActionList and library server
exit program) to perform at that particular step in a process.
A
subprocess is recorded as a work node of type DK_ICM_DR_SUB_PROCESS_NODE_TYPE.
The subprocess and the worknode share the same name.
- DKWorkNodeContainerDefICM
- This class serves as a helper that describes the intended data
type and expected run time behavior (such as name,"prompt, and display
to user) for workflow container data routed along a workpackage.
The
actual container data are instances of name-value pair (type string).
The instances of container data are child components of workpackage
instances, not instances of this DKWorkNodeContainerDefICM class. IBM Content
Manager does not enforce any semantic
checking and validation for those name-value pairs against their corresponding
container variable definitions.
- DKWorkFlowActionICM
- This class records details (such as file name and function name)
of an external DLL or Java™ class
to be run at the API client side. IBM Content
Manager does not automatically
start the exit routine that you specify in the DKWorkFlowActionICM object.
A custom application must start, validate, and implement the action.
IBM Content
Manager pre-defines
several actions. They primarily help IBM clients
display available menu selections at a worknode. IBM Content
Manager does not automate or enforce
any of these system-defined workflow actions.
- DKWorkFlowActionListICM
- This class records a collection of actions and its name is returned
along with the retrieval of a worknode. This function enables client
application to display applicable actions at a worknode.
- DKWorkListICM
- This class represents a filtered view (based on criteria such
as worknode and priority) for a collection of workpackages that route
documents to which users have access.
- DKRouteListEntryICM
- This class defines the route that a process can take (as in from
or to). A process object (DKProcessICM) contains
a collection of route entry objects (DKRouteListEntryICM).
Certain fields (decision rule and precedence) facilitate the construction
of decision rules for routes that leave the decision nodes.
Tip: You can write a program that uses the APIs to retrieve
and examine the value set by the graphical builder, but do not set
those decision rules by yourself for risk of creating an invalid decision
rule.
- DKCollectionResumeListEntryICM
- This class represents an entry in the resume list for the collection
point work nodes.
- DKResumeListEntryICM
- This class represents an entry of resume list to set whenever
a suspended work package waits for the arrival of certain documents
(not necessarily at a collection point) in order to resume.
- DKWorkPackageICM
- This class represents a work package for a routing task. It contains
a persistent identifier for the document to route, and information
about the routing state (such as process name, worknode name, and
completion time).
When a process starts, one or more work packages
are created as a result of the API call.