Read loop output outside workflow loop

Hi,

Is it possible to read a loop’s output values outside of a loop ? Or to define a variable outside the loop, modify it within the loop, and reference it outside the loop ?

let me what is the scenario?

The scenario is that I have a json input that can be

"contextMappings": [
  { "Country": ["DE", "BG"] },
  { "Store" : ["5"] }
     ]

or

"contextMappings": [
  { "Country": ["AT"] },
  { "AppName" : ["App1", "App2", "App3"] }
     ]

I want to iterate over these values and form a query like:

  1. extension_ID/any(s:s eq ‘Country:[DE,BG]’) and extension_ID/any(s:s eq ‘Store:[5]’), or
  2. extension_ID/any(s:s eq ‘Country:[AT]’) and extension_ID/any(s:s eq ‘AppName:[App1, App2, App3]’)

I have been trying several things, but am not able to construct the string. I found that a variable defined externally cannot be modified, loop values cannot be referred outside a loop, I am running out of ideas how to handle this scenario.
Any pointers/ideas are welcome.
Thank you !

Hi @sanasalim
Simple answer is no, You cannot get the data outside loop. At-least with the available out of the box options that are there…

Coming to the next query of crafting some query.
The idea that comes top of my head is

  1. Create a source in sailpoint just to store the data that you are getting from somewhere, create attribute like country and appName in the source mark them as multivalued as they are array objects.
  2. Then using HTTP action in workflow store the information in that source.
  3. Using a builmap rule to craft it into query and store in the source into some query like eg: contry_query: (and then here based on conditions craft the new query).
  4. Next, once you have the query crafted.
  5. Next, step is to re-trigger the workflow for some action. for this you can either use Native Change Detection or you can use source account aggregated trigger.

Is this the best solution? No, just a solution that comes to top of my head as i am not aware about the requirements.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.