Variables and Parameters
Variables store values contextual to an integration job or to a user session. Variables are either Built-in Platform Variables, or Model Variables.
Parameters are passed to named queries or search forms to filter records using a condition.
Built-in Platform Variables
Built-in platform variables are available by default. They contain information about the load or batch being processed or about the user connected or performing the operations.
The following table lists built-in variables:
Variable Name | Definition |
---|---|
|
ID of the batch running the integration job. This variable is not available in expressions used outside the certification process, such as enrichers or validations triggered in steppers. |
|
Name of the deployment data location. |
|
ID of the external load that has submitted the integration job. This variable is not available in expressions used outside the certification process, such as enrichers or validations triggered in steppers. |
|
Base URL of the Semarchy xDM server, as configured by the administrator. |
|
For the certification process, name of the user who has submitted the integration job. For a user data session, the name of the connected user. |
|
Comma-separated list of roles of the connected user. Note that this variable only returns user roles that have corresponding roles declared in Semarchy xDM (in the Administration view, under the Roles node.). For the Tomcat application server specifically, all roles are returned, including those with no corresponding role declared. |
|
User Address, configured by the user in his profile. |
|
User City, configured by the user in his profile. |
|
User Company, configured by the user in his profile. |
|
User Country, configured by the user in his profile. This variable uses the ISO 3166-1 alpha-2 country code format (e.g.: |
|
User Decimal Separator, configured by the user in his profile. |
|
User Department, configured by the user in his profile. |
|
User Email, configured by the user in his profile. |
|
User First Name, configured by the user in his profile. |
|
User Job Title, configured by the user in his profile. |
|
User Language Tag, configured by the user in his profile. This variable uses IETF BCP 47 language tag format (e.g.: |
|
User Last Name, configured by the user in his profile. |
|
User Postal Code, configured by the user in his profile. |
|
User Primary Phone, configured by the user in his profile. |
|
User Secondary Phone, configured by the user in his profile. |
|
User Thousand Separator, configured by the user in his profile. |
|
User Timezone, configured by the user in his profile. The time zone is one of the TZ Database time zones (e.g.: |
Model variables are used with the following syntax: :<variable_name>
, for example: :V_USER_LASTNAME
.
Model Variables
Variables are values local to the user session or executed job. They are set either via a job parameter (for jobs), or retrieved from remote servers (declared as Variable Value Providers) when the user opens their session.
Variables can be used in SemQL filters and expressions created at design and run-time.
Model Variables can be used:
-
In user sessions: They are set when the user accesses an application, using a variable value provider. In this context, variables are used to parameterize the user experience. For example, in filters restricting the user privileges.
-
In integration jobs: In an integration job, a variable value is usually set using a job parameter. If no job parameter is set, the value is set using the variable value provider. In this context, variables are used to parameterize the job execution (for example, in an enricher’s filter expression to prevent the enricher from processing any record depending on the value).
Model variables set from a Variable Value Providers are refreshed when the user accesses Semarchy xDM. In the context of a job, the variables are refreshed as if the user starting the job had accessed Semarchy xDM.
Using the built-in platform variables V_USERNAME
, it is possible to query (via a Variable Value Provider definition) the corporate LDAP directory and retrieve the email of the connected user, and then store this value in a model variable called CORPORATE_USER_EMAIL
.
For more information about Model Variables, see model variables for more information. |
Model variables are used with the following syntax: :<variable_name>
, for example: :CORPORATE_USER_EMAIL
.
Search Parameters
Search Parameters store the values entered into a search form and submitted to the search condition attached to that search form. They are available only for their own search form’s condition.
Parameters are used using their defined Binding, using the following syntax: :<binding_name>
, for example: :SEARCHED_NAME
.
When editing the SemQL condition of a search form, the available search parameters are listed in the Variables section of the Expression Editor. |
Named Queries Parameters
Query Parameters store the values passed to a request made to a named query. It is used via its binding name, similarly to a Search parameter.