-
Notifications
You must be signed in to change notification settings - Fork 1
/
pause.yml
38 lines (34 loc) · 1.34 KB
/
pause.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This example workflow demonstrates how to use the Mistral DSL to control the
# state of the workflow engine. We start a job and then pause the workflow
# after it completes.
#
# Workflows in the Civis Platform are written in YAML and a workflow DSL
# (domain specific language) called Mistral.
#
# See this website, https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html,
# for an introduction to YAML.
#
# See the Mistral documentation, https://docs.openstack.org/mistral/train/user/wf_lang_v2.html,
# for a description of the Mistral DSL.
version: '2.0' # you always need this key to specify version 2 of the mistral DSL
pause:
tasks:
python:
action: civis.scripts.python3
input:
name: python is the best
source: print("Hello from Python!")
# Here we tell mistral to pause the workflow once this task
# succeeds. Note that mistral launches the tasks in the order they
# are in the list. Thus the task `python_never_run` is never
# executed.
# You can resume the workflow via the POST /workflows/:id/executions/:execution_id/resume
# API endpoint.
on-success:
- pause
- python_never_run
python_never_run:
action: civis.scripts.python3
input:
name: python that is never run
source: print("You will never see this message!")