Perform Mathematical Operations
Use these recipes to perform basic arithmetic operations on the input data and handle faults encountered during the division operation.
Note:
These recipes are available in the Oracle Integration — SOAP | Calculator Operations package in the Integration Store. Oracle provides these recipes as samples only. These recipes are meant only for guidance, and are not warranted to be error-free. No support is provided for these recipes.
Overview
- Perform a specific arithmetic operation (such as, addition,
subtraction, multiplication, and division) on the input data using a Switch
action. To enable you to perform these operations, a JavaScript library
(
Oracle-Library-Calculator
) is included in the package. - Perform a division operation on the input data, and catch or handle faults encountered during the operation.
Integration Name | Description |
---|---|
SOAP Library Calculator Switch |
Performs any arithmetic operation (addition, subtraction, multiplication, and division) on the input data. As input to the integration, you must provide two input values and specify the necessary value for the Switch action, indicating which operation to perform. The integration returns the output of the specified operation as the response. Example Input Payload:
Example Output Payload:
|
SOAP Library Division Calculator |
Performs the division operation on the input data. As input to the integration, you must specify the dividend as the first input and the divisor as the second input. The integration returns the output of the operation as the response. Example Input Payload:
Example Output Payload:
|
SOAP Library Global FaultHandler |
Performs the division operation on the input data, and uses a predefined, global fault handler to catch errors during the operation. For example, when the input for the divisor is zero, the operation results in a fault. Using a global fault handler, the integration flow returns the fault details as a response. As input to the recipe, you must specify the dividend as the first input and the divisor as the second input. The integration returns the output of the operation or fault details as the response. Example Input Payload:
Example Output Payload:
|
SOAP Library Div Inscope FaultHandler |
Performs the division operation on the input data, and uses an in-scope fault handler to catch and handle errors during the operation. For example, when the input for the divisor is zero, the operation results in a fault. The in-scope fault handler in the integration flow handles the fault by interchanging the values of the divisor and the dividend. The integration flow then completes the division operation successfully and returns the result as a response. As input to the integration, you must specify the dividend as the first input and the divisor as the second input. The integration returns the output of the operation or the output of the modified operation (in case the operators are interchanged due to a fault) as the response. Example Input Payload:
Example Output Payload:
|
System and Access Requirements
-
Oracle Integration
Install, Configure, and Run the Recipes
For more information and steps to install, configure, and run recipes, see Get Started with Integration Accelerators and Recipes.
To use the recipes in the Oracle Integration — SOAP | Calculator Operations package, you must configure the Oracle SOAP Connection. You only need to configure this connection once. All the recipes in the package use the same connection.
You must supply the following information when you configure this connection.
Connection Name | Parameters |
---|---|
Oracle SOAP Connection |
Connection Properties
For more details, see Create a SOAP Adapter Connection in Using the SOAP Adapter with Oracle Integration. |
Related Documentation