@MAHESH1111111
I can tell you how to get it done. I don't have a WADL, you need to make it yourself.
1. Query to get the status of the Workflow execution
-----
The API :
/workflows/jobs/{jobId}'
shall give you the status of the given job. You would need to parse the result and extract the Job status
2. which step it failed during the execution
There is not direct way to get to know this. But it can be done. See below
/workflows/executions/{jobId}
Will get you the command-execution-arguments details of every command in this job. A sample is below:
<command-execution-arguments>
<command-uuid>ba009c9c-44b9-4705-85a4-012da95b6df1</command-uuid>
<command-name>Get a workflow using custom REST Path</command-name>
<command-display-name>Get a workflow using custom REST Path</command-display-name>
<command-string-representation>/waiting</command-string-representation>
<command-type>STANDARD_COMMAND</command-type>
<arguments>
<argument key="Method" value="POST"/>
<argument key="RestPath" value="/waiting"/>
</arguments>
<atom:link rel="log" href="http://localhost:90/rest/workflows/executions/5600/log/0"/>
</command-execution-arguments>
Every command-execution-arguments will have a link to the command logs ( marked in RED ) . This API will give you the command execution logs. Sample:
<collection>
<log-message>
<level>INFO</level>
<date>1486030727342</date>
<message>
### Command 'Get a workflow using custom REST Path' in 'POWER_SHELL' ###
</message>
</log-message>
<log-message>
<level>INFO</level>
<date>1486030729879</date>
<message>Command completed, took 2537 milliseconds</message>
</log-message>
</collection>
If the last log message contains 'Command completed'. then this command passed in the workflow.
For a failed command in a workflow, the last message will contain: Workflow Execution Failed
Alternatively,
I can sugegst that If you do not want to get this list of command-execution-arguments and then find the links to command logs you can follow the below algorithm
i=0
try:
while( true)
call GET on /workflows/executions/{jobId}/log/{i}
Check for the last log message containg 'Command Completed'.
i=i+1
catch:
Catch happens when i goes above the last command in the workflow.
do nothing
Now you have found which command(s) has failed in your workflow.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.