WorkflowTrigger

From GeoMedia Smart Client
Jump to: navigation, search
Settings WorkflowSetting FormSetting CommonSetting
WorkflowSettings WorkflowRoot Version WorkflowLinkGroup/WorkflowLink WorkflowNode WorkflowTrigger & Parameters





The Workflow-Trigger allows you to define Pre- and After-Actions. The definition of this trigger occurs at the Workflow-XML and must be indicated as a subitem in the respective Workflow-Node. The trigger is implemented at Param-Level, which is a child element of the Workflow-Trigger. If you like to perform several DML-Statements, they must be separated by a semicolon at the parameter.

Trigger types

Trigger types
SQL Trigger
SQL Iterator Trigger
SQL File Iterator Trigger
Mail Trigger
Session/Remove Session Trigger
Log Trigger



Pfeil new.png To the top Pfeil new.png

Syntax

<WorkflowTrigger name="UPDATEINCIDENTTRIGGER" type="SqlTrigger"  method="after"
                 condition="SQL[SELECT DECODE(({FORM.STATUS_ID}),3,DECODE(((SELECT COUNT(*) FROM ACTIVETASK WHERE INCIDENT_ID={FORM.INCIDENT_ID} AND STATUS_ID!=3 AND ID!={FORM.ID})),0,1,0),0) From Dual]">
 <Param name="Sql" value="UPDATE INCIDENT1 SET STATUS_ID = 3 WHERE RPI_ID ={FORM.INCIDENT_ID}"/>
</WorkflowTrigger>



Pfeil new.png To the top Pfeil new.png

Parameters

Attribute Mandatory Description
name yes Unique name of the trigger (has to be written in UPPERCASE letters and must not contain any special characters).


 <name="UPDATE_INCIDENT_TRIGGER" />
authorization no Only users with the appropriate Role/Claim are authorized to view/process the element.


 <authorization="ROLE[ADMIN,EDITOR]" />
 <authorization="CLAIM[WF_ADMIN,WF_EDIT]" />
condition no Condition to be evaluated for the Workflow-Trigger, which defines if the trigger will be fired or not. The condition types are the same as for the Workflow-Node element (see WorkflowNode).


 <condition="SQL[...sql-statement...]" />
 <condition="{FORM.MARKER}" />

... works with the checkbox FormField, which delivers 0/1

label no Trigger label.


 <label="Update-Trigger xyz" />
method no Defines when the trigger will be executed (before, after, action). This depends on the enclosing Workflow-Node.
  • action
  • after
  • afterinsert
  • afterupdate
  • afterdelete
  • before
  • beforeinsert
  • beforeupdate
  • beforedelete
  • before,action
  • after,action
  • afterinsert, afterupdate
  • afterupdate, afterdelete

Currently the method="before" is only valid for the controller="Workflow".

 <method="after" />
type no The trigger type SqlTrigger is used for the manipulation of database objects. The SessionTrigger is used to manipulate session values.
  • SqlTrigger
  • MailTrigger
  • SessionTrigger
  • SqlIteratorTrigger
  • RemoveSessionTrigger
  • SqlFileIteratorTrigger


 <type="SqlTrigger" />

The element Param contains the DML-statement, which will be executed if the trigger fires.

Pfeil new.png To the top Pfeil new.png

DML Parameters

Attribute Mandatory Description
name yes The name identifies the property of the trigger.


 <name="Sql" />
value yes The value contains the DML-Statement (INSERT, DELETE, UPDATE) for the trigger.


 <value="UPDATE INCIDENT1 SET STATUS_ID = 3 WHERE RPI_ID = {FORM.INCIDENT_ID}" />



Blue.pngWhen using more than one DML-Statements, they have to be separated by a semicolon.




Pfeil new.png To the top Pfeil new.png

Methods

Depending on the enclosing Parent-Node, the WorkflowTrigger supports different methods:

before

This method is supported for the controller:

  • Form/Index
  • Form/ModalIndex
  • List/Index
  • List/Page



after

This method is supported for the controller:

  • Form/Save
  • Form/Delete
  • List/Select
  • Workflow/Index



afterinsert

  • Form/Save



beforeinsert

  • Form/Save



beforeupdate

  • Form/Save



afterupdate

  • Form/Save



beforedelete

  • Form/Delete



afterdelete

  • Form/Delete



action

This method is supported for user-defined buttons



Language: English