Table of Contents

Context on Methods

The Ometa Framework fetches data from various sources to enrich the method execution context. This way, a lot of data is automatically set on the method:

  • Request context like originating url, ip, referer, user-agent, ... (if the request is passing through our REST service)
  • Identity information like email, claims, ... (if the request is authenticated)
  • Case context like current state, roles, properties, ... (if the request originates from a known case)

All this context data together with the values explicitly set by the user/request or the method itself (defaults) can be used in a variety of places:

  • Interface script
  • Validation scripts
  • Conversion scripts
  • Custom code in DLL's

Behavior of Output Fields

If an output field don't get its data set by the interface or through a data extension, it will inherit the context data or the default value if no context was found. If an output field inherits data from an input field with a configured conversion script, that script is ignored.

The following examples show you how an output field named 'Company' behaves in different scenario's.

Input Context Script Output Field Result
None SELECT '1' AS ID Company = 'Default value'
Company = 'Ometa' SELECT '1' AS ID Company = 'Ometa'
Company = 'Ometa' SELECT '1' AS ID, 'Silmar' AS Name Company = 'Ometa'
Company = 'Ometa' SELECT '1' AS ID, 'Silmar' AS Company Company = 'Silmar'
Company = 'Ometa' SELECT '1' AS ID, '{$Company}' AS Company Company = 'Ometa'
Company = 'Ometa'
Converted value = 'Converted Ometa'
SELECT '1' AS ID Company = 'Ometa'
Company = 'Ometa'
Converted value = 'Converted Ometa'
SELECT '1' AS ID, 'Silmar' AS Name Company = 'Ometa'
Company = 'Ometa'
Converted value = 'Converted Ometa'
SELECT '1' AS ID, 'Silmar' AS Company Company = 'Silmar'
Company = 'Ometa'
Converted value = 'Converted Ometa'
SELECT '1' AS ID, '{$Company}' AS Company Company = 'Converted Ometa'
Note

Default value means the output field will contain the configured default input value of the field. If the field is not defined, the default value will be an empty string, 0 for numbers, false for Yes/No, ...

Collection Values

Some fields are able to hold a collection of values. Most of the time, these are auto generated fields like identity.emails, identity.groups, case.roles, ...

You can safely use these collection fields in condition sets. Each value in the collection will be interpreted by the condition.

However if you use this field in places where collections are not supported out of the box (e.g.: interface scripts, conversion scripts, validation scripts, custom dll code, ...), only the last value of the collection will be present in that field.

A solution for this issue is to add the name of that collection field in the configuration table under the key Allowed Collection Fieldnames To Csv. If you do this, a new field with the same name suffixed by .csv will be created with all the collection values separated by a comma. See Configuration Table for more information.