Skip to main content

Throw and catch on sequence - Credit card request process example

Business scenario

In the following example, we’ll explore a credit card request process that encompasses the initiation of a customer’s request, verification based on income rules, approval or rejection pathways, and communication between the client and back office.
Credit card request process with Default and Backoffice swimlanes, an income verification gateway and parallel throw and catch paths

Activities

Default swimlane (client)
  • Start Event: Marks the commencement of the process.
  • User Task 1: Customer Requests New Credit Card - Involves the customer submitting a request for a new credit card.
  • Exclusive Gateway: The process diverges based on the verification result (dependent on income rules).
    • Path A (Positive Verification):
      • User Task 2: Approve Credit Card Application - The bank approves the credit card application.
      • End Event: Denotes the conclusion of the process for approved applications.
    • Path B (Negative Verification):
      • Parallel Gateway Open: Creates two parallel zones.
      • First Parallel Zone:
        • User Task 3: Reject Credit Card Application - The bank rejects the credit card application.
        • Message Throw Intermediate Event: Signals the rejection, throwing a message to notify the back office department.
        • End Event: Signifies the end of the process for rejected applications.
      • Second Parallel Zone:
        • User Task 3: Reject Credit Card Application - The bank rejects the credit card application.
        • Message Catch Intermediate Event: The back office department is notified about the rejection.
        • Send Message Task: A notification is sent via email to the user about the rejection.
        • End Event: Signifies the end of the process for rejected applications.
Backoffice swimlane
  • Message Catch Intermediate Event: The back office department awaits a message to proceed with credit card issuance.
  • Send Message Task: Send Rejection Letter - Involves sending a rejection letter to the customer.

Sequence flow

Message flows

A message flow connects the Message Throw Intermediate Event to the Message Catch Intermediate Event, symbolizing the communication of credit card approval from the credit card approval task to the back office department. In summary, when a customer initiates a new credit card request, the bank verifies the information. If declined, a message is thrown to notify the back office department. The Message Catch Intermediate Event in the back office awaits this message to proceed with issuing and sending the rejection letter to the customer.

Configuring the BPMN process

To implement the illustrated BPMN process for the credit card request, follow these configuration steps:
1
FlowX.AI Designer: Open FlowX.AI Designer.
2
Draw BPMN Diagram: Import the provided BPMN diagram into FlowX.AI Designer or recreate it by drawing the necessary elements.
3
Customize Swimlanes: Set up the “Default” and “Backoffice” swimlanes to represent different departments or stakeholders involved in the process. This helps visually organize and assign tasks to specific areas.
4
Define User Tasks: Specify the details for each user task. Configure User Task 1, User Task 2, and User Task 3 with appropriate screens.
  • User Task 1 - customer_request_new_credit_card
We will use the value from application.income key added on the slider UI element to create a business rule in the next step.
Request a new credit card screen with a monthly income slider, an email field and a Submit request button
  • User Task 2 - approve_credit_card_request
Approval modal reading Your credit card request is approved, with a Finish button
In this screen, we configured a modal to display the approval confirmation. The modal acts as a single brief interruption before the process advances, not as a step in the main flow. See Process design principles for when a modal is appropriate.
  • User Task 3 - reject_credit_card_request
Rejection screen reading Your credit card request was rejected, with a Close button
5
Configure Gateways: Adjust the conditions for the Exclusive Gateway based on your business rules. Define the conditions for positive and negative verifications, guiding the process down the appropriate paths.
In our example, we used a JavaScript rule to determine eligibility based on the income of the user. We used the application.income key configured in the first user task to create the rule.
Gateway Decisions tab of income_verification with a JavaScript rule on application.income routing to approve_credit_card_request or open_parallel
Also, add Parallel gateways to open/close parallel paths.
open_parallel and close_parallel gateways around the reject path in Default and the catch path in Backoffice
6
Set Message Events: Configure the Message Throw and Message Catch Intermediate Events in the “Default” and “Backoffice” swimlanes, respectively. Ensure that the Message Catch Intermediate Event in the “Backoffice” swimlane is set up to wait for the specific message thrown by the Message Throw event. This facilitates communication between different stages of the process.
7
Define End Events: Customize the End Events for approved and rejected applications in the “Default” swimlane. Also, set an end event in the “Backoffice” swimlane to indicate the completion of the back-office tasks.
8
Configure Send Message Task: Set up the Send Message Task in the “Backoffice” swimlane to send a rejection letter as a notification to the user.
Send Notification action on send_rejection_letter using the credit_card_rejection_letter template
Define the content of the rejection letter, the method of notification, and any additional details required for a smooth user experience. More details on how to configure a notification can be found in the following section:
9
Validate and Test: Validate the BPMN diagram for correctness and completeness. Test the process flow by simulating different scenarios, such as positive and negative verifications.

