VOOZH about

URL: https://www.javacodegeeks.com/2022/07/how-to-trigger-a-flow-6-ways-to-run-a-flow.html

⇱ How to Trigger a Flow – 6 Ways to Run a Flow - Java Code Geeks


Okta Workflows how-to guides are questions and answers from weekly community office hours, MacAdmins Workflows Slack channel, and other places. Read all previous how-to guides

On to the question. 

How do you trigger a flow?

There are six ways to trigger a flow. They are:

  • Schedule (flow runs periodically)
  • Event (flow is called when a particular event is fired)
  • Manual (clicking the Test button)
  • API endpoint (another system invokes a flow via an API endpoint)
  • Helper flow (flow calling another flow)
  • Delegated flow (let someone else in your organization invoke it)

Schedule (flow runs periodically)

A flow can be scheduled to run periodically. For example, you can schedule a flow to run every hour, every day or once a week (there are other options also).

To schedule a flow, add the Schedule event:

πŸ‘ Image
Events to trigger a flow

To configure the schedule, click the πŸ•” in the bottom of the card:

πŸ‘ Image
A flow that runs on schedule

Options to configure when to run a flow:

πŸ‘ Image
Flow schedule options

Event (flow is called when a particular event is fired)

Another way to trigger a flow is when a particular event occurs in an organization. For example, this flow will run when a user is added to a group:

πŸ‘ Image
Trigger a flow when a user is added to a group

Every connector supports different events:

πŸ‘ Image
Events available from the Okta connector

Manual (clicking the Test button)

If you have a flow that needs to run manually, infrequently or just once, use the Test button to trigger a flow. Even though it says Test, it’s a perfectly fine way to run a flow.

πŸ‘ Image
Running a flow via the Test button

When manually running a flow you don’t need to have an event card set (1st card).

As API endpoint (another system invokes a flow via an API endpoint)

It is possible to trigger a flow from an external system via an API endpoint. For example, an event occurs in an external system which in turn makes a call to an API endpoint which triggers a flow.

To trigger a flow via an API endpoint, use the API Endpoint event card:

πŸ‘ Image
Triggered a flow via an API endpoint

The API endpoint information is available by clicking the </> icon at the bottom of the card.

πŸ‘ Image
API endpoint settings

To test an API endpoint use a service such as Postman.

Helper flow (flow calling another flow)

A helper flow is a flow that is called from another flow. A helper flow is usually used when there is a list of objects (users, groups, etc.) and you need to iterate over each item in a list to perform an action.

In this example, a flow named Check last login will be called for each user found via List Users with Search card:

πŸ‘ Image
Calling a helper flow

Helper flow is called for each item in a list:

πŸ‘ Image
Helper flow

A flow becomes a helper flow when using On Demand – Helper Flow event card:

πŸ‘ Image
Flow trigger event cards

Flow chart view of the main flow and helper flow:

πŸ‘ Image
Main flow and helper flow

Delegated Flow (let someone else in your organization invoke it)

Delegated Flow is when you delegate to another user to run a flow. That person might not be an administrator but needs to be able to trigger a particular flow.

To make a delegated flow, add Delegated Flow event card:

Note: as of this writing Delegated Flow is an Early Access feature.

πŸ‘ Image
Delegated flow event card

A delegated flow event card can define one or more inputs. In the screenshot below the flow has to inputs: Name and ID.

πŸ‘ Image
Delegated flow

Flow execution is delegated to another user within an organization. In the screenshot below, the user stella.green can run this flow:

πŸ‘ Image
A flow delegated to a user to run

When Stella invokes the flow, Stella will need to enter flow inputs:

πŸ‘ Image
Delegated flow inputs

Looking at flow history after Stella triggered the flow:

πŸ‘ Image
Delegated flow history

Published on Java Code Geeks with permission by Max Katz , partner at our JCG program. See the original article here: How to Trigger a Flow – 6 Ways to Run a Flow

Opinions expressed by Java Code Geeks contributors are their own.

Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

πŸ‘ Photo of Max Katz
Max Katz
July 12th, 2022Last Updated: July 4th, 2022
0 194 3 minutes read
Back to top button
Close
wpDiscuz