Java Application Rule

This Application Rule is used to call Java functions in your Process flow.

Figure 4-9 Java Application Rule Details window


This image displays the Java Application Rule Details window.

Table 4-5 Java Application Rule Details Description

Field Name Description
Name Enter a unique name for the Application Rule.
Rule Type This Rule Execution type supports only the Execution Rule type.
Execution Type Displays the Application Execution Type as JAVA.
Implementation Detail

Enter the complete java class name which implements the Interface :

com.ofs.aai.service.wf.external.base.Activity.

The implementation class has to override the method with the Business Logic.

executeTask(List<Data Field> Data Fields)

The Data Fields are passed by reference, so changes can be made in Data Fields value directly by the implementation class, which will be recognized by the Workflow Engine.

Return Parameter

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

  • For Execution Rule type, the business logic is implemented in the method and the parameter value returned from the Java method 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.

Note:

The class and its dependent file (or jar) need to be available in the web container classpath. For example, <TOMCAT_HOME>/webapps/<context>/WEB-INF/lib/<forecast.jar>