This guide provides instructions for how to set up recursion in Okta Workflows.
- Okta Workflows
Recursion is when a function calls itself until it solves a problem. In Okta Workflows, recursion is when a flow calls itself.
A common use case is when a flow iterates over an API response with multiple records and combines the previous records with the next set until it has processed all records.
NOTE: Before you consider recursion, consider using the streaming data option or the Get(Streaming) option in the Okta-Custom API Action card.
Recursion in Workflows
Okta compiled the following resources to help you learn how to set up recursion.
- Knowledge Article(s)
- Flows (community templates)
- Paginate API response
- Paginate Okta via link headers
- Paginate Okta API via Headers Recursively – Template
- Example of Paginated API Response to Parent Flow (recursive flow)
- Okta Workflows and recursion (example iterating through a paginated API response)
- Paginage Workflows table
- Other examples
- Paginate API response
- Video
Factorial calculation example
The following two screenshots show the factorial calculation.
Start flow.
The helper flow calls itself to calculate the factorial.
Calculating the factorial of 5:
Calculating the factorial of 5.
