Skip to main content
Skip table of contents

Start events and event variables

Start events

The implementation model offers a conditional start event to start processes, which is defined by the following data:

  • Event: The event that starts the process.

  • Entity: The name of the entity if desired. The event will then be tied to this entity.

  • Condition: A Groovy script that must deliver the result true or false.

In the following you will find an overview of all start events and their relevant characteristics and parameters.

The parameters eventName, entityName etc. are variables provided in the script of the start event and in all scripts of the process.

GROOVY
// eventName ist vom Typ String und kann Werte aus der Tabelle annehmen
if(ScriptUtils.equal(eventName, "BusinessEntityBeforeCreateEvent", "BusinessEntityBeforeChangeEvent"))
{
  ...
}

Several process start events can also be defined in a process. Thematically related processes, e.g. "Copy (before)" and "Copy (after)" can be combined in one process.

When creating multiple start points, you must ensure that an event may only be used once. The "always add to other events" event should no longer be used.

Figure: Multiple starting points in a process

The model became even more precise because each event can be assigned its own post-processing step.

Create (before)

Entity selection required

This event is triggered if e.g. a user has entered the data for a new dataset in the mask and clicks "Save" to save the information in the system.

The dataset will still be on its way into the database, other system elements will not yet be able to "see" it.

It also doesn't have a primary key as yet. That is why no other datasets can as yet be linked to it.

The creation process is therefore not yet fully completed.

Benefit: The BPM process can further change all fields of the dataset here.
For example, he can calculate a third field from two fields.
The dataset will be saved automatically at the end of the process. The user doesn't have to call up saveEntry.

Other subsequent actions should only be carried out in the event Create (after).

Parameter

  • eventName: BusinessEntityBeforeCreateEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container: The current dataset (data type: IContainer)

  • container_New: the same as variable container

  • workSpace: The current data range (data type: IScriptWorkSpace)

Create (after)

Entity selection required

Dependent data can be created or linked after a new creation. The dataset now has a primary key and is persistent.

Parameter

  • eventName: BusinessEntityCreateEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container: The current dataset (data type: IContainer)

  • container_New: the same as variable container

  • workSpace: The current data range (data type: IScriptWorkSpace)

Change (before)

Entity selection required

The dataset is still on its way to the database.

Benefit: The BPM process can change all fields of the dataset (container_New) here.
For example, he can calculate a third field from two fields.
Changes in field values become apparent when comparing container_New/container_Old.
Other subsequent actions should only be carried out in the event Change (after).

container_New will be saved automatically at the end of the process. The user doesn't have to call up saveEntry.

This event will NOT be run if the dataset was assigned or unassigned via the Merger, even if this procedure has changed a lookup field. That is why an additional reaction to the linking events is required.

