Workflow XML Formats

The workflow widgets require XML data that conforms to the workflow schema defined in the workflow.xsd file located in the lib\curam\xml\schema folder of your CDEJ installation folder. Below is an example of workflow XML data:

<WORKFLOW ID="4791830003522207744" PROCESS-VERSION="1">
  <NODE ID="6953557824660045824" X="2.0" Y="1.0"
        TEXT="Loop Activity [End]" HIDDEN="false"
        ACTIVITY-TYPE-CODE="AT9" HAS-NOTIFICATION="true"
        IS-EXECUTED="false" SPLIT-TYPE="AND" JOIN-TYPE="AND"
        TASK-ID="1"/>
  <NODE ID="-3566850904877432832" X="3.0" Y="1.0"
        TEXT="EndProcessActivity" HIDDEN="false"
        ACTIVITY-TYPE-CODE="AT7" IS-EXECUTED="false"
        JOIN-TYPE="AND" TASK-ID="2"/>
  <NODE ID="2702159776422297600" X="1.0" Y="2.0"
        TEXT="Activity 1" HIDDEN="false"
        ACTIVITY-TYPE-CODE="AT5" IS-EXECUTED="false"
        SPLIT-TYPE="AND" JOIN-TYPE="AND" TASK-ID="3"/>
  <EDGE FROM="6953557824660045824" TO="-3566850904877432832"
        HIDDEN="false" TRANSITION-ID="1621295865853378560"
        IS-EXECUTED="false" REVERSE-ARROW="false"/>
  <EDGE FROM="3566850904877432832" TO="2702159776422297600"
        HIDDEN="false" TRANSITION-ID="0" IS-EXECUTED="false"
        REVERSE-ARROW="true"/>
</WORKFLOW>

The root element, WORKFLOW, can have any number of NODE (activity) and EDGE (transition) elements. The ID attribute on WORKFLOW identifies this particular workflow as does the PROCESS-VERSION attribute.

The NODE element represents a single activity in the workflow. All attributes of a node are defined in the following table:

Table 1. Attributes of a Node
Attribute Description
ID Unique identifier for this element, supplied as a parameter in the row header hyperlink.
X An x-coordinate for an element on the workflow graph.
Y A y-coordinate for an element on the workflow graph.
TEXT The text of an activity.
ACTIVITY-TYPE-CODE Code for an activity type. Used as a parameter in a hyperlink.
HIDDEN Boolean property to indicate if an edge or node is to be hidden. If true the node will not be displayed.
IS-EXECUTED Boolean property to indicate if an activity has already been executed for a particular process instance. If set to true then the activity has been executed.
SPLIT-TYPE The split type associated with an activity.
JOIN-TYPE The join type associated with an activity.
ACTIVITY-INSTANCE-ID The unique identifier of an activity instance for a particular process instance.
START-DATE-TIME The start date time of an activity instance or transition instance for an executed or currently executing process.
END-DATE-TIME The end date time of an activity instance or transition instance for an executed or currently executing process.
STATUS The current status of an activity instance.
TASK-STATUS Code for the status of a task.
TASK-RESERVED-BY The name of the user reserving the task.
TASK-TOTAL-TIME-WORKED The total time worked on a task in seconds.
NUMBER-ITERATIONS The number of times the activity contained in a node has been executed.
TASK-ID The unique identifier for the task.

The EDGE element represents a single transition in the workflow. All attributes of an edge are defined in the following table:

Table 2. Attributes of an Edge
Attribute Description
FROM The ID of the node this edge is from.
TO The ID of the node this edge is to.
TRANSITION-ID The unique identifier of a transition.
IS-FOLLOWED Boolean property to indicate if a particular transition has already been followed for a process instance.
TRANSITION-INSTANCE-ID The unique identifier of a transition instance for a particular process instance.
REVERSE-ARROW Boolean property to indicate if an arrow on an edge should be reversed. In this case, the arrow will be going into the FROM node instead of the TO node.
IS-EXECUTED Boolean property to indicate if an activity has already been executed for a particular process instance. If set to true then the activity has been executed.
TRANSITION-CONDITION The condition associated with a transition in an edge.
REAL_FROM ID of a node that this edge is actually from as opposed to an intermediate hidden node identified by the FROM attribute.
REAL_TO ID of a node that this edge is actually to as opposed to an intermediate hidden node identified by the TO attribute.
ENABLED Boolean property to indicate if an edge is to be enabled as a hyperlink. This attribute is false by default.
ORDER Indicates the order of an edge relative to other edges.

