mahdi_gara1 Valued Contributor.
Valued Contributor.
855 views

Resuming a flow with inputs

I wanted to resume a flow and passing its inputs through REST calls to HP OO Central. The flow is about creating a new user in the Openstack identity service with admin credentials.

In fact, i used postman client with the parameters above :

URL : https://localhost:8443/oo/rest/executions/${execution_id}/status

Json Body : 

{
"action":"RESUME",
"data":{

"identityEndpoint":"http://192.1.1.184:5000" ,
"authToken" : "gAAAAABZAhe7nhuzcq2JXftYv1Ta181Dm6Bfa2UsfCXVuqVppPc-xkUGJ-SjcqoYvntDO25gqW7qitsZpuLVjJ9-4ItaaaPDpoaX_Ys53KGZ8ZB_GL2Y8hvnZ8iAsudj0uO464H2wX5G3k-fgZSOfqwqGbK1sSS9zSHN1Ci9yirHLX6AmnuNJL8" ,
"userName" : "gara" }
}

But doesn't work for me. Can anyone help me please?

Labels (1)
0 Likes
12 Replies
dani_c Respected Contributor.
Respected Contributor.

Re: Resuming a flow with inputs

Hi, 

According the latest API guide, the data object should have the following format when resuming a flow with inputs:

Screen Shot 2017-05-02 at 14.32.22.png

 Thanks,

Daniel

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

Hi dani , 

I also used the code that u mentionned and still no solution. 

If you have an idea about the branchId, it can help me because there is no clear explanation in the API guide.

Thanks, 

0 Likes
dani_c Respected Contributor.
Respected Contributor.

Re: Resuming a flow with inputs

When you take the execution pauses from an execution, in the response you'll receive a branch id which represents the branch were the pause has occurred. If the pause is on the main branch this id will be null. You can find more on the execution pauses section in API Guide:

Screen Shot 2017-05-02 at 15.58.05.png

Can you tell us what is the response code and error that you get when you try to resume your flow? 

Thanks,

Daniel

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

Hi again, 

 

when i tried to send the PUT request, i get a 500 internal server error. However when i tried a sample RESUME request with another flow that doesn't require inputs, it works.

 tt.jpg

0 Likes
dani_c Respected Contributor.
Respected Contributor.

Re: Resuming a flow with inputs

Can you please make the get pause execution call also, just to make sure that the branch id is null?

Thx,

Daniel

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

i verified the branchId and it is null

gg.JPG

0 Likes
dani_c Respected Contributor.
Respected Contributor.

Re: Resuming a flow with inputs

I see the two required inputs in the screenshot, can you scroll down and show me the other ones? It looks like the call structure is correct but somehow the Central server does not recognize the content.

Thank you,

Daniel

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

Here is the end of the response

yy.JPG

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

Hi again, 

i want just to fix something. I tried a get request for getting flow's inputs. The result was null (the flow contains no inputs).

i mean only the first step requires these 3 inputs but the OO server can't take them in consideration.

 

Thanks, 

0 Likes
dani_c Respected Contributor.
Respected Contributor.

Re: Resuming a flow with inputs

That's ok, the inputs are not exposed at the flow level, that's why the response it's empty. Can you take a look in the OO Central server log to see if you can identify something or you can send it to me on crisan@hpe.com and i will take a look. 

Thanks,

Daniel

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

 I will check the log files and will contact you in case of problem. Thank you for your assistance.

 

Regards, 

0 Likes
mahdi_gara1 Valued Contributor.
Valued Contributor.

Re: Resuming a flow with inputs

Hi again , 

After trying a lot with requests, i recognized that in json body format, HP OO Central can't read "input_binding" as an object in the object "data".

When i tried the syntax :   "input_binding" : "myinput" as a single value (not an object), i get an error parsing input.

hhh.JPG

Can anyone provide me the right sytax please? I tried the same as in the API_guide but still doesn't work.

 

Regards, 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.