Executing playbooks in sequence


Overview

journy.io's Playbooks have been created with simplicity in mind. The basic structure of any playbook consists of 5 elements:

  • Entry Condition

  • Main Actions

  • Goal Conditions: optional

  • Actions when goal was reached: optional

  • Actions when goal was not reached: optional

Main actions are all being processed altogether when a user/account meets entry conditions. The playbook then waits until goal conditions are met, or optionally until a time-out, to then execute either goal-reached actions or goal-not-reached actions —again— altogether.

By default, when user/account playbooks are created, all of them are set to execute simultaneously. For instance, if you have three playbooks that monitor whether 'property P' exceeds a value of 15, as soon as 'property P' is set to 20, all three playbooks will be executed concurrently.

But what if you want to perform actions in sequence, to only start a next playbook when a previous one has finished executing...potentially even under certain conditions?

image-20240417-092915.png

Onboarding and offboarding sequences would typically need executing playbooks in sequence.

The use of tags in playbooks

A pivotal aspect of executing playbooks in a sequential manner involves utilizing the 'Add tag' system action. Additionally, for efficient tag management and cleanup when tags are no longer necessary, you can utilize the 'Remove tag' system action.

image-20240417-092935.png

Eventually, each of your sequential playbooks will look like this:

These sequential playbooks will have a very obvious entry conditions that checks if user/account has the playbook's entry tag. In other words, setting the tag will start the playbook. An additional advantage is that one can manually set the tag for any given user/account.

How to start a playbook when ALL of previous playbooks have finished executing?

Visualize the scenario where three separate playbooks are in the process of execution, and your objective is to trigger a fourth playbook once all three preceding playbooks have successfully completed their execution.

If you want Playbook 4 to start when all previous Playbooks 1, 2, 3 have ended, you should tag the user/account at the end of each playbook 1, 2, 3, with for each previous playbook a different tags. This is how the condition would look like:

How to start a playbook when ONE of previous playbooks have finished executing?

Envision this scenario: three playbooks are currently running, and your goal is to initiate the execution of a fourth playbook as soon as one of the preceding three has completed its execution.

If you want Playbook 4 to start when one (any) of the previous Playbooks 1, 2, 3 has ended, you would simply want previous Playbook 1, 2, 3 to set the same starting tag for Playbook 4. The first previous playbook 1, 2 or 3 to set the tag, will start next playbook 4.

However, in some cases, you may want to keep track of different tags, to know which previous Playbook 1, 2, 3 was responsible for starting the next Playbook 4. In that case, this is how the entry condition of Playbook 4 would look like:


Tip: Need help with your Playbooks?

Reach out to our support team

https://releasemanagement.atlassian.net/servicedesk/customer/portal/14

or book time to make it together