Configuring intermediate message events

Configuring message events is a crucial step in orchestrating effective communication and synchronization within a business process. Whether you are initiating a message throw or awaiting a specific message with a catch, the configuration process ensures information exchange between different components of the process. In this section, we explore the essential steps and parameters involved in setting up message events to optimize your BPMN processes.

Message throw intermediate event

A Message Throw Intermediate Event is an event in a process where a message is sent to trigger communication or action with another part of the process (can be correlated with a catch event). It represents the act of throwing a message to initiate a specific task or notification. The event creates a connection between the sending and receiving components, allowing information or instructions to be transmitted. Once the message is thrown, the process continues its flow while expecting a response or further actions from the receiving component.
throw_rejection_message node between reject_credit_card_request and close_parallel

General Configuration

  • Correlate with catch message events — The dropdown contains all catch messages from the process definitions accessible to the user. In our example: throwcatchsequenceloan
It is imperative to define the message for the catch event first. This ensures its availability in the dropdown menu when configuring the throw intermediate event.
  • Correlation Key — A business or process variable that identifies the target instance. In our example, we used processInstanceId, automatically available in instance metadata at runtime.
  • Send data — Define a JSON structure with the data to transmit alongside the message. In this example, we used dynamic data from user input bound to a slider UI element.
  • Process Stage - Assign a stage to the node.
In the end, this is what we have:
Node Config of throw_rejection_message with the throwcatchsequenceloan message, processInstanceId correlation key and send data

Message catch intermediate event

A Message Catch Intermediate Event is a type of event in a process that waits for a specific message before continuing with the process flow. It enables the process to synchronize and control the flow based on the arrival of specific messages, ensuring proper coordination between process instances.
catch_rejection_message node in the Backoffice swimlane, followed by send_rejection_letter

General Configuration

  • Trigger Type — Set to Internal Throw Message, so the event waits for a message thrown by a Message Throw Intermediate Event.
  • Correlate with throwing message events — Must match the message name configured on the corresponding throw event. In our example: throwcatchsequenceloan
  • Correlation Key — Must resolve to the same value as the throw event’s correlation key at runtime.
  • Process Key — The process key where the data received from the throw event will be stored.
  • Process Stage - Assign a stage to the node.
Node Config of catch_rejection_message with Trigger Type Internal Throw Message, the throwcatchsequenceloan message, processInstanceId correlation key and rejection process key

Testing the final result

After configuring the BPMN process and setting up all the nodes, it is crucial to thoroughly test the process to ensure its accuracy and effectiveness.
We will test the path where the user gets rejected.
Finished credit card request instance on the reject path, with application and rejection values in the Variables tab
The instance’s Notifications tab shows the rejection letter sent to the user by email:
Notifications tab listing the credit_card_rejection_letter email as delivered

Interprocess communication with throw and catch events

Facilitate communication between different processes by using message intermediate events.

Business scenario

Consider a Bank Loan Approval process where the parent process initiates a loan application. During the execution, it throws a message to a subprocess responsible for additional verification.

Activities

Parent Process:
  • Start Event: A customer initiates a loan application.
  • Start Subprocess: Initiates a subprocess for additional verification.
  • User Task: Basic verification steps are performed in the parent process.
  • Throw Message: After the basic verification, a message is thrown to indicate that the loan application is ready for detailed verification.
  • End Event: The parent process concludes.
Subprocess:
  • Start Event: The subprocess is triggered by the message thrown from the parent process.
  • Catch Message: The subprocess catches the message, indicating that the loan application is ready for detailed verification.
  • (Perform Detailed Verification and Analysis)
  • End Event: The subprocess concludes.

Sequence flow

Message flows

  • The parent subprocess triggers the subprocess run node, initiating the child process.
  • Within the child process, a message catch event waits for and processes the message thrown by the parent subprocess.

