An event message key (also known as topic) is a routing key pattern of an event message which is sent after a known event in PIPEFORCE happened and . This key always starts with prefix pipeforce.event
, followed by the concrete event type.
It can be used to listen and send push notifications every time such an event happens or to register a pipeline listener and listen for such an event to a trigger a pipeline execution.
Here is an example how to add such an event message listener to a pipeline. As soon as the pipeline got saved in the property store, the listener is activated:
Code Block | ||
---|---|---|
| ||
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 patterns pattern matching can be used in the event key:
*
= Stands for a single word up to the next period.
#
= Stands for multiple words with multiple periods in between.
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
.
Table of Contents | ||
---|---|---|
|
pipeforce.event.app
This topic group forwards all important events related to app management.
.install.finished
This event message is send after an app was successfully installed.
The full structure of the event message Default headers
Every message contains these default headers:
"namespace": ns
Whereasns
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 messages and their keys (also known as topics):
Table of Contents | ||
---|---|---|
|
pipeforce.event.app
This topic group forwards all important events related to app management.
.install.finished
This event message is send after an app was successfully installed.
The full structure of the event message routing key is like this:
...
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
...
.
{
...
propertyPath}
...
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.
...
.created
This event message is send after a new property was created.
...
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
...
.deleted
This event message is send after a property was deleted.
...
.*.global.app.com.mycompany.myapp.data.*
The body of most property event messages has a structure like this:
Code Block |
---|
pipeforce.event.property.deleted.{path} |
.updated
This event message is send after a property was updated.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.updated.{path} |
.comment.created
This event message is send after a comment was added to a property.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.comment.created.{appName} |
.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 | ||
---|---|---|
| ||
{
"timestamp": integer,
"correlationdId": 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
}
} |
Wheras:
timestamp
= The unix timestamp in milliseconds when this event happened.correlationId
= In case this event is part of an async execution, this is the id of the execution.namespace
= The namespace this event happened inside.payload
= A JSON which contains more information about the related properties whereasorigin
andtarget
can also benull
depending on the event type. Their attributes are:uuid
= The uuid of the related property.path
= The path of the related property.type
= The content type of the related property.value
= The value of the related property.created
= The unix timestamp in ms when this related property was created.updated
= The unix timestamp in ms when this related property was updated last time.
.created
This event message is send after a new property was created.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.created.{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 | ||
---|---|---|
| ||
{
"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.
.copied
This event message is send after a new property was copied.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.copied.{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 | ||
---|---|---|
| ||
{
"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.
.deleted
This event message is send after a property was deleted.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.deleted.{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 | ||
---|---|---|
| ||
{
"timestamp": integer,
"correlationId": "string",
"namespace": "string",
"payload": {
"origin": {
"uuid": "string",
"path": "string",
"type": "string",
"value": "string",
"created": timestamp,
"updated": timestamp
},
"target": null
}
} |
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.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.updated.{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 | ||
---|---|---|
| ||
{
"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.
.comment.created
This event message is send after a comment was added to a property.
The full structure of the event message routing key is like this:
Code Block |
---|
pipeforce.event.property.comment.created.{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 | ||
---|---|---|
| ||
{
"comment": {
"uuid": "theUuidOfThisCommentProperty",
"target": "theUuidOfTheTargetProperty",
"author": "authorUsername",
"text": "Text of the comment"
}
} |
Info |
---|
Note: Since a comment is also a property, also a |
.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 | ||
---|---|---|
| ||
{
"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.log
This topic group forwards all important log events of severity level WARN
or higher.
...