Groovy event handler

A Groovy event handler can react to any kind of event. The events created by the server can be selected on the "Server events" tab. These events can be filtered more precisely in the Groovy script if necessary. Actions and conditions can be linked with the Groovy event handler.

The Groovy event handler can be found in processes in the "Elements" area. It belongs to the "Event handler" category. From there, it can be dragged & dropped to the desired location on the workspace and then configured. General information about creating process items can be found here.

If you have created the Groovy event handler on the workspace, open the properties dialog by double-clicking on the element.

General

Click here for detailed information about the settings in this dialog.

Click "Next".

Server events

The name of the selected server event is shown here. These events can be filtered more precisely in the Groovy script if necessary. If the script returns the Boolean value true (in the Groovy sense), the event will be processed, otherwise it will not be.

Delete server event

Removes the server event currently selected.

Add server event

Opens a dialog where a server event can be selected.

Click "OK" to complete the configuration.

Choose server event

Add server events

You can select a server event here.

Add following server event

With this option, interface names of server events can be entered directly (e.g. "de.uplanet.lucy.server.workflow.event.IWorkflowEvent" to listen to all server events).

Activate the "Send login process event upon login" setting in the portal properties if you want to use this server event with the Groovy event handler.

Server events

Publishing a new application

More information: Interface IApplicationCreateEvent

From Intrexx version 12.0.0

More information: Interface IApplicationCreateEvent

Publishing an existing application

More information: Interface IApplicationUpdateEvent

From Intrexx version 12.0.0

More information: Interface IApplicationUpdateEvent

Before deleting an application

More information: Interface IApplicationBeforeDeleteEvent

From Intrexx version 12.0.0

More information: Interface IApplicationBeforeDeleteEvent

After deleting an application

More information: Interface IApplicationAfterDeleteEvent

From Intrexx version 12.0.0

More information: Interface IApplicationAfterDeleteEvent

These events contain the GUID of the application. The GUID can be determined as follows:

def strAppGuid = g_event.applicationGuid

Portal export start

Occurs at the start of a portal export. The event contains the export directory or the export file.

More information: Interface IPortalExportStartEvent

From Intrexx version 12.0.0

More information: Interface IPortalExportStartEvent

Portal export end

Occurs at the end of a portal export. The event contains the export directory or the export file.

More information: Interface IPortalExportEndEvent

From Intrexx version 12.0.0

More information: Interface IPortalExportEndEvent

Adding a user (web)

Occurs after a new user has been created using the Users application. The event contains the GUID of the newly added user.

More information: Interface IOrgStructureChangedEvent

From Intrexx version 12.0.0

More information: Interface IOrgStructureChangedEvent

Deactivating a user (web)

Occurs after a user has been deactivated via the Users application. The event contains the GUID of the deactivated user.

More information: Interface IUserDeactivatedEvent

From Intrexx version 12.0.0

More information: Interface IUserDeactivatedEvent

Locking a user (web)

Occurs after a user has been locked because they failed to enter their password too many times.

More information: Interface IUserLockedWorkflowEvent

From Intrexx version 12.0.0

More information: Interface IUserLockedWorkflowEvent

User login

Requires the portal option "Send login process event upon login" in the portal properties. Occurs after a user logs in. The event contains the logged-in session, as well as the name of the authentication configuration used. The GUID of the user can be determined with the following Groovy script:

def intUserId = g_session?.user?.id
def strUserGuid = g_session?.user?.guid

User logout

Requires the portal option "Send login process event upon login" in the portal properties. Occurs after a session has been logged out. The event contains the logged-out session, as well as the name of the authentication configuration used.

Server stop

Occurs while the portal server is being shut down.

More information: Interface IServerStopEvent

From Intrexx version 12.0.0

More information: Interface IServerStopEvent

User-defined event

Occurs, when it is initiated by a user, such as via JavaScript or as user-defined workflow subsequent event in task planning.

Timer processing completed

Occurs, when a global timer finished its task.

Changing portal languages

Changes the language settings in the portal properties.

More information: Interface ILanguagesChangedEvent

From Intrexx version 12.0.0

More information: Interface ILanguagesChangedEvent

Changing portal locale formats

Changes the format settings in the portal properties.

More information: Interface ILocaleFormatsChangedEvent

From Intrexx version 12.0.0

More information: Interface ILocaleFormatsChangedEvent

Sending emails failed (badmail folder)

Occurs when an email is moved into the badmail folder (/internal/mailroot/badmail).

More information

https://docs.intrexx.com/intrexx/version/11000/steady/api/groovy/jdk/de/uplanet/lucy/server/workflow/event/IWorkflowEvent.html

https://docs.intrexx.com/intrexx/version/steady/api/groovy/jdk/de/uplanet/lucy/server/workflow/event/IWorkflowEvent.html

Click on "OK" to save the settings and close the dialog.

Click "Next".

Script

Here you can access the editors in which Groovy script can be edited.

File path

Displays the path to the Groovy script file.

Edit file path

Opens a dialog where the Groovy script file path can be edited. This is only possible if the expert options have been activated.

Edit file path

Enter a title for the action here.

The page allows direct editing of the file path and therefore only advanced users should apply changes. The INTREXX GmbH expressly indicates that it takes no responsibility for any modifications made within this area. United Planet cannot provide support for any modifications, nor consequences resulting from editing and modifying the file path.

Select script file

Opens a dialog where the Groovy file can be selected.

Once you have specified the file path, click "OK" to save changes and close the dialog.

Open Intrexx editor

Opens the internal Groovy script editor.

Open external editor

This link is shown if the path to an external editor has been entered in the editor settings. Click on this link to open that external editor.

Cache compiled script classes

The compiled Groovy scripts are stored in the cache with this option.

Click "OK" to complete the configuration of the Groovy event handler.

More information

Processes module

Create and manage processes

The areas of the "Processes" module

Creating and connecting elements

Analyze log file

Options

External data in processes

Java classes in process objects