Versions Compared

Key

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

...

Code Block
languageyaml
pipeline:
  - message.listen:
      key: pipeforce.event.workflow.#
      
  - mail.send:
      to: admin@company.tld
      subject: A workflow event happened.

Pattern matching

When registering a listener for an event key, also pattern matching can be used:

...

For example the event key from above pipeforce.event.workflow.# matches all workflow event messages while pipeforce.event.workflow.*.my.app matches only workflow event messages inside the app my.app.

Default headers

Every message contains these default headers:

  • "namespace": ns
    Whereas ns is the namespace this event happened inside. Cannot be changed for security reasons.

  • "content_type": application/json
    An event message body is always of type JSON.

Reference Documentation

Here is the reference of these event message messages and their keys (also known as topics):

...

Every property topic key can additionally optionally contain dynamic variables which will be replaced at runtime such as:

  • {appName}
    Will be replaced by the name of the app, the related property is stored inside. For example io.pipeforce.myapp.

  • {pathpropertyPath}
    The namespace relative path (= no /pipeforce/ns prefix) of the related property whereas slashes in path of property will become dots. Dots and special chars in origin path will be replaced by underscores. Everything in path is lower-cased. For example ns.global.app.com.mycompany.myapp.data.
    This way also pattern matching filtering can be applied on the path level. In order to listen on any property event on any property inside the data folder of your app you could use a key like this:

    Code Block
    pipeforce.event.property.*.global.app.com.mycompany.myapp.data.*

The body of each such most property event message messages has a structure like this:

...

Code Block
pipeforce.event.property.created.{path}propertyPath}

{propertyPath} will be replaced by the namespace relative path of the property whereas each slash will be replaced by dots.

The structure of the message body:

Code Block
languagejson
{
    "timestamp": integer,
    "correlationId": "string",
    "namespace": "string",
    "payload": {
        "origin": null,
        "target": {
          "uuid": "string",
          "path": "string",
          "type": "string",
          "value": "string",
          "created": timestamp,
          "updated": timestamp
        }
    }
}

The field origin is null.

The field target contains information about the created property.

...

Code Block
pipeforce.event.property.copied.{pathpropertyPath}

The structure of the message {propertyPath} will be replaced by the namespace relative path of the property whereas each slash will be replaced by dots.

The structure of the message body:

Code Block
languagejson
{
    "timestamp": integer,
    "correlationId": "string",
    "namespace": "string",
    "payload": {
        "origin": {
          "uuid": "string",
          "path": "string",
          "type": "string",
          "value": "string",
          "created": timestamp,
          "updated": timestamp
        },
        "target": {
          "uuid": "string",
          "path": "string",
          "type": "string",
          "value": "string",
          "created": timestamp,
          "updated": timestamp
        }
    }
}

The field origin contains information about the property it was copied from.

The field target contains information about the property it was copied to.

...

Code Block
pipeforce.event.property.deleted.{path}propertyPath}

{propertyPath} will be replaced by the namespace relative path of the property whereas each slash will be replaced by dots.

The structure of the message body:

...

The field origin contains information about the deleted property.

The field target is null.

.updated

This event message is send after a property was updated.

...

Code Block
pipeforce.event.property.updated.{pathpropertyPath}

The structure of the message body:{propertyPath} will be replaced by the namespace relative path of the property whereas each slash will be replaced by dots.

The structure of the message body:

Code Block
languagejson
{
    "timestamp": integer,
    "correlationId": "string",
    "namespace": "string",
    "payload": {
        "origin": {
          "uuid": "string",
          "path": "string",
          "type": "string",
          "value": "string",
          "created": timestamp,
          "updated": timestamp
        },
        "target": {
          "uuid": "string",
          "path": "string",
          "type": "string",
          "value": "string",
          "created": timestamp,
          "updated": timestamp
        }
    }
}

The field origin contains information about the property before it was updated.

The field target contains information about the property after it was upated.

...

Code Block
pipeforce.event.property.comment.created.{appNamepropertyPath}

.comment.updated

This event message is send after a comment was updated to a property.

The full structure of the event message routing key is like this:

...

{propertyPath} will be replaced by the namespace relative path of the property this comment is attached to, whereas each slash will be replaced by dots.

The structure of the message body:

Code Block
languagejson
{
    "comment": {
      "uuid": "theUuidOfThisCommentProperty",
      "target": "theUuidOfTheTargetProperty",
      "author": "authorUsername",
      "text": "Text of the comment"
    }
}
Info

Note: Since a comment is also a property, also a pipeforce.event.property.created message will be send.

.comment.updated

This event message is send after a comment was updated to a property.

The full structure of the event message routing key is like this:

Code Block
pipeforce.event.property.comment.updated.{propertyPath}

{propertyPath} will be replaced by the namespace relative path of the property this comment is attached to, whereas each slash will be replaced by dots.

The structure of the message body:

Code Block
languagejson
{
    "comment": {
      "uuid": "theUuidOfThisCommentProperty",
      "target": "theUuidOfTheTargetProperty",
      "author": "authorUsername",
      "text": "Text of the comment"
    }
}
Info

Note: Since a comment is also a property, also a pipeforce.event.property.updated message will be send.

pipeforce.event.log

This topic group forwards all important log events of severity level WARN or higher.

...