All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kltp-ei-module-intsvc.2.1.0.source-code.notification-service.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="utf-8"?>
<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" 
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:https="http://www.mulesoft.org/schema/mule/https"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
	xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-current.xsd 
		http://www.mulesoft.org/schema/mule/cxf       http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd 
		http://www.mulesoft.org/schema/mule/jms       http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd 
		http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd 
		http://www.mulesoft.org/schema/mule/core      http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
		http://www.mulesoft.org/schema/mule/https     http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd 
		http://www.mulesoft.org/schema/mule/http      http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	">

    <spring:beans>
        <!-- Bean with business validation logic -->
        <spring:bean name="notification-validation-bean" class="se.skltp.ei.svc.service.impl.ProcessBean">
        	<spring:property name="owner" value="${EI_HSA_ID}"/>
        	<spring:property name="updateNotificationNotAllowedHsaIdList" value="${UPDATE_NOTIFICATION_NOT_ALLOWED_HSA_ID_LIST}"/>
        </spring:bean>

        <!-- Bean that expose a Web Service -->
        <spring:bean name="notification-ws-bean" class="se.skltp.ei.intsvc.notification.NotificationWSBean">
            <spring:property name="blBean" ref="notification-validation-bean"/>
        </spring:bean>
        
		<!-- Register our custom filter-evaluator -->
    	<spring:bean class="se.skltp.ei.intsvc.notify.NotifyEvaluator"/>

    </spring:beans>

    <flow name="notification-service" doc:name="notification-service">

        <inbound-endpoint 
            address="${NOTIFICATION_WEB_SERVICE_URL}"  
            connector-ref="soitoolkit-http-connector"
            exchange-pattern="request-response"
            responseTransformer-refs="logRespOut" doc:name="Generic"/>

        <!-- logging properties -->
        <set-property propertyName="#[se.skltp.ei.intsvc.EiConstants.EI_ORIGINAL_CONSUMER_ID]" value="#[message.inboundProperties[se.skltp.ei.intsvc.EiConstants.X_RIVTA_ORIGINAL_CONSUMER_ID]]" doc:name="Propagate consumer id"/>
        <set-session-variable variableName="#[org.soitoolkit.commons.mule.core.PropertyNames.SOITOOLKIT_CORRELATION_ID]" value="#[message.inboundProperties[se.skltp.ei.intsvc.EiConstants.X_SKLTP_CORRELATION_ID]]" doc:name="Save correlation id in scope for logging to pick it up"/>
        <set-property propertyName="#[org.soitoolkit.commons.mule.core.PropertyNames.SOITOOLKIT_CORRELATION_ID]" value="#[message.inboundProperties[se.skltp.ei.intsvc.EiConstants.X_SKLTP_CORRELATION_ID]]" doc:name="Propagate correlation id"/>
        
        <transformer ref="logReqIn"/>
        
        <cxf:jaxws-service
            namespace="urn:riv:itintegration:engagementindex:ProcessNotification:1:rivtabp21"
            serviceClass="se.skltp.ei.intsvc.notification.NotificationWSBean"
            wsdlLocation="classpath:/TD_ENGAGEMENTINDEX_1_0_R/interactions/ProcessNotificationInteraction/ProcessNotificationInteraction_1.0_RIVTABP21.wsdl" doc:name="SOAP"/>

        <set-variable variableName="request" value="#[payload]" doc:name="Variable"/>
 
        <component doc:name="Java">
            <spring-object bean="notification-ws-bean"/>
        </component>

        <set-variable variableName="response" value="#[payload]" doc:name="Variable"/>

        <set-payload value="#[variable:request]" doc:name="Set Payload"/>        

        <custom-transformer class="se.skltp.ei.intsvc.notification.ProcessNotificationRequestToJmsMsgTransformer" doc:name="Java"/>

        <choice>
        	<!--  Do not send any message for processing in the case where all engagement rtnsactions have been removed by the filtered -->
            <when expression="" evaluator="custom" custom-evaluator="ei-perform-notify">
		        <jms:outbound-endpoint 
		            connector-ref="soitoolkit-jms-connector"
		            queue="${PROCESS_QUEUE}" 
		            transformer-refs="logMsgOut-to-process" 
		            doc:name="JMS"/>
	        </when>
	        <otherwise>
	        	<logger message="SKip empty message"/>
	        </otherwise>
        </choice>
 
        <set-payload value="#[variable:response]" doc:name="Set Payload"/>        

        <custom-exception-strategy class="org.soitoolkit.commons.mule.error.ServiceExceptionStrategy"/>
    </flow>        

</mule>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy