handlers.conditionally_create_resource_handler
Whenever all conditions are fulfilled, we create a resource.
Configuration:
condition: Key/value pair that will be checked, e.g. approvalStatus: approved. If the condition holds true, we
will set the field as specified. If the condition value starts with "!", the condition is negated (must not match).
resource: Data of the resource to be created.
description =
"Whenever certain conditions are fulfilled, create a resource if it doesn't exist yet."
config_template =
{'fs_types': ['Project'], 'field': 'preDecision', 'condition': {'preDecision': 'approved', 'soundingBoard': '!iTSSC'}, 'resource': {'name': 'Approval Document', 'url': 'https://example.com/', 'resourceType': 'website', 'description': None}, 'delete_resources_if_condition_is_false': True}