Daniel Cinnamon

Handling Provisioning Node Failures

Blog Post created by Daniel Cinnamon Employee on Aug 8, 2016

Ever since provisioning nodes were released in version 6.8.1, I've had a love/hate relationship with them.  On the one hand, they allow you to execute pretty much any sort of provisioning in your workflow (at the risk of turning workflow into a scripting language).

However, up until relatively recently, they've been very bad at reporting their status.  Did that command execute properly?  Did your account get setup the way you want?  Do we need to let support know that a person may not have the proper configuration? I don't know!

 

Well- good news- because as of 6.9.1 patch 6- there is now a way to do this right within workflow!  Let's walk through it quickly.

 

First, as of 6.9.1 patch 6, you'll notice a new checkbox on the provisioning command node.  This will force the node to wait for a response from AFX, and store that response in workflow variables.

After the command executes, there are now 2 new workflow variables available to you.

 

acm.provisioningCommandStatusCode

     -0 = Success

     -1 = Failure

 

 

acm.provisioningCommandStatusMessage

     Contains the text failure message from AFX.

 

What's not immediately clear is how to actually use these variables... they don't show up in the UI anywhere.  Here's how:

 

${jobUserData_acm.provisioningCommandStatusCode} and

${jobUserData_acm.provisioningCommandStatusMessage}

 

I've found that the decision node can't use these directly- so I created job level variables like so:

(this can be done by right clicking on any blank space on the workflow job, and selecting "properties" from the context menu).

I then set this value equal to ${jobUserData_acm.provisioningCommandStatusCode} using a set variable node.

and finally I use a decision node to branch differently based upon the result (can send email, etc).

 

I hope this helps you create more robust workflows!

 

Outcomes