handlers.enforce_naming_convention_handler

class EnforceNamingConventionHandler(handlers.eventhandler.EventHandler):

This automation enforces naming conventions, e.g. for Interface fact sheets. Example:

{
    t.b.d.
}
name = 'Interface: Automatic Naming Convention'
description = 'Automatically determines an interface name based on consumers, providers, data flow direction etc.'
conditions = {'event_types': ['FactSheetUpdatedEvent', 'FactSheetFieldUpdatedEvent']}
supports_initial_sync = True
config_template = {'fs_types': ['Interface', 'Application'], 'name_template': '{provider} {direction} {consumer} - {action} {information_object}', 'initial_suffix': '[Name will be generated automatically after all mandatory fields are filled]', 'all_mandatory_status_field': 'allMandatoryStatus', 'definitions': {'provider': "fs.provider_applications()[0]['displayName']", 'consumer': "'Any' if len(fs.consumer_applications()) > 1 else fs.consumer_applications()[0]['displayName']", 'direction': "{'incoming': 'from', 'outgoing': 'to', 'biDirectional': 'to/from'}.get(fs['data_flow_direction'])", 'action': "{'incoming': 'Consume', 'outgoing': 'Provide', 'biDirectional': 'Provide/Consume'}.get(fs['data_flow_direction'])", 'information_object': "fs['description']"}}
def handle(self, event, fs, **kwargs):

Called automatically whenever a FactSheetUpdated event comes in via webhook.

def update_name(self, fs):