Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Licenses

Status
colourBlue
titleENTERPRISE
,
Status
colourPurple
titleCORPORATE

Since

Status
colourGreen
titleVERSION 45.0

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
minLevel1
maxLevel7

The Event JSON

In PIPEFORCE an event is represented by a JSON object with a certain structure like this:

Code Block
languagejson
{
  "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 origin and target whereas each in term point to the origin or target properties inside the payload (if there exists any). Virtual means, these properties are not serialized to JSON and can only be accessed by a pipeline expression (PE). This is handy for filters, since no null check for payload is necessary here.

So these paths point to the same whereas the left part will never raise a null exception:

  • origin = payload.origin (the origin value BEFORE an event happened)

  • target = payload.target (the final value AFTER an event happened)

It depends on the event whether origin and / or target is provided and which structure they have. Please consult the documentation for the certain event.

async

true, in case this event was sent in asynchronous way. Otherwise false.

...

Info

Note: Each pipeline can have only define exactly one event.listen command an it must be the very first command in the pipeline.

...

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 com.company. Otherwise it could be, that your event gets dropped or causes an exception.

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

property.created

Fired every time a new property was created in the property store.

Contains as origin the value null and as target the property created before.

Code Block
{
  "payload": {
    "origin": null,
    "target": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    }
  }
}

property.copied

Fired every time a property was copied in the property store.

Contains as origin the source property and as target the property where source was copied to.

Code Block
languagejson
{
  "payload": {
    "origin": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    },
    "target": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    }
  }
}

property.deleted

Fired every time a property was deleted from the property store.

Contains as origin the property which was deleted and as target null.

Code Block
languagejson
{
  "payload": {
    "origin": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    },
    "target": null
  }
}

property.moved

Fired every time a property was moved from one key to another key.

Contains as origin the key of the source property and as target the key of the property where it was moved to.

Code Block
languagejson
{
  "payload": {
    "origin": "string",
    "target": "string"
  }
}

property.updated

Fired after a property has been updated in the property store.

Contains as origin the property before the update and as target the property after the update.

Code Block
languagejson
{
  "payload": {
    "origin": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    },
    "target": {
      "uuid": "string",
      "key": "string",
      "type": "string",
      "value": "string",
      "created": timestamp,
      "updated": timestamp
    }
  }
}

setup.finished

Fired after the hub service was successfully started and all setup scripts have been executed successfully.

This event contains no payload.

setup.starting

Fired after the hub service was successfully started but right before all setup scripts will be executed.

This event contains no payload.

hub.context.started

Fired after the hub service was successfully started.

Contains as origin the configuration of the context as key-value-pairs. The target is null.

Code Block
languagejson
{
  "payload": {
    "origin": {
      "key1": "value1",
      "key2": "value2"
    },
    "target": null
  }
}

iam.bruteforce.detected

Fired every time a potential brute force attempt was detected.

iam.login.error

Fired every time a login attempt has been failed.