Event Shapes
When something happens or needs to happen.
Event shapes are category of elements in BPMN, where they either start the process, ie. listen to events, or raise an event elsewhere and optionally stopping a process.

In Frends, event shapes are used for all of these situations. Trigger shape is used to start a Process, Return and Throw are used to end a Process, and Intermediate Return is used to send an response to caller before execution is complete. Catch is also used to listen to thrown errors within the Process, for error handling.
Trigger

In Frends, Triggers serve as vital components that automatically start Processes by responding to specific events. Triggers are adaptable, ranging from HTTP requests to changes in file directories, allowing developers to tailor the start of a process to meet their needs. For example, an HTTP Trigger can seamlessly activate a Process in response to a web service call, while a File Trigger can initiate Processes for data synchronization or document processing.
Frends platform ensures Processes are activated precisely when needed. This automation not only ensures prompt responses to events but also optimizes resource allocation by allowing the Processes to execute only when truly needed. With Triggers, Frends provides a powerful and user-friendly solution for managing and automating workflows effortlessly.
Return
When a Process is complete, Return shape is used to end the Process. It can be configured to send a response to HTTP or API caller as HTTP response, or save a result value from the Process to instance logs. It also implicitly means that the Process execution was successful, logging a successful execution of the Process.

Return shape is also used to complete a Scope shape, marking the end point of a scoped execution or iteration. In this use case Return specifies the result value for that Scope or single iteration. In the case of loops, the results from each iteration is built into an array of values from the Return shape to be the complete result value for that shape.
Intermediate Return
When Process is triggered by an HTTP or API call, Intermediate Return shape can be used to Return an HTTP response to the caller before the Process execution is complete. Unlike Return shape, Intermediate Return does not end the execution of a Process, but instead is always added as an alternative execution path to the Process.

Throw
Throw shape is used to interrupt Process's usual execution path by raising an error. If the thrown error is not caught within the Process, the whole Process execution will stop there. Subprocess to call on unhandled error can catch and handle the error if set for the Process, but this will be after the Process execution has already ended in error.
Throw is an alternative shape to use to end a Process, like Return shape. Process executions that end with Throw shape will be logged as errors in the Pprocess Instance list.
If used in an HTTP or API process and the error is not caught within the Process, the error message will be sent back to the caller as erroneous response. Like in Return shape, the HTTP response can be configured as required.

Catch
Catch shape can be used to catch errors from the connected shape, including Scope shape to handle errors from a part of the Process. The element itself does not do error handling, but instead it is commonly used with Scope shape after the Catch shape to perform error handling actions.
Unlike most other event shapes, Catch shape is not used to end the Process flow path, but instead the flow continues to an alternative path for error handling, before returning the flow back to the original path. It is more alike to a Decision shape, in that the error handling path is executed "if" an error occurs, otherwise the original path is followed.

Last updated
Was this helpful?