Error on Starting SMA Runbook from Third Party System


We’ve trying to use the SMA Web Service to start SMA runbooks from another system. There is good sample of code for this and we’ve managed to get it working. Unfortunately when we’ve started to start more runbooks some of them were failing with the following error:

Exception

The values provided for the root activity’s arguments did not satisfy the root activity’s requirements: ‘DynamicActivity’: Expected an input parameter value of type ‘System.String’ for parameter named ‘Param1’. Parameter name: rootArgumentValues

 

So Param1 is defined as string in my SMA runbook as input parameter although the value that is provided is actually integer. It seems the SMA Web service itself was accepting the provided value as job was being initiated and moving to started state but failed and couldn’t go to running. Also if start the runbook from Windows Azure Pack interface with the same values the runbook completed successfully.

After some troubleshooting I’ve noticed that Windows Azure Pack was sending every parameter in quotes (example “Param1”) to SMA and our service was not doing that. We’ve reconfigured our service to wrap parameters send to SMA in quotes and now we could start any runbook without issue.

Lessons Learned: You could always learn how Windows Azure Pack does it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.