<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How Okta Workflows Processes Batched Events Sent to an API Endpoint Workflow or Okta Event Card Trigged Workflow
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

When an Okta Event Hook is configured to trigger a workflow that uses an API Endpoint or Okta Event Card, if multiple events occur within a short time of each other, the events will be grouped and sent as a batch to Workflows. 

 

When using an API Endpoint to trigger the workflow, only one execution of the workflow is started for the entire batch of events, and the workflow must be designed to account for the incoming payload, potentially including multiple events.

 

When using an Okta Event card to trigger the workflow, a separate flow will be triggered for each event in the batch. However, by default, batched events will execute like a List For Each with a concurrency of one.  If any execution within the batch fails, all subsequent events remaining in the batch will not trigger a flow execution.  If there are any long Wait operations within the flow, it may appear as if not all executions were triggered, as each execution is delayed until the execution for the previous event in the batch has finished before starting the next execution.

Applies To
  • Workflows API Endpoint Event Card
  • Workflows Okta Event Cards
  • Okta Event Hooks
  • Okta Event Batching (Ongoing Event Delivery - "Events that occur within a short time of each other are amalgamated in the array, and each array element contains information on one event.")
Cause

This is expected behavior when using event hooks with Okta Workflows.

When using an API Endpoint triggered Workflow and multiple events are sent to the endpoint in a batch, only a single execution of the flow will be triggered, and the workflow must be designed to process each event in the batch.

When using an Okta Event card to trigger a workflow, rather than an API Endpoint, events may still get batched, but Workflows will start a separate flow execution for each event in the batch only after the previous item in the batch is done processing. This can be seen in the workflow history:
Batched Workflow History 

 

Solution

API Endpoint Invoked Workflow

The API Endpoint workflow must be designed to account for the incoming payload containing multiple events.

  1. Create a Helper Flow with an input of type Object.

    • In this example, the input is named eventData.
      Helper Flow 

  2. In the API Endpoint workflow:

    1. Add an Object Get card to retrieve the data.events array from the body of the API Endpoint event card.

      • Ensure the Object Get card output is configured as a list of objects, as shown in the screenshot below.

    2. Add a List For Each card to iterate through the list of events in the data.events array.

      1. Drag the output from the Object Get card into the list input of the List For Each card.

      2. Select the Helper Flow created in Step 1. The eventData input will be exposed on the card.

      3. Click the drop-down arrow on the eventData attribute and select Item​​​​​.
        API Endpoint Flow 

  3. Add logic to the Helper Flow to process each event accordingly. Each event's data will be passed into a separate execution of the Helper Flow.

 

 

Okta Event Card Invoked Workflow

To configure an Event card invoked flow to process the batched events as a list of events, similar to an API Endpoint flow, change the Run Mode to List of records:

  1. Change the Event Card to LIST MODE.
    1. Click the gear icon > select Runs when: Each Record.
    2. Change to List of records and click Confirm.

Event Card

  1. Send the event card List output to a LIST - FOR EACH IGNORE ERROR with concurrency higher than 1 and less than 20.

LIST - FOR EACH IGNORE ERROR

  1. Send that Object to CALL FLOW - ASYNC to process the original flow actions.

CALL FLOW - ASYNC


Related References

 

Recommended content

Loading
How Okta Workflows Processes Batched Events Sent to an API Endpoint Workflow or Okta Event Card Trigged Workflow