source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/NhinBPEL/src/NhinDocRetrieve.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.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="NhinDocRetrieve"
4 targetNamespace="urn:gov:hhs:fha:nhinc:nhinbpel:nhindocretrieve"
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:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling"
10 xmlns:tns="urn:gov:hhs:fha:nhinc:nhinbpel:nhindocretrieve"
11 xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
12 xmlns:nccommon="urn:gov:hhs:fha:nhinc:common:nhinccommon"
13 xmlns:propacc="urn:gov:hhs:fha:nhinc:common:propertyaccess"
14 xmlns:ihe="urn:ihe:iti:xds-b:2007"
15 xmlns:conninfo="urn:gov:hhs:fha:nhinc:common:connectionmanagerinfo"
16 xmlns:ncadapter="urn:gov:hhs:fha:nhinc:common:nhinccommonadapter"
17 xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
18 xmlns:nhinccommonintorch="urn:gov:hhs:fha:nhinc:common:nhinccommoninternalorch"
19 xmlns:auditlog="urn:gov:hhs:fha:nhinc:common:auditlog">
20 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" location="Interfaces/wsdl/NhincComponentPropAccessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
21 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" location="Interfaces/wsdl/NhincComponentConnectionManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
22 <import namespace="urn:gov:hhs:fha:nhinc:adapterdocretrieve" location="Interfaces/wsdl/AdapterDocRetrieve.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
23 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternaldocretrieveorch" location="Interfaces/wsdl/NhincComponentInternalDocRetrieveOrch.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
24 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" location="Interfaces/wsdl/NhincComponentInternalAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
25 <import namespace="urn:gov:hhs:fha:nhinc:nhincdocretrieve" location="Interfaces/wsdl/NhincDocRetrieve.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
26 <partnerLinks>
27 <partnerLink name="PropAccessorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" partnerLinkType="tns:NhincComponentPropAccessor" partnerRole="NhincComponentPropAccessorPortTypeRole"/>
28 <partnerLink name="ConnectionMgrPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" partnerLinkType="tns:NhincComponentConnectionManager" partnerRole="NhincComponentConnectionManagerPortTypeRole"/>
29 <partnerLink name="AdapterDocRetrievePL" xmlns:tns="urn:gov:hhs:fha:nhinc:adapterdocretrieve" partnerLinkType="tns:AdapterDocRetrieve" partnerRole="AdapterDocRetrievePortTypeRole"/>
30 <partnerLink name="InternalDocRetrievePL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternaldocretrieveorch" partnerLinkType="tns:NhincComponentInternalDocRetrieveOrch" partnerRole="NhincComponentInternalDocRetrieveOrchPortTypeRole"/>
31 <partnerLink name="AuditLogRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" partnerLinkType="tns:NhincComponentInternalAuditRepository" partnerRole="NhincComponentInternalAuditRepositoryPortTypeRole"/>
32 <partnerLink name="NhincDocRetrievePL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve" partnerLinkType="tns:NhincDocRetrieve" myRole="NhincDocRetrievePortTypeRole"/>
33 </partnerLinks>
34 <variables>
35 <variable name="LogDocRetrieveResultOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
36 <variable name="LogDocRetrieveResultIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogDocRetrieveResultRequestMessage"/>
37 <variable name="LogDocRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
38 <variable name="LogDocRetrieveIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogDocRetrieveRequestMessage"/>
39 <variable name="Nhinc_CrossGatewayRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve" messageType="tns:RespondingGateway_CrossGatewayRetrieveResponse"/>
40 <variable name="Nhinc_CrossGatewayRetrieveIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve" messageType="tns:RespondingGateway_CrossGatewayRetrieveRequest"/>
41 </variables>
42 <sequence>
43 <receive name="ReceiveNhinDocRetrieve" createInstance="yes" partnerLink="NhincDocRetrievePL" operation="RespondingGateway_CrossGatewayRetrieve" xmlns:ihe="urn:ihe:iti:xds-b:2007" portType="tns:NhincDocRetrievePortType" variable="Nhinc_CrossGatewayRetrieveIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve"/>
44 <assign name="AssignAuditReposDRReq">
45 <sxt:trace>
46 <sxt:log level="info" location="onStart">
47 <from>'Begin NhinDocRetrieve - Input Message is:'</from>
48 </sxt:log>
49 <sxt:log level="info" location="onStart">
50 <from variable="Nhinc_CrossGatewayRetrieveIn"/>
51 </sxt:log>
52 </sxt:trace>
53 <copy>
54 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/ihe:RetrieveDocumentSetRequest</from>
55 <to>$LogDocRetrieveIn.LogDocRetrieveRequest/auditlog:message/ihe:RetrieveDocumentSetRequest</to>
56 </copy>
57 <copy>
58 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/nhinccommonintorch:assertion</from>
59 <to>$LogDocRetrieveIn.LogDocRetrieveRequest/auditlog:message/auditlog:assertion</to>
60 </copy>
61 <copy>
62 <from>'Inbound'</from>
63 <to>$LogDocRetrieveIn.LogDocRetrieveRequest/auditlog:direction</to>
64 </copy>
65 <copy>
66 <from>'Nhin'</from>
67 <to>$LogDocRetrieveIn.LogDocRetrieveRequest/auditlog:interface</to>
68 </copy>
69 </assign>
70 <invoke name="InvokeAuditReposDRReq" partnerLink="AuditLogRepositoryPL" operation="LogDocRetrieve" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogDocRetrieveIn" outputVariable="LogDocRetrieveOut"/>
71 <scope name="NhinDocRetrieveScope">
72 <variables>
73 <variable name="Internal_CrossGatewayRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternaldocretrieveorch" messageType="tns:RespondingGateway_CrossGatewayRetrieveResponse"/>
74 <variable name="Internal_CrossGatewayRetrieveIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternaldocretrieveorch" messageType="tns:RespondingGateway_CrossGatewayRetrieveRequest"/>
75 <variable name="Adapter_CrossGatewayRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:adapterdocretrieve" messageType="tns:RespondingGateway_CrossGatewayRetrieveResponseMessage"/>
76 <variable name="Adapter_CrossGatewayRetrieveIn" xmlns:tns="urn:gov:hhs:fha:nhinc:adapterdocretrieve" messageType="tns:RespondingGateway_CrossGatewayRetrieveRequestMessage"/>
77 <variable name="GetConnectionInfoEndpointByServiceNameOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameResponseMessage"/>
78 <variable name="GetConnectionInfoEndpointByServiceNameIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameRequestMessage"/>
79 <variable name="PassthroughEnabled" type="xsd:boolean"/>
80 <variable name="DocRetrieveEnabled" type="xsd:boolean"/>
81 <variable name="GetPropertyOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyResponseMessage"/>
82 <variable name="GetPropertyIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyRequestMessage"/>
83 </variables>
84 <faultHandlers>
85 <catch faultName="sxeh:systemFault" faultVariable="systemFaultVar" faultMessageType="sxeh:faultMessage">
86 <sequence name="SystemFaultSeq">
87 <assign name="AssignErrorInfo">
88 <sxt:trace>
89 <sxt:log level="info" location="onStart">
90 <bpel:from>'NhinDocRetrieve BPEL - A system fault was encountered processing a document retrieve message. Fault details follow...'</bpel:from>
91 </sxt:log>
92 <sxt:log level="warning" location="onStart">
93 <bpel:from variable="systemFaultVar"/>
94 </sxt:log>
95 </sxt:trace>
96 <copy>
97 <from>'urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure'</from>
98 <to>$Nhinc_CrossGatewayRetrieveOut.CrossGatewayRetrieveResponse/rs:RegistryResponse/@status</to>
99 </copy>
100 </assign>
101 <reply name="ReplyNhinDocRetrieveFromFault" partnerLink="NhincDocRetrievePL" operation="RespondingGateway_CrossGatewayRetrieve" portType="tns:NhincDocRetrievePortType" variable="Nhinc_CrossGatewayRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve"/>
102 <exit name="ExitAfterFault"/>
103 </sequence>
104 </catch>
105 </faultHandlers>
106 <sequence name="NhinDocRetrieveSeq">
107 <assign name="AssignEnabledLookupInput">
108 <copy>
109 <from>'gateway'</from>
110 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyFile</to>
111 </copy>
112 <copy>
113 <from>'serviceDocumentRetrieve'</from>
114 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyName</to>
115 </copy>
116 </assign>
117 <invoke name="InvokeDocRetrieveSupportedFlag" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
118 <assign name="AssignSupportedFlag">
119 <copy>
120 <from>$GetPropertyOut.GetPropertyResponse/propacc:propertyValue = 'true'</from>
121 <to variable="DocRetrieveEnabled"/>
122 </copy>
123 </assign>
124 <if name="IfDocRetrieveEnabled">
125 <condition>$DocRetrieveEnabled</condition>
126 <sequence name="DocRetrieveEnabledSeq">
127 <assign name="AssignGetPassthroughFlagInput">
128 <copy>
129 <from>'gateway'</from>
130 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyFile</to>
131 </copy>
132 <copy>
133 <from>'documentRetrievePassthrough'</from>
134 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyName</to>
135 </copy>
136 </assign>
137 <invoke name="InvokeGetPassthroughFlag" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
138 <assign name="AssignPassthroughFlag">
139 <copy>
140 <from>$GetPropertyOut.GetPropertyResponse/propacc:propertyValue = 'true'</from>
141 <to variable="PassthroughEnabled"/>
142 </copy>
143 </assign>
144 <if name="IfPassthrough">
145 <condition>$PassthroughEnabled</condition>
146 <sequence name="PassthroughSeq">
147 <assign name="AssignGetHomeCommunityInput">
148 <copy>
149 <from>'gateway'</from>
150 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyFile</to>
151 </copy>
152 <copy>
153 <from>'localHomeCommunityId'</from>
154 <to>$GetPropertyIn.GetPropertyRequest/propacc:propertyName</to>
155 </copy>
156 </assign>
157 <invoke name="InvokeGetHomeCommunityId" partnerLink="PropAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GetPropertyIn" outputVariable="GetPropertyOut"/>
158 <assign name="AssignConnectionMangerPassthroughInput">
159 <copy>
160 <from>$GetPropertyOut.GetPropertyResponse/propacc:propertyValue</from>
161 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:homeCommunity/nccommon:homeCommunityId</to>
162 </copy>
163 <copy>
164 <from>'adapterdocretrievepassthrough'</from>
165 <to>$GetConnectionInfoEndpointByServiceNameIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:serviceName</to>
166 </copy>
167 </assign>
168 <invoke name="InvokeConnectionManagerForPassthrough" partnerLink="ConnectionMgrPL" operation="GetConnectionInfoEndpointByServiceName" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" portType="tns:NhincComponentConnectionManagerPortType" inputVariable="GetConnectionInfoEndpointByServiceNameIn" outputVariable="GetConnectionInfoEndpointByServiceNameOut"/>
169 <assign name="AssignAdapterDocQueryInput">
170 <copy>
171 <from>bpel:doXslTransform('urn:stylesheets:wrap2serviceref.xsl', $GetConnectionInfoEndpointByServiceNameOut.ConnectionInfoEndpoint/conninfo:serviceConnectionInfoEndpoints/conninfo:serviceConnectionInfoEndpoint/nccommon:EPR/nccommon:EndpointReference)</from>
172 <to partnerLink="AdapterDocRetrievePL"/>
173 </copy>
174 <copy>
175 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/ihe:RetrieveDocumentSetRequest</from>
176 <to>$Adapter_CrossGatewayRetrieveIn.RespondingGateway_CrossGatewayRetrieveRequest/ihe:RetrieveDocumentSetRequest</to>
177 </copy>
178 <copy>
179 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/nhinccommonintorch:assertion</from>
180 <to>$Adapter_CrossGatewayRetrieveIn.RespondingGateway_CrossGatewayRetrieveRequest/ncadapter:assertion</to>
181 </copy>
182 </assign>
183 <invoke name="InvokeAdapterDocRetrieve" partnerLink="AdapterDocRetrievePL" operation="RespondingGateway_CrossGatewayRetrieve" xmlns:tns="urn:gov:hhs:fha:nhinc:adapterdocretrieve" portType="tns:AdapterDocRetrievePortType" inputVariable="Adapter_CrossGatewayRetrieveIn" outputVariable="Adapter_CrossGatewayRetrieveOut"/>
184 <assign name="AssignDocRetrieveResponse">
185 <copy>
186 <from variable="Adapter_CrossGatewayRetrieveOut" part="RespondingGateway_CrossGatewayRetrieveResponse"/>
187 <to variable="Nhinc_CrossGatewayRetrieveOut" part="CrossGatewayRetrieveResponse"/>
188 </copy>
189 </assign>
190 </sequence>
191 <else>
192 <sequence name="NotPassthroughSeq">
193 <assign name="AssignInternalDocRetrieveInput">
194 <copy>
195 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/ihe:RetrieveDocumentSetRequest</from>
196 <to>$Internal_CrossGatewayRetrieveIn.RetrieveDocumentSetRequest/ihe:RetrieveDocumentSetRequest</to>
197 </copy>
198 <copy>
199 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/nhinccommonintorch:assertion</from>
200 <to>$Internal_CrossGatewayRetrieveIn.RetrieveDocumentSetRequest/nhinccommonintorch:assertion</to>
201 </copy>
202 </assign>
203 <invoke name="InvokeInternalDocRetrieve" partnerLink="InternalDocRetrievePL" operation="RespondingGateway_CrossGatewayRetrieve" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternaldocretrieveorch" portType="tns:NhincComponentInternalDocRetrieveOrchPortType" inputVariable="Internal_CrossGatewayRetrieveIn" outputVariable="Internal_CrossGatewayRetrieveOut"/>
204 <assign name="AssignInternalDocRetrieveOutput">
205 <copy>
206 <from variable="Internal_CrossGatewayRetrieveOut" part="RetrieveDocumentSetResponse"/>
207 <to variable="Nhinc_CrossGatewayRetrieveOut" part="CrossGatewayRetrieveResponse"/>
208 </copy>
209 </assign>
210 </sequence>
211 </else>
212 </if>
213 </sequence>
214 <else>
215 <assign name="AssignEmptyResponse">
216 <copy>
217 <from>'urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success'</from>
218 <to>$Nhinc_CrossGatewayRetrieveOut.CrossGatewayRetrieveResponse/rs:RegistryResponse/@status</to>
219 </copy>
220 <copy>
221 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/ihe:RetrieveDocumentSetRequest/ihe:DocumentRequest/ihe:HomeCommunityId</from>
222 <to>$Nhinc_CrossGatewayRetrieveOut.CrossGatewayRetrieveResponse/ihe:DocumentResponse/ihe:HomeCommunityId</to>
223 </copy>
224 </assign>
225 </else>
226 </if>
227 </sequence>
228 </scope>
229 <assign name="AssignAuditLogDRResp">
230 <copy>
231 <from>$Nhinc_CrossGatewayRetrieveIn.CrossGatewayRetrieveRequest/nhinccommonintorch:assertion</from>
232 <to>$LogDocRetrieveResultIn.LogDocRetrieveResultRequest/auditlog:message/auditlog:assertion</to>
233 </copy>
234 <copy>
235 <from variable="Nhinc_CrossGatewayRetrieveOut" part="CrossGatewayRetrieveResponse"/>
236 <to>$LogDocRetrieveResultIn.LogDocRetrieveResultRequest/auditlog:message/ihe:RetrieveDocumentSetResponse</to>
237 </copy>
238 <copy>
239 <from>'Outbound'</from>
240 <to>$LogDocRetrieveResultIn.LogDocRetrieveResultRequest/auditlog:direction</to>
241 </copy>
242 <copy>
243 <from>'Nhin'</from>
244 <to>$LogDocRetrieveResultIn.LogDocRetrieveResultRequest/auditlog:interface</to>
245 </copy>
246 </assign>
247 <invoke name="InvokeAuditReposDRRes" partnerLink="AuditLogRepositoryPL" operation="LogDocRetrieveResult" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogDocRetrieveResultIn" outputVariable="LogDocRetrieveResultOut"/>
248 <reply name="ReplyNhinDocRetrieve" partnerLink="NhincDocRetrievePL" operation="RespondingGateway_CrossGatewayRetrieve" xmlns:ihe="urn:ihe:iti:xds-b:2007" portType="tns:NhincDocRetrievePortType" variable="Nhinc_CrossGatewayRetrieveOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincdocretrieve">
249 <sxt:trace>
250 <sxt:log level="info" location="onStart">
251 <from>'End NhinDocRetrieve - Response Message is:'</from>
252 </sxt:log>
253 <sxt:log level="info" location="onStart">
254 <from variable="Nhinc_CrossGatewayRetrieveOut"/>
255 </sxt:log>
256 </sxt:trace>
257 </reply>
258 </sequence>
259</process>
Note: See TracBrowser for help on using the repository browser.