Conditions


In each action, an optional condition can be defined, which determines whether the action is executed or not. If a condition is defined, it is also possible to select how to proceed if the condition is fulfilled. 

Conditions

The UI for configuring action conditions.
  • Run always (no condition)
    The action will always be executed. This is the default.
  • Matching form value needed
    Checks whether a form element matches the selected condition.
    • Form element 
      Select the form element whose value is to be tested.
    • Condition type
      The type of the condition to be checked (empty, greater than, lower than, etc.)
  • Multiple conditions
    Checks multiple form elements or plugin return values whether they match a regular expression (regexp).
    • Conditions
      Conditions to be checked. You must use the following syntax:
      REGEX(<VALUE>=<EXPRESSION>) REGEX(<VALUE>=<EXPRESSION>) ... 
      The action will be executed only when all conditions are fulfilled. For each condition, the (regular) <EXPRESSION> is matched to the <VALUE>, which may contain one or multiple Platzhalterauswahl referring to form elements or plugin return values. However, PLATZHALTER cannot be used for the <EXPRESSION>.
    • Example
      REGEX([%tf1%]=^\d+$)  REGEX([%tf2%]=^[a-z]+$)  ... 
      This checks whether the text field named tf1 contains digits only (the regexp ^\d+$) and whether the text field named tf2 contains lower-case letters only (regexp ^[a-z]+$).
    • Regexp flavor
      Currently, java regexps are being used internally, see java.util.regex. Please note this is subject to change.

Subsequent action

The next action that will be executed depends upon whether the condition has been satisfied or not.

  • Condition not satisifed
    The action directly below the current action in the tree view will be executed. If there is no such action, the workflow processing stops until eg. a state transition is performed manually.
  • Condition satisfied
    The current action is executed first. Then, the action set for the option When condition satisfied will be executed. The default is continue processing.

Please note: An action of type stop workflow processing immediately stops the processing so that no more actions will be executed.

Next action when condition is satisfied

The following options are available to control which action should be executed next after the current action has been processed successfully.

  • Abort processing
    Workflow processing stops and no more actions will be executed. In case a state transition has taken place, ie. by an action of type Change state, the actions of the new state will not be executed either.
  • Next 
    The next action will be executed. Usually the next action will be the action directly below the current action, as shown in the tree view. However, in case the condition has been attached to an action of type Change state, the next action will be the first action of the target state. When there is no such action, workflow processing stops.
  • Selected action
    Processing continues with the selected action. All action between the current action and the selected action will be skipped. Other queued actions will be processed only after the selected action has finished.
    - When the current action is an action of type stop workflow processing and its conditions has been satisfied, the selected action will be executed after the action stop workflow processing has been executed successfully. In case there are any more actions after (below) the selected action, they will not be executed as the the workflow processing has been interrupted, unless the selected action is an action of type Change state, in which case the actions of the new state will be executed after the state transition is complete. This is because the action of type stop workflow processing has been executed in the context of the old state and does not stop the processing in the new state. Furthermore, when a conditions has been set for the selected action, that condition is satisfied and another action has been set as the selected action for that condition as well, that action too will be executed before other actions are processed.
    - Usually, the next action is the action below the current action as shown in the tree view. When there exists no such action, workflow processing stops, unless this or a previous action has performed a state transition, in which case the actions of the new state will be executed next.
    - When the current action is an action of type state change and its condition is satisfied, a state transition to the target state will be performed. However, the selected action will be executed before any action of the new state. Actions of the old state after the current action will not be executed, unless a condition has been set for the selected action as well and another action has been chosen as the selected action in case the condition of the selected action is satisfied. That other action will be executed after the selected action and before any other actions. Additionally, if an action of type stop worklow processing is executed this way, it will be executed in the context of the new state and stops the processing of the actions of the new state.
    - When the current action is an action of type delete form record, no more actions will be executed, including the selected action. This is because the form record does not exist any longer.

Example

Example

You would like to execute the action E-Mail only when the input field named email has been filled out.

Create a new form with an input field named email. Select the state Eingegangen, add a new action and give it the name E-Mail. Click on the plus icon next to the name of the action in the tree view to open the sub-menu and click condition. Select matching form value needed. Now three more input fields will appear. For form element, choose the input field email. Select non-empty for the condition type and leave the option when condition satisfied at its default value, continue processing.

For each sent form, Xima® Formcycle will check whether the input field named email has been filled out and execute the action E-Mail only if it has.