Ask Your Question
1

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: https://wiki.openstack.org/wiki/Mistral/Long_Running_Business_Process (https://wiki.openstack.org/wiki/Mistr...). 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
1

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'

async_http:   
  type: direct   

  tasks:
    send_mistral_http:
    action: std.mistral_http
    input:
      url: http://requestb.in/15x5zwz1

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 102 times

Last updated: Jul 17 '16