Configuring the parent process (throw event)

loanApplication parent process: Start, start_loan_verification, loan_application_details, throw_loan_details, End
1
**Open FlowX.AI Designer and create a new process.
2
Add a User Task for user input.
  • Within the designer interface, add a “User Task” element to collect user input. Configure the user task to capture the necessary information that will be sent along with the message.
Loan application details screen with monthly income, loan amount and loan term sliders and a Send for verification button
3
Integrate a Call activity node.
  • Add and configure the “Start Subprocess” action on the node:
    • Subprocess - Select the process containing the catch message event. In our example: loanDetailedVerification.
    • Start Async (under Subprocess Options) - Enable this option. When subprocesses are initiated in async mode, the parent process continues without waiting for completion. The parent process then manages the reception of process data from the child via catch message events.
Start Subprocess action on start_loan_verification targeting loanDetailedVerification, with Start Async enabled
For a more comprehensive guide on configuring the “Start Subprocess” action, refer to the following section:Start Subprocess action
4
Insert a Throw Event for Message Initiation.
  • Add a “Throw Event” to the canvas, indicating the initiation of a message.
  • Configure the throw message intermediate event node:
    • Correlate with catch message events — The dropdown contains all catch messages from the process definitions accessible to the user. In our example: throwcatchDocs
    • Correlation Key — A business or process variable that identifies the target instance. In our example, we used processInstanceId, which is automatically available in instance metadata at runtime.
    • Send data — Define a JSON structure with the data to transmit alongside the message. In this example, we used dynamic data from user input bound to slider UI elements.
Node Config of throw_loan_details with the throwcatchDocs message, processInstanceId correlation key and client_details send data

Configuring the subprocess (catch event)

loanDetailedVerification subprocess: Start, catch_loan_details, detailed_verification, End
1

Insert an Intermediate Message Catch event

Configure the node:
  • Trigger Type — Set to Internal Throw Message.
  • Correlate with throwing message events — Use the same message name added for the associated throw message event.
  • Correlation Key — Set to parentProcessInstanceId. Since this is a subprocess, the engine extracts the parent’s process instance ID, which matches the processInstanceId value extracted by the throw event in the parent process.
  • Process Key — The process key where the data received from the throw event will be stored.
Node Config of catch_loan_details with Trigger Type Internal Throw Message, the throwcatchDocs message, parentProcessInstanceId correlation key and loanDetails process key
2

Integrate a Service Task

  • Integrate and Fine-Tune a Service Task for Additional Verification.
  • Incorporate a service task to execute the additional verification process. Tailor the configuration to align with your preferred method of conducting supplementary checks.

Subprocess-to-subprocess communication

Facilitate communication between sibling subprocesses (two subprocesses started from the same parent process) using message intermediate events.

Business scenario

Consider a process where a parent process starts two subprocesses: one for document verification and another for fraud checks. Once the fraud check subprocess completes its analysis, it sends a message to the document verification subprocess with the results.

Correlation key for sibling subprocesses

Since both subprocesses are started from the same parent, they share the same parentProcessInstanceId. Use this as the correlation key on both throw and catch events:
  • Throw event (in Fraud Check subprocess): Correlation Key = parentProcessInstanceId
  • Catch event (in Document Verification subprocess): Correlation Key = parentProcessInstanceId
At runtime, both resolve to the same value (the parent’s process instance ID), so the engine can match them.
Alternatively, you can pass a custom business key (e.g., applicationId) from the parent to both subprocesses and use that as the correlation key.

Timing: catch must be waiting before throw fires

The catch event must reach its waiting state before the throw event executes. If the throw fires first, there is no registered listener to receive the message and correlation will fail.Common pitfall with async subprocesses: If Call Activity 1 is set to Start Async, it launches Subprocess A without waiting for it to complete, and the parent immediately starts Call Activity 2 (Subprocess B). If Subprocess A reaches its throw event before Subprocess B reaches its catch event, the message is lost.Solutions:
  • Ensure the subprocess with the catch event starts first (or has enough lead time to reach the catch node)
  • Add a timer or additional tasks before the throw event to give the catch event time to register
  • Reverse the logic: place the catch in the subprocess that starts first (async), and the throw in the one that starts second

Throw with multiple catch events

Throw with multiple catch events example

Download the example
Last modified on November 19, 2026