Use PMG’s new Follow Output action
Take a mulligan on us

As we all know, the “happy path” doesn’t always happen. So, sometimes you need to trigger an already executed workflow action to follow a certain output. Common scenarios include troubleshooting logic and cancellation logic.

While this has been do-able in PMG, it hasn’t been simple. Previously, solution developers would have to use a REST call to our SPEWS web service to then invoke the FollowActionOutput method. Phew…it even sounds exhausting!

Now, the Follow Output workflow action gives you the ability to do this organically – target an executed workflow action and force it to follow a desired output path.

While the use cases for this action vary, one of the most common is to cancel an in-flight workflow. Here is an example of how one workflow is triggered from another and directed to follow a specific output path – in this case to cancel the request:

Triggering workflow – This is the workflow with the Follow Output action configured. The workflow can be invoked from another service request (or via a JavaScript function if you want to get fancy – think buttons on App Designer pages or even in an email).

Targeted workflow/action – This is typically a workflow tied to a service. It contains the action being targeted to follow a specified output despite being already executed.

Legacy Logic – Here is a snapshot of how this would have been done PRIOR to the existence of the Follow Output action. Big improvement, right?!

As you see in the example, the Follow Output action is extremely useful to trigger a desired output from the same or a completely separate workflow instance. And now it can be configured without having a constant waiting/sleeping action hanging out in the wings, potentially impacting Workflow Events from firing in the event of an error.

How to Configure – The action requires only three properties to configure:

  • Action Step Id: the unique action id of the executed action you want to have follow a desired output
  • Output: the desired output you want the targeted action to follow
  • Complete Action: determines if the specified action instance will be completed or sleeping after the output is followed

So, just give the commands to the action, and the action does the command on command. Easy peasy!