Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: orquesta_ask_multiple_parameters
description: A basic workflow that demonstrates inquiry with multiple parameters.
runner_type: "orquesta"
entry_point: "workflows/orquesta-ask-multiple-parameters.yaml"
enabled: true
parameters: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: 1.0

description: A basic workflow that demonstrates inquiry with multiple parameters.

tasks:
start:
action: core.echo message="Automation started."
next:
- when: <% succeeded() %>
do: get_approval

get_approval:
action: core.ask
input:
schema:
type: object
properties:
approved:
type: boolean
description: "Continue?"
required: True
department_id:
type: number
description: "Your department ID:"
required: True
extra_output:
type: string
description: "Your message to echo next if you approve to continue:"
ttl: 60
next:
- when: <% task(get_approval).result.response.containsKey("extra_output") and task(get_approval).result.response.approved = true %>
publish:
- custom_output: <% task(get_approval).result.response.extra_output %>
- approver_department_id: <% task(get_approval).result.response.department_id %>
do: echo_extra_message
- when: <% not task(get_approval).result.response.containsKey("extra_output") and task(get_approval).result.response.approved = true %>
publish:
- approver_department_id: <% task(get_approval).result.response.department_id %>
do: finish
- when: <% task(get_approval).result.response.approved = false %>
do: stop

echo_extra_message:
action: core.echo message="Extra info <% ctx('custom_output') %>."
next:
- when: <% succeeded() %>
do: finish

finish:
action: core.echo message="Approved by department <% ctx('approver_department_id') %>. Automation completed."

stop:
action: core.echo message="Automation stopped."
next:
- do: fail