Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do.
How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually.
This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body.
Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print"
Prerequisites:
The following are the one-time prerequisites.
Match: Exact
Type: Other
Name/IP: localhost
Username: <WFA Admin/Architect Username>
Password: <User Password>
Steps:
Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.
To summarize:
Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.
Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.
Now Execute it. After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."
See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.
Have fun.
sinhaa
Solved! See The Solution
Hello WFA community users,
Adding the solution for JSON User-Input body as well. The method to use it remains same.
You can download and import the .dar file in WFA4.1 or above. Also providing the command code in .TXT format.
sinhaa
I am getting the following error message when i execute my workflow with the command in it.
Exception calling "Save" with "1" argument(s): "Could not find a part of the path 'C:\temp\TFG27 DS NFS volume Resize - copy__03_10_2016_10_08_36_.xml'."
c:\temp exists on my PC.
PS C:\temp> ls
PS C:\temp>
Any help is much appreciated.
Thanks.,
Promoth
Okay. First thing I want to tell that DO NOT expect this command to pass. Its made to fail. Yeah not with this error, see here.
The command tries to save the XML file on the WFA server's C:\temp\ . Have you installed your WFA on your PC? Do you have permission to create files in this folder? If not check if C:\temp is on your WFA server or not.
I'll modify the code to perform this check before. Will update the Dar file.
In this image, you should still be getting the Uer-Input XML body in command execution logs even though saving the file failed. You can copy-paste that line.
Sinhaa
Hello WFA community users,
Adding the solution for JSON User-Input body as well. The method to use it remains same.
You can download and import the .dar file in WFA4.1 or above. Also providing the command code in .TXT format.
sinhaa