Licenses |
| ||||||||||||
Since |
|
Events can be used to listen inside a pipeline to certain things happened in PIPEFORCE or in other systems. It’s also possible to trigger such events from inside a pipeline.
Table of Contents | ||||
---|---|---|---|---|
|
The Event JSON
In PIPEFORCE an event is represented by a JSON object with a certain structure like this:
Code Block | ||
---|---|---|
| ||
{ "eventKey": "string", "namespace": "string", "payload": {JSON}, "origin": {JSON}, "target": {JSON}, "async": true|false, "headers": { "key": "value", ... } } |
...
The optional payload of the event as JSON object. The structure of this payload depends on the event type.
origin
The origin version of the payload in case the event changed the payload. For example if the event causes a property to change, the origin would contain the property BEFORE the change.
target
...
Info |
---|
Note: Every event also has the virtual properties So these paths point to the same whereas the left part will never raise a null exception:
It depends on the event whether |
async
true
, in case this event was sent in asynchronous way. Otherwise false
.
...
Info |
---|
Note: Each pipeline can have only define exactly one |
...
In this example we assume that the event contains the Salesforce Lead
object so we can filter for the CountryCode
here. But this depends on the implementation of the webhook.
Sending event
In order to send an event, you can use the event.send
command. Here is an example:
Code Block |
---|
pipeline:
- event.send:
key: com.company.myevent |
Every time this pipeline gets executed, it will send a new event with key com.company.myevent
. Optionally you also set the payload
of the event using its payload
parameter. This can be a literal or a pipeline expression (PE) which points to an object to be attached to the payload.
Note |
---|
Note: Whenever you send a custom event you need to prefix it with the reversed internet address of your company. In this example it is |
Built-in events
These are events which come out-of-the-box with PIPEFORCE. Here is a list of those officially supported events:
Event Key | Description | Payload | |||||
---|---|---|---|---|---|---|---|
| Fired every time a new property was created in the property store. | Contains as
| |||||
| Fired every time a property was copied in the property store. | Contains as
| |||||
| Fired every time a property was deleted from the property store. | Contains as
| |||||
| Fired every time a property was moved from one key to another key. | Contains as
| |||||
| Fired after a property has been updated in the property store. | Contains as
| |||||
| Fired after the hub service was successfully started and all setup scripts have been executed successfully. | This event contains no payload. | |||||
| Fired after the hub service was successfully started but right before all setup scripts will be executed. | This event contains no payload. | |||||
| Fired after the hub service was successfully started. | Contains as
| |||||
| Fired every time a potential brute force attempt was detected. | ||||||
| Fired every time a login attempt has been failed. |