Close Action


Back to Lock Action...

The Close Action is executed before the finishing-dialogue is completed during the execution of a job. It offers itself to store, for example, consistency checks of the form in the Finish Action. So you can ie check whether all the relevant fields of a form have been completed.

The Close Action is only performed when the job is really finished. If a job is rejected, no form validation takes place.

In the tab "Close Action" of the form editor there are two other tabs. In the tab "Simulation Job" a todo job can be generated, which is used for the simulation. For this task there is an editor in the tab "Script". In this editor you see on the left side the line numbers of the script. Below the editor there is a console-window in which the script output will be displayed. Under the console-window there are two buttons:

  • Validate: A syntax check of the script is executed.
  • Simulate: The finishing of a job in todo4teams is simulated.
Creating a Finishing Script

To write a script for taking-over an email it is best to proceed as follows:

  1. Read through carefully the chapter on Skript-API in this manual.
  2. Create a first draft of the script.
  3. Press the button to validate. Thus a syntax check is performed. Any errors that occur are displayed in a message window. Please correct these errors.
  4. Edit the form in the main window.
  5. Now press the simulate-button. The finishing script of the current form is executed. As a result a generated todo is displayed.
  6. Please control the resulting Todo.
Example for a Finishing Script

A simple case study creating a finishing script is explained in more detail:

We assume that you want to provide to a form that the user has selected the function under point 1.1.

The result may look as follows:

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

In this script it is checked whether under the point "functioning" at least one selection was chosen from a multiple selection. If not, a message appears to the user is a corresponding window. If yes, the user will be able to quit that job in the finishing-window.

Go to End Action...

     

Recently Visited

Child Pages