Wrappers encapsulate executable resources. Executing a wrapped resource will instead run the wrapper, which can coordinate the execution of the wrapped resource.
this.using( 'cache', max_age_minutes=60, ).connect( 'my-connector' ) # returns the output_value of the last successful execution of # "my-connector". if there is no successful execution of # within the last 60 minutes, it will create a new connection # and return its output_value
A flow which is called with the output_value of the child to determine if the child was successful. Either checker_flow or checker_script must be given.
checker_script
string
A script which is called with the output_value of the child to determine if the child was successful. Either checker_flow or checker_script must be given.
child_execution_location
enum
Any of
Location of wrapper execution
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper execution runs.
Constant value:
wrapper_execution
Location of wrapped resource
Key
Type
Description
Default
mode_name
string
The child runs where the child resource is located.
Constant value:
wrapped_resource
Location of wrapper resource
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper resource is located.
observes a child execution and pauses when an error occurs
usage:
this.using( 'interactive', interactive_limit_minutes:int=30, delete_retries:bool=True, notify_users:list[str]=None, context:object=None, child_message_is_markdown:bool=True, subject:str='{{child_name}} failed{{#is_retry}} {{fail_count}} times{{/is_retry}}', body:str='''Execution [{{child_name}}]({{self_url}}/execution/{{child_id}}) ended with **{{child_status}}** {{#parent_name}} The parent process **{{parent_name}}** is blocked and waiting for confirmation on how to continue. {{/parent_name}} {{#is_email}} Please choose how to proceed by following this link: [{{subject}}]({{self_url}}/execution/{{this_id}}) {{/is_email}} {{#context}} ### Context {{context}} {{/context}} {{#child_message}} ### Status message {{child_message}} {{/child_message}} ''', ).flow( 'child-execution' )
A template for the body of notifications sent to users.
Execution [{{child_name}}]({{self_url}}/execution/{{child_id}}) ended with **{{child_status}}** {{#parent_name}} The parent process **{{parent_name}}** is blocked and waiting for confirmation on how to continue. {{/parent_name}} {{#is_email}} Please choose how to proceed by following this link: [{{subject}}]({{self_url}}/execution/{{this_id}}) {{/is_email}} {{#context}} ### Context {{context}} {{/context}} {{#child_message}} ### Status message {{child_message}} {{/child_message}}
child_execution_location
enum
Any of
Location of wrapper execution
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper execution runs.
Constant value:
wrapper_execution
Location of wrapped resource
Key
Type
Description
Default
mode_name
string
The child runs where the child resource is located.
Constant value:
wrapped_resource
Location of wrapper resource
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper resource is located.
Constant value:
wrapper_resource
Specific project
Key
Type
Description
Default
mode_name
string
Where the child execution should run.
Constant value:
specific_project
project_name
string
The project where the child should run.
Default project
Specific bundle
Key
Type
Description
Default
bundle_name
string
The bundle where the child should run.
mode_name
string
Where the child execution should run.
Constant value:
specific_bundle
child_message_is_markdown
boolean
If set, the status message of ended child executions is interpreted as markdown.
True
context
object
Any contextual JSON data which is attached to notifications.
delete_retries
boolean
If set, previous child executions are deleted when a new child execution is started.
True
fail_on_missing_reference
boolean
Whether the wrapper execution should fail if a resource referenced in the inputs is missing.
interactive_limit_minutes
integer
Cloudomation Engine users which have not been active within that time are considered inactive.
30
notify_users
enum
Any of
Active users
Key
Type
Description
Default
mode
string
Notify all users which were active within interactive_limit_minutes.
Constant value:
active_users
A list of email addresses
Key
Type
Description
Default
email_addresses
array
A list of email addresses and the SMTP connector to be used.
A template for the body of notifications sent to users.
Execution [{{child_name}}]({{self_url}}/execution/{{child_id}}) ended with **{{child_status}}** {{#context}} ### Context {{context}} {{/context}} {{#child_message}} ### Status message {{child_message}} {{/child_message}} {{#notify_on_state_change}} ### State changes: {{#state_change_consider_status}} Status change: **{{status_changed}}** {{/state_change_consider_status}} {{#state_change_consider_message}} Message change: **{{message_changed}}** {{/state_change_consider_message}} {{#state_change_consider_output_value}} {{^state_change_consider_output_value_key}} Output value change: **{{output_value_changed}}** {{/state_change_consider_output_value_key}} {{#state_change_consider_output_value_key}} {{^output_value_key_missing}} Output value key '**{{state_change_consider_output_value_key}}**' change: **{{output_value_key_changed}}** {{/output_value_key_missing}} {{#output_value_key_missing}} Output value key '**{{state_change_consider_output_value_key}}**' change: Output value key '**{{state_change_consider_output_value_key}}**' not found. {{/output_value_key_missing}} {{/state_change_consider_output_value_key}} {{/state_change_consider_output_value}} ______________________________ {{#state_change_consider_status}} **Current status:** {{child_status}} **Last status:** {{last_status}} ______________________________ {{/state_change_consider_status}} {{#state_change_consider_message}} **Current message:** {{child_message}} **Last message:** {{last_message}} ______________________________ {{/state_change_consider_message}} {{#state_change_consider_output_value}} **Current output value:** {{child_output_value}} **Last output value:** {{last_output_value}} ______________________________ {{/state_change_consider_output_value}} *Last successful execution* **Timestamp:** {{last_success_timestamp}} **Id:** {{last_success_execution_id}} ______________________________ *Last failed execution* **Timestamp:** {{last_failure_timestamp}} **Id:** {{last_failure_execution_id}} ______________________________ **Successful executions:** {{succeded_execution_count}} **Failed executions:** {{failed_execution_count}} ______________________________ **Last state change timestamp:** {{last_state_change_timestamp}} **Time past since last state change:** {{time_past_since_last_state_change}} ______________________________ {{/notify_on_state_change}}
child_execution_location
enum
Any of
Location of wrapper execution
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper execution runs.
Constant value:
wrapper_execution
Location of wrapped resource
Key
Type
Description
Default
mode_name
string
The child runs where the child resource is located.
Constant value:
wrapped_resource
Location of wrapper resource
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper resource is located.
Constant value:
wrapper_resource
Specific project
Key
Type
Description
Default
mode_name
string
Where the child execution should run.
Constant value:
specific_project
project_name
string
The project where the child should run.
Default project
Specific bundle
Key
Type
Description
Default
bundle_name
string
The bundle where the child should run.
mode_name
string
Where the child execution should run.
Constant value:
specific_bundle
child_message_is_markdown
boolean
If set, the status message of ended child executions is interpreted as markdown.
True
fail_on_missing_reference
boolean
Whether the wrapper execution should fail if a resource referenced in the inputs is missing.
notify_on_error
boolean
If a notification should be generated when the child ends with ENDED_ERROR or ENDED_CANCELLED.
True
notify_on_state_change
boolean
If a notification should be generated when a specified attribute (e.g. status) of the current child execution is different to the previous execution of the child.
notify_on_success
boolean
If a notification should be generated when the child ends with ENDED_SUCCESS.
renotify_state_change_to_error_minutes
integer
How long the wrapper should wait, before sending another state change notification if an error persists. Set to 0 to disable.
run_on_state_change_flow_additional_inputs
object
Key
Type
Description
Default
run_on_state_change_flow_name
string
The name of a flow that is started in case of a state change. The output value of the child is passed to the flow as input value
state_change_consider_message
boolean
If a change in the child message indicates a state change.
state_change_consider_output_value
boolean
If a change in the child output value indicates a state change.
state_change_consider_output_value_key
string
If a change in a specific key in the child output value indicates a state change. Leave it as an empty string, to consider the whole output value.
state_change_consider_status
boolean
If a change in the child status indicates a state change.
True
status_setting_name
string
The name of the setting where the current and last status is stored. Defaults to "child_name-wrapper-notify-status-setting".
subject
string
A template for the subject line of notifications sent to users.
{{child_name}} {{child_status}} - last state change: {{last_state_change_timestamp}}
The child runs where the child resource is located.
Constant value:
wrapped_resource
Location of wrapper resource
Key
Type
Description
Default
mode_name
string
The child runs where the wrapper resource is located.
Constant value:
wrapper_resource
Specific project
Key
Type
Description
Default
mode_name
string
Where the child execution should run.
Constant value:
specific_project
project_name
string
The project where the child should run.
Default project
Specific bundle
Key
Type
Description
Default
bundle_name
string
The bundle where the child should run.
mode_name
string
Where the child execution should run.
Constant value:
specific_bundle
mode
enum
Any of
Complain
Validates the input_value or output_value of the child against a json schema and raises a SchemaValidationError on failed validation.
Constant value:
complain
Learn
Creates a json schema from the input_value or output_value of the child. If the schema exists it gets updated so that it accommodates its old schema and the newly learned schema. Otherwise the schema is created with the newly learned schema.
Constant value:
learn
point_of_validation
enum
Any of
Input value
Constant value:
input
Output value
Constant value:
output
schema_name
string
The name of the schema resource that should be used for the wrapper.