Send Action


The complete action is executed before the complete dialog is closed when processing a ticket. It is therefore a good idea to store consistency checks of the form in the complete action, for example. This way you can check, for example, whether all relevant fields of a form have been filled in.

The complete action is only carried out if the ticket really needs to be closed. If a ticket is rejected, no form check takes place.

There are two further tabs in the "Complete action" tab of the form editor.

Creating an accept script

The best way to write a send script  is as follows:

  1. Read the chapter on the script API in this manual carefully.
  1. You create a first draft of the script.
  1. You press the validate button. This performs a syntax check. Any errors that occur are displayed in a message window. You correct these errors.
An example of a completion script

The creation of a completion script is explained in more detail using a simple case study:

To do this, we assume that you want to ensure for a form that the user has selected the operating mode of a system under point 1.1.

The result can look like this:


if (form.getContent().get("betriebsweise").value.size() == 0)
{
    helper.infoMessage("Sie müssen unter 1.1 eine Betriebsweise auswählen !");
    result="failure";
}

This script checks whether at least one selection box has been selected from the multiple selection "operating mode". If not, a message is displayed to the user. If yes, the user can close this ticket in the completion window.