As mentioned above, workflow charts are configurable. This is accomplished by setting the CONFIG attribute on the UIM field in question. The WorkflowConfig.xml XML configuration file must contain a configuration section with a unique identifier matching the text in the CONFIG attribute. The XML schema format for this file is defined in the workflow-config.xsd file located in the lib\curam\xml\schema folder of your CDEJ installation folder. The following is a sample of this file:

<WORKFLOW_CONFIG>
  <ICON CODE="AT1" PATH="Images/manual.gif"/>
  <ICON CODE="AT2" PATH="Images/automatic.gif"/>
  <ICON CODE="AT4" PATH="Images/subflow.gif"/>
  <ICON CODE="AT5" PATH="Images/route.gif"/>
  <ICON CODE="AT6" PATH="Images/eventwait.gif"/>
  <ICON CODE="AT7" PATH="Images/endprocess.gif"/>
  <ICON CODE="AT8" PATH="Images/loopbegin.gif"/>
  <ICON CODE="AT9" PATH="Images/loopend.gif"/>
  <ICON CODE="AT10" PATH="Images/decision.gif"/>
  <ICON CODE="AT11" PATH="Images/startprocess.gif"/>
  <ICON NOTIFICATION="true"
        PATH="CDEJ/cdej-images/notification.gif"/>
  <CONFIG ID="WorkFlow.Config"
     NOTIFICATION_PAGE="viewActivityNotification"
     DETAILS_PAGE="componentRedirect"
     START_PROCESS_TYPE="AT11" END_PROCESS_TYPE="AT7"/>
</WORKFLOW_CONFIG>

The WORKFLOW_CONFIG root element contains CONFIG elements and ICON elements. The CONFIG element contains all configuration for a particular field, identified by the ID attribute. The following table describes all attributes of the CONFIG element:

Table 3. Attributes of Workflow CONFIG element
Attribute Description
ID Unique identifier for this configuration.
DETAILS_PAGE ID of a UIM page to use as a destination for a hyperlink on a node.
HEIGHT Height in pixels of a workflow chart. If height is not specified, a height will be chosen that attempts to maximize the use of available space.
ACTIVITY_CODETABLE Codetable name for resolving ACTIVITY-TYPE-CODE attribute values.
TASKSTATUS_CODETABLE Codetable name for resolving TASK-STATUS attribute values.
PROCESSSTATUS_CODETABLE Codetable name for resolving the status of a process instance (e.g. In Progress, Completed, Suspended or Aborted).
SHOW_INSTANCE_DATA Determines if the chart should display a text area containing all instance data information. Valid settings are true and false.
START_PROCESS_TYPE Code identifying the ACTIVITY-TYPE-CODE set as the start process type. This activity will be drawn without a box.
END_PROCESS_TYPE Code identifying the ACTIVITY-TYPE-CODE set as the end process type. This activity will be drawn without a box.
NOTIFICATION_PAGE ID of a UIM page to use as a destination for a hyperlink on a notification icon.
READONLY_VIEW Determines if the links on a workflow graph should be disabled.
HIGHLIGHT_ACTIVITY_PARAM Represents the parameter used to determine the current activity in a workflow. The value of the parameter is matched with a corresponding attribute in the XML data returned from the server to indicate which node has to be highlighted.

The ICON child element of the WORKFLOW_CONFIG root element defines all icons for the workflow chart. Either the CODE attribute or the NOTIFICATION attribute defines what kind of icon this is. If CODE is set then the ACTIVITY-TYPE-CODE on a NODE is used to match an icon to a particular activity type. If the NOTIFICATION attribute is set to true then this icon is used as a graphic depicting a notification present on an activity. The PATH attribute on ICON is used to point to an image file, relative to your project's WebContent directory.