Workflow - Controller, Routing Behavior and Triggers

Workflow Manager Developer Guide

HGD_Variant
15.00
HGD_Product
GeoMedia Smart Client
HGD_Portfolio_Suite
Platform

When a Workflow-controller is deployed, the form attribute must not be set. Starting from a "root" node, a Workflow-controller can branch out into two possible directions, depending on optional conditions which have to be passed:

a) n>1 child nodes that are visible (and pass a potential condition): The child nodes are displayed in a list.

workflow_controller_1

b) exactly n=1 child node (which passes a potential condition): The Workflow skips the display of this single node in a (one-element) list and redirects further to this child node. The child node can be another list of WorkflowNodes or a single Workflow-Node which includes a form attribute (form="TABLENAME") and, therefore, displays this table as a form or list.

workflow_controller_2

workflow_controller_3

Short comment on conditions at Workflow-Nodes: There are two types of conditions at Workflow-Nodes:

  • static conditions:

a static condition looks like

	condition = "true"

This is the default case (and therefore does not need to be defined explicitly).

  • dynamic conditions:

A common practice in evaluating a "dynamic" condition at a Workflow-Node is by using an SQL statement with a DECODE or CASE inside which delivers 0 or 1. A possible sample might look like:

	condition = "SQL[SELECT DECODE(COUNT(*),0,1,0) FROM PR_OPERATION_UNIT WHERE OPERATION_ID={FORM.OPERATION_ID} AND {FORM.TEMPLATE_GUID} IS NULL]"

Other possibilities for evaluating can be defined programmatcally or via SESSION-Keys (refer to ):

	condition = "OBJECT[...]"

or

	condition = "SESSION[KeyExists()]"

Triggers on Workflow-Nodes with Workflow-controller:

Workflow-Triggers can be defined for Workflow-Nodes (with controller="Workflow"); they must have the method="after" attribute set. A Workflow-Trigger might look like the following:

<WorkflowNode controller="Form" emptyform="true" form="INCIDENT" id="11" label="Create Incident">
	<WorkflowNode id="110" label="Assign Tasks">
		<WorkflowTrigger condition="SQL[Select count(*) FROM INCIDENT1 WHERE RPI_ID={SESSION.INCIDENT1.RPI_ID} AND GEOMETRY IS NULL]" method="after" name="UPDATE"
type="SqlTrigger">
			<Param name="Sql" value="SQL[UPDATE INCIDENT1 SET GEOMETRY=SDO_GEOMETRY(2001,NULL,SDO_POINT_TYPE(X, Y, NULL),NULL,NULL) WHERE RPI_ID={SESSION.INCIDENT1.RPI_ID}]"/>
				</WorkflowTrigger>
			<WorkflowNode condition="SQL[Select count(*) FROM INCIDENT1 WHERE RPI_ID={SESSION.INCIDENT1.RPI_ID} AND TYPE_ID=7]" id="1100" label="Abandoned Vehicle">
				<WorkflowNode controller="Form" emptyform="true" follownode="120" form="VEHICLE" id="11001" label="Vehicle details">
  				...
				</WorkflowNode>
 				 ...
			</WorkflowNode> 
 			...
		/WorkflowNode>
 		...
</WorkflowNode>

The behavior is the following:

  • The user uses the INCIDENT form to create an incident; then the user clicks Save.
  • Now the Workflow-Node id="110" is accessed (it is the only node at this level; therefore, the node is "skipped") and then the Workflow-Trigger is accessed.
  • If the condition evaluates to true (which means that, if the geometry has not been set until now, the Param-Tag is accessed and the UPDATE is performed).
  • Now the Workflow-Node id="1100" is accessed (it is the only node at this level; therefore, the node is "skipped") and then the Workflow-Node id="11001" is accessed.
  • ...