Notifications
Notifications will send emails to Cloudomation Engine users when executions succeed or abort.
Use Cases
Use notifications to
- Inform Engine users about failing executions.
- Inform Engine users about finished executions.
Concept
The notification feature is implemented as a Wrapper.
Importing the Wrapper bundle will provide you with a wrapper called notify
.
When the notify
wrapper is attached to a flow, it will monitor the execution status of the flow and send a notification on success and/or on error to a list of configured Engine users.
As all wrappers, the notify
wrapper can be statically attached and configured. Please refer to Static Wrappers for more information.
Alternatively, the notify
wrapper can be dynamically attached and configured. Please refer to Dynamic Wrappers for more information.
The most common usage is to statically attach and configure the notify
wrapper to a flow or connector. This way all executions of the flow or connector will notify about an error.
The notify
wrapper provided by Engine is considered an example which can be extended or modified to your needs.
Parameters
Refer to the notify
wrapper for its parameters.
Examples
Starting a flow which has the notify
wrapper dynamically attached
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
# we start the flow with the notify wrapper dynamically attached and specify the configuration here.
this.using(
'notify',
to=['user1'],
).flow('<name-of-a-flow>')
return this.success('all done')
You can also statically add the notify
wrapper to the flow to wrap it every time it gets executed.
Please refer to Wrapper for more information about wrappers and how to statically attach them to resources.