69a6b9bf28
* Publishing variables in execution context * Additional tests (publishing and context manipulations) TODO: * More tests Change-Id: I8f1e6d7a7a1251b507e33a0cc11bb1afbee3a2c2
48 lines
1021 B
YAML
48 lines
1021 B
YAML
Services:
|
|
MyService:
|
|
type: ECHO
|
|
actions:
|
|
build_full_name:
|
|
output:
|
|
full_name: John Doe
|
|
build_greeting:
|
|
output:
|
|
greeting: Cheers!
|
|
send_greeting:
|
|
output:
|
|
greeting_sent: True
|
|
|
|
Workflow:
|
|
# context = {
|
|
# 'person': {
|
|
# 'first_name': 'John',
|
|
# 'last_name': 'Doe',
|
|
# 'address': {
|
|
# 'street': '124352 Broadway Street',
|
|
# 'city': 'Gloomington',
|
|
# 'country': 'USA'
|
|
# }
|
|
# }
|
|
# }
|
|
|
|
tasks:
|
|
build_full_name:
|
|
action: MyService:build_full_name
|
|
input:
|
|
first_name: $.person.first_name
|
|
last_name: $.person.last_name
|
|
publish:
|
|
f_name: full_name
|
|
|
|
build_greeting:
|
|
action: MyService:build_greeting
|
|
publish:
|
|
greet_msg: greeting
|
|
|
|
send_greeting:
|
|
requires: [build_full_name, build_greeting]
|
|
action: MyService:send_greeting
|
|
input:
|
|
f_name: $.f_name
|
|
greet_msg: $.greet_msg
|