Flattening a Runbook

David Clarke 21 Reputation points
2020-12-02T16:42:31.897+00:00

I am working on making a runbook that will Move staff from one location to another in organization. Part of the process is to remove the user from a list of current groups.

I have made a text file of groups the users should be removed from and then pass that data on to a remove 'user from group' step which runs through and removes the user from all groups. At this point the runbook will run all the following steps as many times as the user was removed from groups.

44502-runbook1.png

so if the user was removed from 2 groups the remaining steps will run 2 times, if the user was removed from three groups the remaining steps will run 3 times, it will also run the child runbook the same number of times as well.

How can i set the steps so any steps after the remove user from groups step will only run once. I have tried use the Flatten returned data on steps but the runbook continues to attempt to run multiple times?

Thanks

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
216 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,681 Reputation points
    2020-12-02T16:53:01.867+00:00

    Hi @David Clarke ,

    If a runbook activity returns multiple results the next runbook activity will be triggered that number of times (if you did not exclude something in a link).
    So the next runbook activity will run that number of times, the flatten effects triggers the next runbook activities if the runbook activity has multiple results.
    An runbook activity will produce a new set of data every time it runs, the flatten feature does not flatten data across multiple executions of the same runbook activity.

    If you want that the next runbook activity will be triggered only once you also can put a Junction before that.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Best regards,
    Leon

    0 comments No comments

0 additional answers

Sort by: Most helpful