DEV Community

Max Katz for Okta Workflows

Posted on • Originally published at maxkatz.net on

Workflows Tips #16: Secrets for Dragging a Value, Converting App Assignment, and Referencing Variables From a Helper Flow

In this post:

  • Secrets for dragging and dropping a value
  • Convert application assignment
  • How to reference variables from a helper flow

Secrets for dragging and dropping a value

Ok, this tip is going to be in a different format (hey, I’m just trying this). This question was posted in MacAdmins Slack channel and the wonderful folks there offered their solutions which I’m posting below as well.

This question was posted by Ylan Muller, an avid Okta admin and certified consultant, member of the MacAdmins Slack Community, and the IT Manager at FireHydrant:

Does anyone have any secrets for dragging and dropping a value from the beginning of a workflow to a card towards the very end? I have a workflow that is lengthy and it takes a longggg time to map values to cards that are on either end from each other. In IPaaS tools I’ve worked with in the past it can discover value names from other cards so you can easily search and map, but I don’t think Okta Workflows has that?

These are solutions posted by Workflows community folks.

This tip is from Rob. Rob is IT Manager at Fulcrum—the leading field inspection management platform—where he manages their SaaS portfolio, IAM, SOC 2 compliance, and other fun things as they arise. He has been a Mac fan since he got a used 512Ke in 1988, and has been managing Macs since 1999.

Dragging a value in a flow

Dragging a value in a flow

FWIW, you can drag a value from anywhere you already have it mapped in your flow; and, the original value is used.

This tip is from Pete Viri. Pete is an Okta Certified Professional, with over of 10 years of IT experience currently working as a Systems Engineer at Airtable.

you can use dummy cards to hold the value for you so you don’t lose your place incase you misdrag

This tip is from Bill Easton. Bill is a Security Tech Lead at Redox.

You can use the Assign card (multiple times) and distribute them on long flows, so you don’t have to scroll back so far. You can also use it as the dummy cards.

And here is another tip/solution from Pete Viri:

if you’re dragging a lot of values, just put the target card at the beginning and drag all the values first, then drag the card to the end so you dont have to drag multiple things a long distance

And one more from Gabriel Sroka. Gabriel is an Okta expert and developer of the rockstar Chrome extension. Gabriel also hangs out in the MacAdmins #okta-workflows Slack community.

You can pin the first card. Then you can scroll the flow to any card further in the flow and make a connection to that card.

Pushpin to lock in the first card for easier connections

Pushpin to lock in the first card for easier connections

Convert application assignment

This tip is from AJ Ahrens, Workflows Team Lead at Okta.

When a person gets added to applications from self-service or some other process, you may want to convert them to Group assigned or convert them to User assigned to remove/re-add to the app if needed.

You can do this with a POST call to the following end-point:

 /api/v1/apps/{applicatID}/users/{userID} 
Enter fullscreen mode Exit fullscreen mode

using scopes query object passing in either GROUP or USER.

Custom API to convert application assignment

Custom API to convert application assignment

Ok, here is an example. A user is a part of a group and the group is assigned to a graphics application. You need to remove only this user from accessing the graphics application. You change the user’s assignment for the graphics application from group to user. Now that this user is no longer part of a group , you can remove only the user’s access to the graphics application.

How to reference variables from a helper flow

This tip is from Tim LaBorn. Tim is a Senior Technical Support Engineer for Workflows at Okta.

A flow can call another flow called a helper flow. When the helper flow is done it can return values back to the calling flow. To reference those variables, the names of the variables in the calling flow (also called parent) need to match the names in the helper flow.

Calling (parent) flow

Calling (parent) flow

In the image above, Flow Control – Call Flow is calling Calculate_helper flow. Two numbers ( number1 and number2 ) are passed to the helper flow. number1 is the name of the variable and input1 is its value. That’s the input part.

The blue rectangle shows the result or the return values from calling the helper flow (that’s the output part). In this example resultSum and resultMultiply variables will be returned.

Now, looking at the helper flow below. Notice that in Flow Control – Return card, the two blue arrows point to two variables, resultSum and resultMultiply , and these names match exactly the names in the return section from the calling flow (above). So that’s exactly how you setup and reference variables in calling/helper flow.

Helper flow

Helper flow

Another way to look at it:

  • Calling (parent) flow: setting an empty variable
  • Helper flow (return card): assigning a value to a variable.

Two resources to help you learn more:

📌 Try this step-by-step getting started tutorial: Build Your First Automation With Okta Workflows: Notify When User Is Suspended.

📌 All the Workflows resources (docs, tutorial, office hours, templates, office hours and more)

Top comments (0)