workflow_banner (2K)

wf_arc(upd) - Update Workflow Arc

wf-arc(upd) (11K)

The purpose of this function is to allow the user to update the details of entries on the ARC table.

This form is accessed by selecting entries in the List Workflow Arc screen before pressing the 'UPDATE' button in the navigation bar.

For a complete description of how this type of form works please see Transaction Pattern UPDATE 1.

Field List
Field NameTypeDescription
Workflow ID NUMERIC Required. This is passed down from the parent function so is entered automatically. It is part of the primary key and cannot be changed.
Place ID NUMERIC Required. Must be chosen from the current entries on the PLACE table for this WORKFLOW.
Transition ID NUMERIC Required. Must be chosen from the current entries on the TRANSITION table for this WORKFLOW.
Direction STRING Required. The possible options are:
  • IN - place to transition.
  • OUT - transition to place.
Note the following:
  • Cannot use direction OUT on START place.
  • Cannot use direction IN on END place.
Arc Type STRING Required. The possible options are:
  • SEQUENTIAL - ordinary sequential flow, not a join or a split.
  • Explicit OR split (direction OUT only).
  • Implicit OR split (direction IN only).
  • OR join (direction OUT only).
  • AND split (direction OUT only).
  • AND join (direction IN only).
Pre Condition STRING Optional. Only valid if the Arc Type is 'Explicit OR split'.

A transition can only have two output arcs of this type, and a pre-condition must be defined in one of them. When the pre-condition is evaluated it produces a result of either TRUE or FALSE, and if TRUE it will cause the arc containing the pre-condition to be chosen. If the result is not TRUE then the other arc will be chosen instead.

The rules for defining a pre-condition are as follows:

  • The code entered must be valid PHP code suitable for processing by the eval() function. It will be parsed to check that it is syntactically valid before being written to the database.
  • Unless the evaluated code issues a return TRUE the result will always be treated as FALSE, in which case this output arc will never be chosen.
  • Data from the current database occurrence will be made available in an array called $fieldarray. An individual field can therefore be referenced using $fieldarray['fieldname'].
  • Do not attempt to write values to other variables as the results may be unpredictable and catastrophic.

Here is an example of valid code:

if ($fieldarray['value1'] > 100) {
    return TRUE;
} else {
    return FALSE;
} // if

http://www.tonymarston.net
http://www.radicore.org