Events

enaio® 10.10 »

An event is a VBScript or a JavaScript for enaio® client or enaio® webclient that you can assign to an event during a workflow process.

The sequence of an activity in a workflow process is divided into events according to the following schema:

StartActivity

Server script

After a process has been started, or after an activity and its transitions have been completed. Before a user sees the process step in the inbox.

PersonalizeWorkItem

Server script

After a user has restarted a non-personalized process step and before this process step is personalized.

GetWorkItemParams

Server script

After a user has restarted a personalized process step and the variables have been read in.

BeforeOpen

Client script

Before the client opens the application form.

The event can additionally be used to call an object via the object ID in the content/detail preview.

Script code:

scriptresult.ContextObjIdent = ID

ButtonClick

Client script

After the user has clicked a button on the application form.

The event can additionally be used to call an object via the object ID in the content/detail preview.

Script code:

scriptresult.ContextObjIdent = ID

OnEnterPage

Client script

After the user has activated the page of a page control on a form.

SimulateMaskEdit

Simulation script

The script is only executed in the workflow simulation program.

BeforeCancel

Client script

After the user has clicked the 'Close' button.

The process step remains personalized.

BeforeForward

Client script

After the user has clicked the 'Forward' button.

The script can specify whether the application form remains open for further entries.

EndActivity

Server script

After the activity has finished, before the transitions have been made.

TimerFired

Server script

After the dunning period of the corresponding activity has expired.

You can implement functions for server scripts in a global server script and functions for client scripts in a global client script. Client scripts can be created for all clients or only for ECM clients or web clients.

Global scripts are always appended to the respective event script and run together. Global server scripts can be created as VBScript or JavaScript.

Activities which run without an application can only have server scripts associated with. Activities without an application comprise loops, routes, the start activity, and the end activity.

Forms can be assigned the following events:

ButtonClick

Client script

After the user has clicked a control element.

EnterPage

Client script

After the user activates a tab.

LeavePage

Client script

After the user exits a tab.

ValueChanged

Client script

After the user has changed a value in one entry field.

FocusGained

Client script

After the user has focused on one control element.

BeforeAddRow

Client script

Before the user has added a table row.

BeforeDeleteRow

Client script

Before the user has deleted a table row.

CellValueChanged

Client script

After the user has changed a value in one table cell.

CellFocusGained

Client script

After the user has focused on one table cell.

The simulation script is used in the workflow simulation program to assign values to variables for activities.

When applying type-safe variables you must use the German format in client scripts, regardless of the preset client language. Variables are always handled like strings in the script. The respective VBScript is valid in server scripts. Existing scripts do not need to be edited if the internationalized date and time formats are not used.

Creating Events

Events are created using the model editor on the Events tab in the event editor.

In the Activities area, the event editor lists all of a model's activities. All entries you use to create global scripts are listed, as well.

  • Select an activity.
  • Select an event in the content menu or by clicking the Add event button.

The event is added to the Activities area.

  • Define the script.
  • Save the model.

You will find the following buttons on the toolbar of the event editor:

Add event

Select a script to add it.

Delete

Delete the selected script.

Import script code

Open a script from a file.

Opening is canceled if the event type in the file does not match to the current event type.

Save script code

Save the event in a file.

Switch to activity

Displays the selected activity on the drawing page.

Cut

Cuts out the selected text.

Copy

Copies the selected text to the clipboard.

Paste

Pastes the text from the clipboard to the current cursor position.

Undo

Undo the last action.

Restore

Redoes the last action.

Find

Enters a search term and a search direction.

Repeat search

Repeats the search.

Search before

Repeats the search in the opposite search direction.

Replace

Enter a search term and a term to replace it with.

Show/hide bookmarks

Place a bookmark at the current line or remove it.

Next bookmark

Switches to the next bookmark.

Previous bookmark

Switches to the previous bookmark.

Delete all bookmarks

Deletes all bookmarks.

Syntax highlighting

Choose the script language and syntax highlighting.

Press Ctrl+G to specify the line number you want to go to.

Activate IntelliSense for VBScript by pressing CTRL+Space. IntelliSence enables automatic completion of commands and offers context-sensitive lists containing code and scripting elements.

Press F7 to run a syntax check for VBScript.

Use Ctrl + mouse wheel to change the font size in the editor window.

Events for enaio® webclient are written to JavaScript. You will need to enable JavaScript by selecting the corresponding entry in the context menu in the workspace of the script editor.