How To Trigger Two Activities From One End Point
How To Trigger Two Activities From One End Point
No part of this document may be reproduced or transmitted in any form or by any means,
for any purpose, without the express written permission of TEMENOS HEADQUARTERS SA.
Table of Contents
Document History
Comments:
NA
2.Detailed steps
STEP 1: Obtain the artefact from the IRIS workbench. For this illustration, we are using the
DEPOSITS API and two activities are - DEPOSITS-ADJUST.BALANCE-BALANCE.MAINTENANCE,
DEPOSITS-REDEEM-ARRANGEMENT
Step 2: Enter the required details and click Next, the Review tab would appear, click Next so that the
Download tab will appear and select the Download option. The artefact will be downloaded to the local
device as a .zip file (archive) format. Import the artefact in the service project.
</post>
</rest>
<route id="direct-vm.party-products.v1.0.0.getTermDeposits">
<from uri="direct-vm:party-products.v1.0.0.getTermDeposits"/>
<setProperty propertyName="operationSecurity">
<constant>Public</constant>
</setProperty>
<setProperty propertyName="isBulk">
<constant>false</constant>
</setProperty>
<setProperty propertyName="extensibility">
<constant>true</constant>
</setProperty>
<setProperty propertyName="response_verbosity">
<constant>Minimal</constant>
</setProperty>
<setProperty propertyName="function">
<constant>input</constant>
</setProperty>
<setProperty propertyName="validate_only">
<header>validate_only</header>
</setProperty>
<setProperty propertyName="activity">
<constant>DEPOSITS-ADJUST.BALANCE-
BALANCE.MAINTENANCE</constant>
</setProperty>
<setProperty propertyName="activityVersion">
<constant>AA.API.NEW.1.0.0</constant>
</setProperty>
<setProperty propertyName="product">
<constant>DEPOSIT.SHORT</constant>
</setProperty>
<setProperty propertyName="mapping">
<constant>dynamic_model</constant>
</setProperty>
<process ref="t24VersionProcessor"/>
<choice>
<when>
<simple>${headers.CamelHttpResponseCode} == 200</simple>
<to uri="direct-vm:party-
products.v1.0.0.getRedeemTermDeposits" />
</when>
</choice>
</route>
<route id="direct.mockResponder">
<from uri="direct:mockResponder"/>
<process ref="mockResponder"/>
</route>
</camelContext>
</beans>
STEP 4: Create a java file under any package present in your IRISR18 war file with the below logic.
Note: The java class shown here is of the name CustomOrchestrationRequestMapper and is
created under the package temenos.com.arrangement.
package temenos.com.arrangement;
import java.math.BigDecimal;
import java.util.Map;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.json.JSONArray;
import org.json.JSONObject;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.jayway.jsonpath.Configuration;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.Option;
import com.temenos.irf.integration.json.JSONHelper;
/**
* TODO: Document me!
*
* @author ntejaswi
*
*/
import com.temenos.irf.logging.Logger;
import com.temenos.irf.logging.LoggerFactory;
Step 5: Edit the applicationContext.xml present in the IRISR18 war file by adding t24FilterProcessor
bean as shown below.
<bean id="t24FilterProcessor"
class="temenos.com.arrangement.CustomOrchestrationRequestMapper">
</bean>
<setProperty propertyName="operationSecurity">
<constant>Public</constant>
</setProperty>
<setProperty propertyName="isBulk">
<constant>false</constant>
</setProperty>
<setProperty propertyName="extensibility">
<constant>true</constant>
</setProperty>
<setProperty propertyName="response_verbosity">
<constant>Minimal</constant>
</setProperty>
<setProperty propertyName="function">
<constant>input</constant>
</setProperty>
<setProperty propertyName="validate_only">
<header>validate_only</header>
</setProperty>
<setProperty propertyName="activity">
<constant>DEPOSITS-REDEEM-ARRANGEMENT</constant>
</setProperty>
<setProperty propertyName="activityVersion">
<constant>AA.API.NEW.1.0.0</constant>
</setProperty>
<setProperty propertyName="product">
<constant>DEPOSIT.SHORT</constant>
</setProperty>
<setProperty propertyName="mapping">
<constant>dynamic_model</constant>
</setProperty>
<process ref="t24FilterProcessor"/>
<process ref="t24VersionProcessor"/>
</route>
<route id="direct.mockResponder">
<from uri="direct:mockResponder"/>
<process ref="mockResponder"/>
</route>
</camelContext>
</beans>
Step 7: Create and Deploy the file, Send the URL via postman and check the output.
Two Activities are triggered from One End Point and the result of the orchestrated APIs are successful.
Description of document * How to Trigger Two Activities from One End Point
Product * IRIS
To T24 Release *
If the functionality is relevant till
R9, choose the value ‘Current’
Content Classification
Expiry Date: Click here to enter a date. JIRA Reference: TSR- 500847