handlers.set_field_on_field_update_handler
Whenever a fact sheet field changes to a specific field value, we set another field to a target value.
You can use this to catch manual lifecycle changes, which you cannot do in LeanIX Automations.
Configuration:
field: Name of the field to be monitored, e.g. lifecycle of an Application.
condition: Key/value pair that will be checked, e.g. lifecycle_status: endOfLife. If the condition holds
true, we will set the field as specified.
mapping: Combinations of the value of the field and the value of the target field. A "*"
key acts as a fallback that is used whenever no other key matches the source value - including
when there is no source value at all (e.g. a to-do trigger with no field change).
Example: "endOfLife": "inactive"
Sets an application to inactive if somebody manually changes its lifecycle to endOfLife.
Alternatively, gating can be expressed with the generic trigger config (see
handlers/trigger.py) instead of field/condition. When a trigger is present the
built-in field/condition checks are skipped (the dispatch loop has already evaluated
the trigger), and source_field selects which field's value drives the mapping lookup.
Example - trigger this handler when an ACTION_ITEM to-do is completed (the to-do state lives
in the event payload, not on fs; to-do events load a neutral, untyped fact sheet):
"trigger": {"events": ["TODO_UPDATED"], "code": "event.get('changes',{}).get('state') == 'CLOSED'"}.
Combine with a "*" mapping entry to set a constant target value when there is no source field.
Called automatically whenever a matching event comes in via webhook.
Inherited Members
- handlers.eventhandler.EventHandler
- EventHandler
- get_trigger
- get_event_types
- get_fs_types
- get
- all
- lx_client
- data_requirements
- update_with_uniqueness_check
- facet_matches
- is_tag_key
- SUBSCRIPTION_TYPES
- parse_subscription_key
- get_mapped_subscriptions
- get_notification_users
- get_send_email_for_users
- get_email_callback
- get_due_date