5 - Automate actions based on event triggers

Event destination

When processing events we can send the results to a new Kafka topic. This lets the results from the flow be used to trigger automations, notifications, business workflows, or be processed further in other applications.

Note: To follow the step-by-step instructions in this tutorial, you can watch the video or read the instructions on the page.

Scenario : Distributing results of analysis and processing

The EMEA operations team wants to provide a dedicated stream of EMEA order events for further processing.

Instructions

Step 1 : Create a flow

This tutorial begins with the flow that is created in Identify orders from a specific region.

If you haven’t completed that tutorial yet, you should do it now.

  1. Edit the flow title and description to describe the changes that you will make.

    screenshot

    Click the flow title in the header bar to open the flow details.

    Enter a new title and description and click Save.

Tip: Keep this page open - you will need it again in a moment. Do the following step in a separate browser window or tab.

Step 2 : Create a destination Kafka topic

The next step is to create a topic that you will use for the results from this flow.

  1. Go to the Event Streams home page.

    screenshot

    If you need a reminder of how to access the Event Streams web UI, you can review Accessing the tutorial environment.

  2. Click the Create a topic tile.

  3. Create a topic called ORDERS.EMEA.

    screenshot

    You can accept the defaults for the remaining properties of the topic.

  4. Click into the new topic page, and then click Connect to this topic.

    screenshot

  5. Get the internal address of the Kafka listener to use for the new topic.

    screenshot

    Click the copy button for the Internal Kafka listener to copy the address to the clipboard.

Step 3 : Provide a destination for results

The next step is to define the event destination for your flow.

  1. Create an Event destination node in the Event Processing flow window.

    screenshot

    Create an event destination node by dragging one onto the canvas. You can find this in the Events section of the left panel.

  2. Hover over the event destination node and click the Edit icon Edit icon to configure the node.

    In Details > Node name, name the destination as output.

  3. Paste the internal Kafka listener address copied from Event Streams in Step 2 into the Server field.

    screenshot

  4. Use the username and password for the kafka-demo-apps user for accessing the new topic.

    screenshot

    If you need a reminder of the password for the kafka-demo-apps user, you can review the Accessing Kafka topics section of the Tutorial Setup instructions.

  5. Select the new ORDERS.EMEA topic to use as a destination.

    screenshot

  6. Click Configure to finalize the event destination.

Step 4 : Test the flow

The final step is to run the flow and confirm that the EMEA orders are produced to the new topic.

  1. Use the Run menu, and select Include historical to run your filter on the history of order events available on this Kafka topic.

    screenshot

  2. Confirm that the events are filtered correctly to only EMEA orders from Event Processing.

    screenshot

  3. Confirm that the filtered events are produced to the new topic from Event Streams.

    screenshot

  4. You can leave the flow running to continue producing filtered events to the new topic.

    screenshot

Recap

You output the results of your first event processing flow to a new Kafka topic.

Next step

In the next tutorial, you will see how to share the results of your event processing flow by adding this new topic to the Event Endpoint Management catalog.