Parameter

  • eventName: BusinessEntityBeforeChangeEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container_Old: The current dataset with the values from before the change (data type: IContainer)

  • container_New: The current dataset with the changed values (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

  • positionInWorkSpace: The position of the dataset in the data range

Change (after)

Entity selection required

The dataset is now saved.

Advantage: the actual dataset should no longer be modified at this point (that is why we have Change (before)). Subsequent actions can be executed, e.g. the creation or editing of dependent data or the sending of an email. Changes in field values become apparent when comparing container_New/container_Old.

This event will NOT be run if the dataset was assigned or unassigned via the Merger, even if this procedure has changed a lookup field. That is why an additional reaction to the linking events is required.

Parameter

  • eventName: BusinessEntityChangeEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container_Old: The current dataset with the values from before the change (data type: IContainer)

  • container_New: The current dataset with the changed values (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

  • positionInWorkSpace: The position of the dataset in the data range

delete

Entity selection required

The dataset is deactivated. The dataset is still active at the time of the event.

Parameter

  • eventName: BusinessEntityRemoveEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container: The dataset for deletion (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

Copy (before)

Entity selection required

The dataset is copied; the copied dataset is not yet saved at the time of the event and can be manipulated before copying.

Parameter

  • eventName: BusinessEntityBeforeCopyEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container_Old: The original dataset (data type: IContainer)

  • container_New: The copy used for changing data (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

Copy (after)

Entity selection required

More dependent data can be created or linked after copying. The dataset now has a primary key and is persistent.

Parameter

  • eventName: BusinessEntityCopyEvent

  • entityName: The name of the entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • container_Old: The original dataset (data type: IContainer)

  • container_New: The copy used for changing data (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

Save item workspace (after)

Entity selection required

The process is triggered when quote or contract items are saved.

Parameter

  • eventName: BusinessItemWorkSpaceUpdateEvent

  • entityName: The position entity

  • relationName: The internal relation name or empty

  • masterTable: The internal name of the parent entity or empty

  • masterPk: The primary key of the parent entity or empty

  • workSpace: The current data range (data type: IScriptWorkSpace)

Assign link (before)

No entity selection required

All data selected in the assignment browser (merger) for assigning and unassigning, before the operation is executed.

Parameter

  • eventName: BusinessBeforeAddRemoveLinkEvent

  • relationName: The internal relation name

  • masterTable: The internal name of the master entity.

  • masterPk: The primary key of the master entity.

  • slaveTable: The internal name of the dependent entity.

  • workSpace: The dependent dataset container (data type: IScriptWorkSpace)

  • containers_Add: Added dependent datasets (data type: IContainer[]).

  • containers_Remove: Datasets that should no longer be linked to the main dataset (data type: IContainer[]).

Assign link (after)

No entity selection required

All data selected in the assignment browser (merger) for assigning and unassigning. The changes were made persistent in the database.

Parameter

  • eventName: BusinessAddRemoveLinkEvent

  • relationName: The internal relation name

  • masterTable: The internal name of the master entity.

  • masterPk: The primary key of the master entity.

  • slaveTable: The internal name of the dependent entity.

  • workSpace: The dependent dataset container (data type: IScriptWorkSpace)

  • containers_Add: Added dependent datasets (data type: IContainer[]).

  • containers_Remove: Datasets that are no longer linked to the main dataset (data type: IContainer[]).

No entity selection required

A link between two datasets is created. In contrast to assignments, this event is triggered for each link individually; assignment for the entire operation.

Parameter

  • eventName: BusinessInsertLinkEvent

  • relationName: The internal relation name.

  • masterTable: The internal name of the master entity.

  • masterPk: The primary key of the master entity.

  • slaveTable: The internal name of the dependent entity.

  • slavePk: The primary key of the dependent entity.

  • relationAttributesMap: Field valued of the attributed relation. Access via the fully qualified field name.

No entity selection required

The removal of a link between two datasets. In contrast to assignments, this event is triggered for each link individually; assignment for the entire operation.

Parameter

  • eventName: BusinessDeleteLinkEvent

  • relationName: The internal relation name

  • masterTable: The internal name of the master entity.

  • masterPk: The primary key of the master entity.

  • slaveTable: The internal name of the dependent entity.

  • slavePk: The primary key of the dependent entity.

  • relationAttributesMap: Field valued of the attributed relation. Access via the fully qualified field name.

Email import

Entity selection required

An activity is saved or updated via a mail import/reconciliation.

Parameter

  • eventName: ActivityImportEvent

  • container: The activity dataset generated from the mail import (data type: IContainer)

  • NewMail: true for a new dataset, false for an update.

  • Sender: The email address of the sender.

  • Recipients: A list of recipient email addresses.

  • CCRecipients: A list of CC recipient email addresses.

  • MailConfigId: The ID of the email configuration.

Permission changes for datasets

Entity selection required

The rights of a dataset were changed.

Parameter

  • eventName: BusinessEntityRightChangeEvent

  • container: The changed dataset (data type: IContainer)

  • rightIdentifier: The ID of the new rights template

Dataset client change

Entity selection required

The client assignment of a dataset were changed.

Parameter

  • eventName: BusinessEntityUnitChangeEvent

  • container: The changed dataset (data type: IContainer). Access with UnitUtils.getUnits(container).

Mask script

Entity selection optional

The process is started via a mask script in an entity mask (e.g. via a button) for the currently opened dataset.

Parameter

  • eventName: CLIENT_EVENT

  • ProcessID: ID of the started process

  • container: The open dataset (data type: IContainer)

  • workSpace: The current data range (data type: IScriptWorkSpace)

  • positionInWorkSpace: The position of the dataset in the data range

Additional parameters can be passed to the process as optional transfer parameters in a HashMap<String, Object> and should be checked for their existence in the start condition (ProcessUtils.isVariablesSet(key)). Access is via ProcessUtils.getVariable(key) .

If the start event condition limits to one entity, then the process will only start from within the mask script of the relevant entity. The process can be started from within any entity if that selection is blank. The administrator must ensure that the process will react to various entities.

Return

  • In the start event, return variables can be defined that can be processed further in the mask script when called synchronously. The variables are filled with the data inserted in the process up to the first wait state.

Action box

Entity selection optional

The process starts from within the action box and contains all selected datasets from the list view

Parameter

  • eventName: ACTION_BOX

  • ProcessID: ID of the started process

  • entityName: The name of the entity

  • containers: The list of selected datasets of type IContainer

  • workSpace: The current data range (data type: IScriptWorkSpace)

If the start event condition limits to one entity, then the process will only start from within the action box for the relevant entity. The process can be started from within any entity if that selection is blank. The administrator must ensure that the process will react to various entities.

User start (myCRM)

No entity selection possible

The process is started from within myCRM. All available processes are displayed in the system tab "Processes" and can be saved as favorites in myCRM. New process will only be available after a new client login.

Parameter

  • eventName: MYCRM

  • ProcessID: ID of the started process

System start (web service, timer)

No entity selection possible

The process is initiated via a web service or timer.

Parameter

  • eventName: MANUAL

  • ProcessID: ID of the started process

Details can be found under Web Service in CURSOR-BPM or Time-controlled action.

Return

  • Return variables can be defined in the web service start event, which are returned to the caller for further processing. The variables are filled with the data inserted in the process up to the first wait state.

Inbound call

No entity selection possible

The process is started via a new inbound call via the server-side CTI interface.

Parameter

  • eventName: CTI_INBOUND

  • entityName: CtiCall

  • container: The dataset in the table CTI call

  • callNumber: The calling number

CTI server state change

No entity selection possible

The process is started by a change in state of the CTI server or CTI phone.

Parameter

  • eventName: CTI_STATE_CHANGE

  • ctiStateEvent: The state information of the CTI servers as a CstaServerEvent object. This is handled via the utility CstaScriptUtils.

Document Template

No entity selection possible

The process is started with the selection of a special document template, which takes over the task of the single letter assistant in combination with an external document management system.
The special document template must have been created for a wordable entity (these use the single letter wizard) and references the process for controlling document creation.

Parameter

  • eventName: DOCUMENT_TEMPLATE

  • documentTemplate: The name of the document template

  • entityName: The entity name of the active dataset

  • container: The active dataset

Always execute

Entity selection optional

This process will be checked for every event. The eventName and the parameters must be checked in the start condition.

If this process is to be visible in myCRM, then it must first be published with the start event myCRM and copied from the process tab to a system folder (visible for all users) in myCRM. Only then can the event be set to "Always execute".

Parameter

  • eventName: EventName of the current event (see above)

  • The other parameters match the current event (see above)

Attention: The use of this event will result in performance losses if the start validation is formulated for low performance. The use of this event should be considered carefully.



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.