Conversion function

How to convert a UUID to the proper format automatically.

A function called turnCorrelationIdToUuid in the VMUtils script include converts a UUID to the proper format automatically. Use this function to convert a UUID to the proper format within the workflow:
javascript:VMUtils.turnCorrelationIdToUuid(<uuid from another source>)

For example, you can enter javascript:VMUtils.turnCorrelationIdToUuid('42 10 c1 62 e3 1e 70 e6-4a 03 b4 6a bb e1 7b 4f') directly in the VM uuid activity input variable.

Another method is to use the function to create a scratchpad variable that is available to all the activities in the workflow. For example, you might add a Run Script activity to the beginning of the workflow in which you create the following variable:
workflow.scratchpad.uuid=VMUtils.turnCorrelationIdToUuid('42 10 c1 62 e3 1e 70 e6-4a 03 b4 6a bb e1 7b 4f')

You can then access this variable from any activity by entering ${workflow.scratchpad.uuid} in the VM uuid activity input variable.