Ask Your Question

How to create long-running workflow in mistral?

asked 2016-07-04 07:14:06 -0500

AmitKocharekar gravatar image

I need to create a long-running workflow in Mistral. The workflow will be called from StackStorm. One of the tasks calls a REST service, which will accept the request for offline execution. Then the service will need to update the task status to COMPLETE and result of the execution. I looked at this: ( However, could not find any example of such workflow. Is it possible that the workflow sleeps after calling the particular service and listens on the callback url and resumes when there is a response?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-17 04:56:40 -0500

michal-gershenzon gravatar image

The action you need to use in order to leave the task idle in mistral until the callback is 'std.mistral_http'. The mistral engine will add the callback url as a header of the http call.

This is an example workflow:

version: '2.0'

  type: direct   

    action: std.mistral_http

This is an example header such workflow execution will send:

Mistral-Callback-Url: /v2/action_executions/72c5f082-6039-4144-99be-4e0c4403a44d
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-07-04 07:14:06 -0500

Seen: 183 times

Last updated: Jul 17 '16