Allow WF author to define meaningful message for fail transition

Registered by Winson Chan

For the example:

...
  tasks:
    t1:
      action: ...
      publish:
        var1: $
      on-success:
        - fail: $.var1 != null

On the fail transition in on-success, allow WF author to provide a meaningful error message. Currently, the WF execution is failed but there is no meaningful error message.

For example:

---
version: '2.0'

create_vm_and_send_email:
  type: direct

  input:
    - vm_name
    - image_id
    - flavor_id

  tasks:
    create_vm:
      action: nova.servers_create name=<% $.vm_name %> image=<% $.image_id %> flavor=<% $.flavor_id %>
      publish:
        vm_id: <% task(create_vm).result.id %>
      on-error:
        - send_error_email

    send_error_email:
      action: send_email to_addrs=['<email address hidden>'] body='Failed to create a VM'
      on-complete:
        - fail('Failed to create a VM with image <% $.image_id %>')

Blueprint information

Status:
Complete
Approver:
Renat Akhmerov
Priority:
Medium
Drafter:
Winson Chan
Direction:
Approved
Assignee:
Hardik Parekh
Definition:
New
Series goal:
Accepted for newton
Implementation:
Implemented
Milestone target:
milestone icon newton-1
Started by
Renat Akhmerov
Completed by
Renat Akhmerov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-fail-transition-message,n,z

Addressed by: https://review.openstack.org/275501
    Meaningful message for fail/success/pause transition

Addressed by: https://review.openstack.org/276625
    Fail/Success/Pause transition message

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.