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)

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).


(Haken) Entity selection required


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)

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


(Haken) Entity selection required


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)

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.

Warnung

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.


(Haken) Entity selection 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)

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.

(Haken) Entity selection 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

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

(Haken) Entity selection required

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)

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


(Haken) Entity selection required


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)

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


(Haken) Entity selection required


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)

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


(Haken) Entity selection required


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)

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


(Fehler) No entity selection required


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)

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


(Fehler) No entity selection required


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[]).



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


(Fehler) No entity selection required


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.



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.


(Fehler) No entity selection required


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

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


(Haken) Entity selection required


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.



Permission changes for datasets

The rights of a dataset were changed.


(Haken) Entity selection required


Parameter

  • eventName: BusinessEntityRightChangeEvent
  • container: The changed dataset (data type: IContainer)
  • rightIdentifier: The ID of the new rights template



Dataset client change

The client assignment of a dataset were changed.


(Haken) Entity selection required


Parameter

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



Mask script

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


(Frage) Entity selection optional


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

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


(Frage) Entity selection optional


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)

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.


(Fehler) No entity selection possible


Parameter

  • eventName: MYCRM
  • ProcessID: ID of the started process



System start (web service, timer)

The process is initiated via a web service or timer.


(Fehler) No entity selection possible


Parameter

  • eventName: MANUAL
  • ProcessID: ID of the started process

For more details, see Web service in CURSOR-BPM and Time-controlled actions.

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

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


(Fehler) No entity selection possible


Parameter

  • eventName: CTI_INBOUND
  • entityName: CtiCall
  • container: The dataset in the table CTI call
  • callNumber: The calling number



CTI server state change

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


(Fehler) No entity selection possible


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

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.


(Fehler) No entity selection possible


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

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".


(Warnung) Entity selection optional


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.