Server-Side Bindings - Data Source Properties
Server-Side Bindings - Data Source Properties
Expressions defined in the data source are evaluated on the server, using the server-side evaluation context that includes the following objects:
user
: includes all properties of the current user account, as well as properties of the employee record associated with the user.sql
: object that can format date, time, and timestamp values according to the current database and/or current date and timeparameters
: provides access to all input parameters of the workflow rule that evaluates the expression (typically this is a standard workflow rule, but the client-side UI controls can pass arbitrary additional parameters to standard workflow rules).
Available expressions are limited to those specified in WEB-INF/config/context/core/core-optional.xml
in the ognlInjectionHandler
bean.
This list does not include all supported expressions out of the box, but is restricted to those in use. You can enable access to a supported expression by adding it to the list, e.g adding <value>user.employee.honorific</value>
will give access to the ${user.employee.honorific}
expression.
Examples:
The parsed restriction defined in the data source uses the current date:
<clause name="wr.date_est_complete" op="<=" value="${sql.currentDate}"/>
The SQL query defined in the data source includes the current user employee ID:
<sql>SELECT...FROM...WHERE wr.requestor = ${user.employee.id}</sql>
The SQL query defined in the data source includes the date literal:
<sql>SELECT...FROM...WHERE wr.date_requested = ${sql.date('2007-01-01')}</sql>
The SQL query defined in the data source includes the WFR parameter sent from the client:
<sql>SELECT...FROM...WHERE wr.status IN ${parameters['status_codes']}</sql>
The following data source properties can contain binding expressions:
- SQL query text
- SQL restriction text (for restrictions defined in AXVW and restrictions sent from the client);
- Parsed restriction values (for restrictions defined in AXVW and restrictions sent from the client
- Default field values.
Binding expressions in data source properties are evaluated when a workflow rule is called (at request time, or when scheduled rule is executed).