source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/NhinBPEL/src/NhinUnsubscribe.bpel@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 21.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="NhinUnsubscribe"
4 targetNamespace="urn:gov:hhs:fha:nhinc:gateway:nhinbpel:nhinunsubscribe"
5 xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
6 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
7 xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace"
8 xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
9 xmlns:sxat="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Attachment"
10 xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling"
11 xmlns:tns="urn:gov:hhs:fha:nhinc:gateway:nhinbpel:nhinunsubscribe" xmlns:ns0="urn:gov:hhs:fha:nhinc:common:propertyaccess" xmlns:ns1="urn:gov:hhs:fha:nhinc:common:connectionmanagerinfo" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:ns3="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns4="urn:gov:hhs:fha:nhinc:common:subscription" xmlns:ns5="http://docs.oasis-open.org/wsn/b-2" xmlns:ns6="urn:gov:hhs:fha:nhinc:common:nhinccommoninternalorch" xmlns:ns7="urn:gov:hhs:fha:nhinc:common:nhinccommonadapter" xmlns:ns8="urn:gov:hhs:fha:nhinc:common:hiemauditlog" xmlns:ns9="urn:gov:hhs:fha:nhinc:common:auditlog">
12 <import namespace="urn:gov:hhs:fha:nhinc:nhincsubscription" location="Interfaces/wsdl/NhincSubscription.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
13 <import namespace="http://docs.oasis-open.org/wsrf/rw-2" location="Interfaces/wsdl/rw-2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
14 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionrepository" location="Interfaces/wsdl/NhincComponentSubscriptionRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
15 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" location="Interfaces/wsdl/NhincComponentPropAccessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
16 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" location="Interfaces/wsdl/NhincComponentConnectionManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
17 <import namespace="urn:gov:hhs:fha:nhinc:adaptersubscriptionmanagement" location="Interfaces/wsdl/AdapterSubscriptionManagement.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
18 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" location="Interfaces/wsdl/NhincComponentInternalAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
19 <partnerLinks>
20 <partnerLink name="AuditLogPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" partnerLinkType="tns:NhincComponentInternalAuditRepository" partnerRole="NhincComponentInternalAuditRepositoryPortTypeRole"/>
21 <partnerLink name="PropAccessorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" partnerLinkType="tns:NhincComponentPropAccessor" partnerRole="NhincComponentPropAccessorPortTypeRole"/>
22 <partnerLink name="ConnectionManagerPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" partnerLinkType="tns:NhincComponentConnectionManager" partnerRole="NhincComponentConnectionManagerPortTypeRole"/>
23 <partnerLink name="SubRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionrepository" partnerLinkType="tns:NhincComponentSubscriptionRepository" partnerRole="NhincComponentSubscriptionRepositoryPortTypeRole"/>
24 <partnerLink name="AdapterUnsubscribePL" xmlns:tns="urn:gov:hhs:fha:nhinc:adaptersubscriptionmanagement" partnerLinkType="tns:AdapterSubscriptionManager" partnerRole="AdapterSubscriptionManagerPortTypeRole"/>
25 <partnerLink name="NhincUnsubscribePL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" partnerLinkType="tns:NhincHiemUnsubscribe" myRole="NhincHiemUnsubscribeRole"/>
26 </partnerLinks>
27 <variables>
28 <variable name="UnsubscribeIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" messageType="tns:UnsubscribeRequestMessage"/>
29 </variables>
30 <sequence>
31 <receive name="ReceiveNhincUnsubscribe" createInstance="yes" partnerLink="NhincUnsubscribePL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" portType="tns:SubscriptionManager" variable="UnsubscribeIn"/>
32 <scope name="ProcessUnsubscribeScope">
33 <variables>
34 <variable name="LogUnsubscribeRespRequestOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
35 <variable name="LogUnsubscribeRespRequestIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogUnsubscribeRespRequestMessage"/>
36 <variable name="LogNhinUnsubscribeRequestOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
37 <variable name="LogNhinUnsubscribeRequestIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogNhinUnsubscribeRequestMessage"/>
38 <variable name="AdapterUnsubscribeServiceName" type="xsd:string"/>
39 <variable name="DeleteSubscriptionOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionrepository" messageType="tns:DeleteSubscriptionResponse"/>
40 <variable name="DeleteSubscriptionIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionrepository" messageType="tns:DeleteSubscriptionRequest"/>
41 <variable name="AdapterUnsubscribeOut" xmlns:tns="urn:gov:hhs:fha:nhinc:adaptersubscriptionmanagement" messageType="tns:UnsubscribeResponseMessage"/>
42 <variable name="AdapterUnsubscribeIn" xmlns:tns="urn:gov:hhs:fha:nhinc:adaptersubscriptionmanagement" messageType="tns:UnsubscribeRequestMessage"/>
43 <variable name="GetConnectionInfoEndpointByServiceNameOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameResponseMessage"/>
44 <variable name="GetConnectionInfoEndpointByServiceNameIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameRequestMessage"/>
45 <variable name="Supported" type="xsd:boolean"/>
46 <variable name="Passthrough" type="xsd:boolean"/>
47 <variable name="GetPropertyOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyResponseMessage"/>
48 <variable name="GetPropertyIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyRequestMessage"/>
49 <variable name="UnsubscribeOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" messageType="tns:UnsubscribeResponseMessage">
50 <sxed:editor></sxed:editor>
51 </variable>
52 </variables>
53 <faultHandlers>
54 <catch>
55 <sequence name="UnsubscribeFaultSeq">
56 <assign name="AssignFaultInfo">
57 <copy>
58 <from>'Fault occurred processing Unsubscribe'</from>
59 <to>$UnsubscribeOut.UnsubscribeResponse/xsd:string
60 <sxed:editor>
61 <sxed:pseudoComp parentPath="$UnsubscribeOut.UnsubscribeResponse" type="xsd:string" qName="xsd:string" source="to"/>
62 </sxed:editor>
63 </to>
64 </copy>
65 </assign>
66 <reply name="ReplyFault" partnerLink="NhincUnsubscribePL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" portType="tns:SubscriptionManager" variable="UnsubscribeOut"/>
67 </sequence>
68 </catch>
69 </faultHandlers>
70 <sequence name="ProcessUnsubscribeSeq">
71 <assign name="AssignLogNhinUnsubscribeRequestInput">
72 <copy>
73 <from>$UnsubscribeIn.UnsubscribeRequest/ns4:Unsubscribe</from>
74 <to>$LogNhinUnsubscribeRequestIn.LogNhinUnsubscribeRequest/ns8:message/ns4:Unsubscribe</to>
75 </copy>
76 <copy>
77 <from>$UnsubscribeIn.UnsubscribeRequest/ns6:assertion</from>
78 <to>$LogNhinUnsubscribeRequestIn.LogNhinUnsubscribeRequest/ns8:message/ns6:assertion</to>
79 </copy>
80 <copy>
81 <from>'Inbound'</from>
82 <to>$LogNhinUnsubscribeRequestIn.LogNhinUnsubscribeRequest/ns9:direction</to>
83 </copy>
84 <copy>
85 <from>'Nhin'</from>
86 <to>$LogNhinUnsubscribeRequestIn.LogNhinUnsubscribeRequest/ns9:interface</to>
87 </copy>
88 </assign>
89 <invoke name="InvokeLogNhinUnsubscribeRequest" partnerLink="AuditLogPL" operation="LogNhinUnsubscribeRequest" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogNhinUnsubscribeRequestIn" outputVariable="LogNhinUnsubscribeRequestOut">
90 <sxt:trace>
91 <sxt:log level="info" location="onComplete">
92 <ns3:from>'NhinUnsubscribe.bpel - Completed logging of unsubscribe message received from remote gateway'</ns3:from>
93 </sxt:log>
94 <sxt:log level="warning" location="onComplete">
95 <ns3:from variable="LogNhinUnsubscribeRequestOut"/>
96 </sxt:log>
97 </sxt:trace>
98 </invoke>
99 <assign name="AssignServiceUnsubscribeFlagInput">
100 <copy>
101 <from>'gateway'</from>
102 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyFile</to>
103 </copy>
104 <copy>
105 <from>'serviceSubscription'</from>
106 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyName</to>
107 </copy>
108 </assign>
109 <invoke name="InvokeServiceUnsubscribeFlag" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
110 <assign name="AssignServiceUnsubscribeFlagOutput">
111 <copy>
112 <from>$GetPropertyOut.GetPropertyResponse/ns0:propertyValue = 'true'</from>
113 <to variable="Supported"/>
114 </copy>
115 </assign>
116 <if name="IfServiceUnsubscribe">
117 <condition>$Supported</condition>
118 <sequence name="ServiceUnsubscribeSeq">
119 <assign name="AssignGetPassthroughFlagInput">
120 <copy>
121 <from>'gateway'</from>
122 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyFile</to>
123 </copy>
124 <copy>
125 <from>'subscriptionPassthrough'</from>
126 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyName</to>
127 </copy>
128 </assign>
129 <invoke name="InvokeGetPassthroughFlag" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
130 <assign name="AssignGetPassthroughFlagOuput">
131 <copy>
132 <from>$GetPropertyOut.GetPropertyResponse/ns0:propertyValue = 'true'</from>
133 <to variable="Passthrough"/>
134 </copy>
135 </assign>
136 <if name="IfNotPassthrough">
137 <condition>not($Passthrough)</condition>
138 <sequence name="NotPassthroughSeq">
139 <assign name="AssignDeleteSubscriptionInput">
140 <copy>
141 <from>$UnsubscribeIn.UnsubscribeRequest/ns4:Unsubscribe/ns4:subscriptionReference</from>
142 <to>$DeleteSubscriptionIn.deleteSubscriptionMessage/ns4:SubscriptionReference</to>
143 </copy>
144 <copy>
145 <from>'adaptersubscriptionmanager'</from>
146 <to variable="AdapterUnsubscribeServiceName"/>
147 </copy>
148 </assign>
149 <invoke name="InvokeDeleteSubscription" partnerLink="SubRepositoryPL" operation="DeleteSubscription" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionrepository" portType="tns:NhincComponentSubscriptionRepositoryPortType" inputVariable="DeleteSubscriptionIn" outputVariable="DeleteSubscriptionOut">
150 <sxt:trace>
151 <sxt:log level="info" location="onStart">
152 <ns3:from>'### Deleting Subscription'</ns3:from>
153 </sxt:log>
154 </sxt:trace>
155 </invoke>
156 </sequence>
157 <else>
158 <sequence name="PassthroughSeq">
159 <assign name="AssignPassthroughServiceName">
160 <copy>
161 <from>'adaptersubscriptionmanagerpassthrough'</from>
162 <to variable="AdapterUnsubscribeServiceName"/>
163 </copy>
164 </assign>
165 </sequence>
166 </else>
167 </if>
168 <assign name="AssignGetHomeCommunityInput">
169 <copy>
170 <from>'gateway'</from>
171 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyFile</to>
172 </copy>
173 <copy>
174 <from>'localHomeCommunityId'</from>
175 <to>$GetPropertyIn.GetPropertyRequest/ns0:propertyName</to>
176 </copy>
177 </assign>
178 <invoke name="InvokeGetHomeCommunity" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
179 <assign name="AssignGetAdapterConnectionInput">
180 <copy>
181 <from>$GetPropertyOut.GetPropertyResponse/ns0:propertyValue</from>
182 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/ns1:homeCommunityWithServiceName/ns1:homeCommunity/ns2:homeCommunityId</to>
183 </copy>
184 <copy>
185 <from variable="AdapterUnsubscribeServiceName"/>
186 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/ns1:homeCommunityWithServiceName/ns1:serviceName</to>
187 </copy>
188 </assign>
189 <invoke name="InvokeGetAdapterConnection" partnerLink="ConnectionManagerPL" operation="GetConnectionInfoEndpointByServiceName" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" portType="tns:NhincComponentConnectionManagerPortType" inputVariable="GetConnectionInfoEndpointByServiceNameIn" outputVariable="GetConnectionInfoEndpointByServiceNameOut"/>
190 <assign name="AssignAdapterPassthroughEndpoint">
191 <copy>
192 <from>ns3:doXslTransform('urn:stylesheets:wrap2serviceref.xsl', $GetConnectionInfoEndpointByServiceNameOut.ConnectionInfoEndpoint/ns1:serviceConnectionInfoEndpoints/ns1:serviceConnectionInfoEndpoint/ns2:EPR/ns2:EndpointReference)</from>
193 <to partnerLink="AdapterUnsubscribePL"/>
194 </copy>
195 <copy>
196 <from>$UnsubscribeIn.UnsubscribeRequest/ns4:Unsubscribe</from>
197 <to>$AdapterUnsubscribeIn.UnsubscribeRequest/ns5:Unsubscribe</to>
198 </copy>
199 <copy>
200 <from>$UnsubscribeIn.UnsubscribeRequest/ns6:assertion</from>
201 <to>$AdapterUnsubscribeIn.UnsubscribeRequest/ns7:assertion</to>
202 </copy>
203 </assign>
204 <empty name="TODO_AuditLogBeforePassthrough"/>
205 <invoke name="InvokeAdapterUnsubscribe" partnerLink="AdapterUnsubscribePL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:adaptersubscriptionmanagement" portType="tns:AdapterSubscriptionManagerPortType" inputVariable="AdapterUnsubscribeIn" outputVariable="AdapterUnsubscribeOut"/>
206 <assign name="AssignResponse">
207 <copy>
208 <from variable="AdapterUnsubscribeOut" part="UnsubscribeResponse"/>
209 <to variable="UnsubscribeOut" part="UnsubscribeResponse"/>
210 </copy>
211 </assign>
212 </sequence>
213 <else>
214 <sequence name="NoServiceSeq">
215 <assign name="AssignUnsubscribeResponse">
216 <copy>
217 <from>'Subscriptions not supported'</from>
218 <to>$UnsubscribeOut.UnsubscribeResponse/xsd:string
219 <sxed:editor>
220 <sxed:pseudoComp parentPath="$UnsubscribeOut.UnsubscribeResponse" type="xsd:string" qName="xsd:string" source="to"/>
221 </sxed:editor>
222 </to>
223 </copy>
224 </assign>
225 </sequence>
226 </else>
227 </if>
228 <assign name="AssignLogUnsubscribeRespRequestInput">
229 <copy>
230 <from variable="UnsubscribeOut" part="UnsubscribeResponse"/>
231 <to>$LogUnsubscribeRespRequestIn.LogUnsubscribeRespRequest/ns8:message/ns5:UnsubscribeResponse</to>
232 </copy>
233 <copy>
234 <from>$UnsubscribeIn.UnsubscribeRequest/ns6:assertion</from>
235 <to>$LogUnsubscribeRespRequestIn.LogUnsubscribeRespRequest/ns8:message/ns8:assertion</to>
236 </copy>
237 <copy>
238 <from>'Inbound'</from>
239 <to>$LogUnsubscribeRespRequestIn.LogUnsubscribeRespRequest/ns9:direction</to>
240 </copy>
241 <copy>
242 <from>'Nhin'</from>
243 <to>$LogUnsubscribeRespRequestIn.LogUnsubscribeRespRequest/ns9:interface</to>
244 </copy>
245 </assign>
246 <invoke name="InvokeLogUnsubscribeRespRequest" partnerLink="AuditLogPL" operation="LogUnsubscribeRespRequest" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogUnsubscribeRespRequestIn" outputVariable="LogUnsubscribeRespRequestOut">
247 <sxt:trace>
248 <sxt:log level="info" location="onComplete">
249 <ns3:from>'NhinUnsubscribe.bpel - Completed logging of unsubscribe response message returned to remote gateway'</ns3:from>
250 </sxt:log>
251 <sxt:log level="warning" location="onComplete">
252 <ns3:from variable="LogUnsubscribeRespRequestOut"/>
253 </sxt:log>
254 </sxt:trace>
255 </invoke>
256 <reply name="ReplyNhincUnsubscribe" partnerLink="NhincUnsubscribePL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincsubscription" portType="tns:SubscriptionManager" variable="UnsubscribeOut"/>
257 </sequence>
258 </scope>
259 </sequence>
260</process>
Note: See TracBrowser for help on using the repository browser.