SQL Application Rule

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

 

 

Field Name

Description

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 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 which returns a list of values.

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

Return Parameter

Select the Data Field which will receive the return parameter of the SQL Rule, from the drop-down list.

·       For ExecutionRule 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 case of SelectionRule type, the Java method should be a String value.

·       In case of DecisionRule 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.