Before You Begin Using the Risk Analytics SDK
Before you integrate your application with RA, RA must be installed and configured, ensuring that:
cara
Before you integrate your application with RA, RA must be installed and configured, ensuring that:
- The systems on which you plan to install RA meet the system requirements.
- You have completed the configuration and planning-related information:
- You have installed and configured the required number of RA database instances.You have installed the applicable version of JDK on the system where you plan to install RA components that use JDK.
- You have also installed the required application server.
- In the case ofsingle-system deploymentof RA, ensure that all the components are running.
- In the case ofdistributed-system deploymentof RA, ensure that the connection is established between all the components and that they successfully communicate with each other.
Before you use the Risk Evaluation API, you must include the related JAR files in the CLASSPATH. If you are using Properties files in your application, then you must also include them in the CLASSPATH. After including the required JAR files or Properties files in CLASSPATH, you must initialize the API.
This topic covers the following sub-topics:
2
Configuring Java APIs
To configure RA Risk Evaluation APIs for use with J2EE applications:
The following instructions are based on Apache Tomcat Server. The configuration process might vary depending on the application server you are using. Refer to the application server documentation for detailed information about these instructions.
- Before proceeding with the configuration steps in this section, ensure that the JARs required for implementing the Java APIs are installed at:
- For Microsoft Windows:<install_location>\Arcot Systems\sdk\java\lib\
- For UNIX-Based Platforms:<install_location>/arcot/sdk/java/lib/
- Copy the listed JAR files (fromthe location where they are installed)tothe appropriate location in your <APP_SERVER_HOME> directory. (For example, on Apache Tomcat this location is <Application_Home>/WEB-INF/lib/.)
- /sdk/java/lib/arcot/arcot_core.jar
- /sdk/java/lib/arcot/arcot-pool.jar
- /sdk/java/lib/arcot/arcot-riskfort-evaluaterisk.jar
- /sdk/java/lib/arcot/arcot-riskfort-mfp.jar
- /sdk/java/lib/external/bcprov-jdk14-139.jar
- /sdk/java/lib/external/commons-lang-2.0.jar
- /sdk/java/lib/external/commons-pool-1.4.jar
Your_Application>\WEB-INF\lib\. - Configure the log4j.properties.risk-evaluation and riskfort.risk-evaluation.properties files as follows:
- If the applicationalready hasa configured log4j.properties.risk-evaluation file, then merge it with the following log configuration files:
- On Microsoft Windows:<install_location>\Arcot Systems\sdk\java\properties\log4j.properties.risk-evaluationand<install_location>\Arcot Systems\sdk\java\properties\riskfort.risk-evaluation.properties
- On UNIX-Based Platforms:<install_location>/arcot/sdk/java/properties/log4j.properties.risk-evaluationand<install_location>/arcot/sdk/java/properties/riskfort.risk-evaluation.properties
- If the applicationdoes not havethe log4j.properties file already configured, then:
- Rename log4j.properties.risk-evaluation to log4j.properties.
- Merge riskfort.risk-evaluation.properties with log4j.properties.
- Copy the log4j.properties file to:
Application_Home>/WEB-INF/classes/properties/For example, on Apache Tomcat 5.5, you will need to copy log4j.properties to C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\<Your_Application>\WEB-INF\classes\.
Including Risk Evaluation JAR Files in CLASSPATH
To use the API, you need to include the Risk Evaluation JAR files in the CLASSPATH variable. To do so:
- If required, you need to copy the Risk Evaluation JAR files listed in the following tables for Microsoft Windows and UNIX-based platforms to the appropriate directory (say lib) in your<APPLICATION_CONTEXT>.For Microsoft Windows
Primary JAR Files
| arcot_core.jar arcot-pool.jar arcot-riskfort-evaluaterisk.jar arcot-riskfort-mfp.jar | < install_location >\Arcot Systems\sdk \java \lib \arcot \ |
Other JAR Files
| bcprov-jdk14-131.jar commons-lang-2.0.jar commons-pool-1.4.jar | < install_location> \Arcot Systems\sdk \java \lib \external \ |
For UNIX-Based Platforms
Primary JAR Files
| arcot_core.jar arcot-pool.jar arcot-riskfort-evaluaterisk.jar arcot-riskfort-mfp.jar | < install_location >/arcot/sdk /java /lib /arcot / |
Other JAR Files
| bcprov-jdk14-131.jar commons-lang-2.0.jar commons-pool-1.4.jar | < install_location >/arcot/sdk /java /lib /external / |
2. Add the parent directory (in the <
APPLICATION_CONTEXT
>) of the directory to which you copied the JARs to the CLASSPATH environment variable.Including Properties Files in CLASSPATH
If your application is using Properties files, then the riskfort.risk-evaluation.properties file must be included in CLASSPATH. To ensure this:
- Copy thepropertiesdirectory from the following location to the appropriate directory (say classes) in your<APPLICATION_CONTEXT>.
- For Microsoft Windows<install_location>\Arcot Systems\sdk\java\
- For UNIX-Based Platforms<install_location>/arcot/sdk/java/
- Also add the parent directory of the properties directory to the CLASSPATH environment variable.
Initializing the Risk Evaluation API
Initialize the Risk Evaluation API by using the
RiskFactory
class in the com.arcot.riskfortAPI
package. The initialization process creates all connection pools, creates the database pool, and initializes loggers. After initialization, it returns an appropriate object to your calling application.You
cannot
apply any configuration changes after
you initialize the API. To enable the configuration changes, you must re-initialize the API.The RiskFactory class provides two methods, as discussed in the following subsections, to initialize the Risk Evaluation APIs.
Method 1 Initializing the API by Using the Properties File
The initialize (java.lang.String propertyLocation) method initializes the Risk Evaluation API by using the parameters listed in the input Properties file. If you pass NULL, then the parameters are read from the riskfort.risk-evaluation.properties file, which is present in the properties directory of CLASSPATH.
The fields and format of this properties file must be as follows:
//Transaction Server IP address HOST.1= //Transaction Server port number PORT.1= //Type of the connection. Possible values include SSL and TCP. TRANSPORT_TYPE= //Required if TRANSPORT_TYPE is set to SSL. The file must be in //PEM format. Provide the complete path for the file. CA_CERT_FILE=
The following table provides the details of the initialize() method.
Description
| Input Parameter
| Output Value
|
Initializes the Risk Evaluation API by using the specified Properties file. | propertyLocation The absolute path of the Properties file. Note: If you do not pass any value, then the value defaults to the default location of riskfort.risk-evaluation.properties. | Throws RFSDKException if the API was not initialized successfully. |
Method 2 Initializing the API by Using the Map
The initialize (java.util.Map initproperty) method in the RiskFactory class initializes the Risk Evaluation API based on the property map provided. The following table provides the details of the map that initialize() method uses.
Description
| Input Value
| Output Value
|
Initializes the Risk Evaluation API by using the provided map. | map The key-value pair specifying the configuration information. The supported keys are: - HOST.1 The IP address of the host where Transaction Server is available. - PORT.1 The port at which Transaction Server is available. Default value is 7680. - TRANSPORT_TYPE The type of connection. Possible values include SSL and TCP. - CA_CERT_FILE (Required only if TRANSPORT_TYPE is set to SSL.) The path for the CA certificate file of the server. The file must be in PEM format. Provide the complete path for the file. | Throws RFSDKException if the API was not initialized successfully. |
Preparing Additional Inputs
In addition to the mandatory inputs, the Risk Evaluation API also accepts additional inputs in the form of name-value pairs. These additional inputs are especially useful if you want to create custom rules and Evaluation Callouts. This is because any parameter can be added to this class and can be passed to the custom rules and Evaluation Callouts. These inputs can then be used for evaluating risk.
The input to this class can include information, such as locale, calling application details, or other transaction-related details that can be used for risk evaluation. These additional name-value custom parameters can help you capture the real-time inputs from each transaction, and are processed by deployed custom rules for successful risk evaluation.
RA’s
com.arcot.riskfortAPI.AdditionalInputs
package provides you the AdditionalInputs
class, which enables you to set the additional information that you plan to use. Some of the pre-defined additional input parameters supported by the Risk Evaluation AdditionalInputs class include:- AR_RF_LOCALE_IDSpecifies the locale that RA will use while returning the messages back to your calling application.
- AR_RF_CALLER_IDSpecifies the transaction identifier in your calling application. This is useful for end-to-end tracking of transactions.
To implement custom risk evaluation parameters:
- Use the AdditionalInputs() method to obtain an object that implements the AdditionalInputs class.
- Set the necessary inputs for the returned object by using the put() method. The syntax of the method is:public void put(java.lang.Stringname, java.lang.Stringvalue)If the additional input isnotpresent with the givenname(name of the input parameter), then one is created. Otherwise, it is overwritten with the newvalue(value of the input parameter). It is recommended that you do not use large strings either fornameor forvalue.Thenameandvalueparameters mustnotcontain =andthe newline character (\n). The API behavior is undefined ifnameandvaluecontain any of these characters.