SQL Application Rule

This Application Rule is used to execute any SQL queries in the Process Flow.

Figure 4-6 Add SQL Application Rule Details window


This image displays the Add SQL Application Rule Details window.

Table 4-2 SQL Application Rule Details Description

Field Name Description
Application Rule Type Select SQL as the Application Rule Type from the drop-down list.
Name Enter a unique name for the SQL Application Rule.
Rule Type Select the Rule Type from the drop-down list. The SQL Application Rule can be used as a Decision Rule, Execution Rule, or Selection Rule based on your requirement.
Execution Type Displays the Application Execution Type as SQL.
Implementation Detail
  • Decision Rule- For Decision Rule the SQL Statement should return ‘PASS’ for success condition.

    For example, select ‘PASS’ from dual where {EXPENSES} <= {THRESHOLD}

    Note: {EXPENSES}, {THRESHOLD} are user defined Data Fields.

  • Execution Rule- For Execution Rule the SQL Statement can be any DML statement.

    For example, update fct_expenses set expenses={EXPENSES} where id = {WF_ENTITYID}

  • Selection Rule- For Selection Rule the SQL Statement should be a Select statement that returns a list of values.

    For example, select v_created_by from fct_expenses id = {WF_ENTITYID}

Return Parameter

Select the Data Field that receives the return parameter of the SQL Rule, from the drop-down list.

  • For Execution Rule type, the business logic is implemented in the method and the parameter value returned from the SQL Rule is saved in the mapped Data Field.
  • In the case of Selection Rule type, the Java method should be a String value.
  • In the case of the Decision Rule type, the Java method should return Boolean values “True/False”.
Scope Select the Scope as Process to use the Application Rule only in the current process or Package to use the Application Rule across all the processes in the package.