source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/EntityInternalOrchBPEL/src/EntityComponentInternalUnsubscribeOrch.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: 17.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="EntityComponentInternalUnsubscribeOrch"
4 targetNamespace="urn:gov:hhs:fha:nhinc:gateway:entityinternalorchbpel:entitycomponentinternalunsubscribeorch"
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:entityinternalorchbpel:entitycomponentinternalunsubscribeorch"
12 xmlns:ns0="urn:gov:hhs:fha:nhinc:common:subscription"
13 xmlns:ns1="urn:gov:hhs:fha:nhinc:common:nhinccommoninternalorch"
14 xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommonproxy" xmlns:ns3="http://docs.oasis-open.org/wsn/b-2" xmlns:ns4="urn:gov:hhs:fha:nhinc:common:nhinccommon">
15 <import namespace="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" location="Interfaces/wsdl/EntityComponentInternalUnsubscribeOrch.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
16 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" location="Interfaces/wsdl/NhincComponentSubscriptionReferenceRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
17 <import namespace="urn:gov:hhs:fha:nhinc:nhincproxysubscriptionmanagement" location="Interfaces/wsdl/NhincProxySubscriptionManagement.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
18 <import namespace="http://docs.oasis-open.org/wsrf/rw-2" location="Interfaces/wsdl/rw-2.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
19 <import namespace="urn:gov:hhs:fha:nhinc:nhincinternalcomponentpolicyenginetransform" location="Interfaces/wsdl/NhincComponentInternalSubscriptionDte.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
20 <partnerLinks>
21 <partnerLink name="SubRefRepPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" partnerLinkType="tns:NhincComponentSubscriptionReferenceRepository" partnerRole="NhincComponentSubscriptionReferenceRepositoryPortTypeRole"/>
22 <partnerLink name="NhincProxySubscriptionMgmtPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxysubscriptionmanagement" partnerLinkType="tns:NhincProxySubscriptionManager" partnerRole="NhincProxySubscriptionManagerPortTypeRole"/>
23 <partnerLink name="SubscriptionDtePL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincinternalcomponentpolicyenginetransform" partnerLinkType="tns:NhincComponentInternalSubscriptionDte" partnerRole="NhincComponentInternalSubscriptionDtePortTypeRole"/>
24 <partnerLink name="EntityUnsubscribeInternalPL" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" partnerLinkType="tns:EntityComponentInternalUnsubscribeOrch" myRole="EntityComponentInternalUnsubscribeOrchPortTypeRole"/>
25 </partnerLinks>
26 <variables>
27 <variable name="UnsubscribeOut" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" messageType="tns:UnsubscribeResponse">
28 <sxed:editor>
29 <sxed:pseudoComp parentPath="$UnsubscribeOut.UnsubscribeResponse" type="xsd:string" qName="xsd:string" source="to"/>
30 </sxed:editor>
31 </variable>
32 <variable name="UnsubscribeIn" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" messageType="tns:UnsubscribeRequest"/>
33 </variables>
34 <sequence>
35 <receive name="ReceiveUnsubscribeInternal" createInstance="yes" partnerLink="EntityUnsubscribeInternalPL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" portType="tns:EntityComponentInternalUnsubscribeOrchPortType" variable="UnsubscribeIn"/>
36 <scope name="UnsubscribeScope">
37 <variables>
38 <variable name="CreateUnsubscribeResponseOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincinternalcomponentpolicyenginetransform" messageType="tns:CreateUnsubscribeResponseResponseMessage"/>
39 <variable name="CreateUnsubscribeResponseIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincinternalcomponentpolicyenginetransform" messageType="tns:CreateUnsubscribeResponseRequestMessage"/>
40 <variable name="RetrieveByParentSubscriptionReferenceIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" messageType="tns:RetrieveByParentSubscriptionReferenceRequest"/>
41 <variable name="RetrieveByParentSubscriptionReferenceOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" messageType="tns:RetrieveByParentSubscriptionReferenceResponse"/>
42 <variable name="DeleteSubscriptionReferenceIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" messageType="tns:DeleteSubscriptionReferenceRequest"/>
43 <variable name="DeleteSubscriptionReferenceOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" messageType="tns:DeleteSubscriptionReferenceResponse"/>
44 <variable name="SubscriptionReferenceCount" type="xsd:integer"/>
45 </variables>
46 <faultHandlers>
47 <catch faultName="sxeh:systemFault" faultVariable="systemFaultVar" faultMessageType="sxeh:faultMessage">
48 <sequence name="SystemFaultSeq">
49 <assign name="AssignFaultResponse">
50 <sxt:trace>
51 <sxt:log level="info" location="onStart">
52 <from>'EntityComponentInternalUnsubscribeOrch.bpel - A system fault was encountered processing an unsubscribe message. Fault details follow...'</from>
53 </sxt:log>
54 <sxt:log level="warning" location="onStart">
55 <from variable="systemFaultVar"/>
56 </sxt:log>
57 </sxt:trace>
58 <copy>
59 <from>'A fault occured processing an unsubscirbe.'</from>
60 <to>$UnsubscribeOut.UnsubscribeResponse/xsd:string
61 <sxed:editor>
62 <sxed:pseudoComp parentPath="$UnsubscribeOut.UnsubscribeResponse" type="xsd:string" qName="xsd:string" source="to"/>
63 </sxed:editor>
64 </to>
65 </copy>
66 </assign>
67 </sequence>
68 </catch>
69 </faultHandlers>
70 <sequence name="UnsubscribeSeq">
71 <assign name="AssignGetRemoteSubscriptionReferencesInput">
72 <copy>
73 <from>$UnsubscribeIn.UnsubscribeRequest/ns0:Unsubscribe/ns0:subscriptionReference</from>
74 <to>$RetrieveByParentSubscriptionReferenceIn.RetrieveByParentSubscriptionReferenceMessage/ns0:SubscriptionReference</to>
75 </copy>
76 </assign>
77 <invoke name="InvokeGetRemoteSubscriptionReferences" partnerLink="SubRefRepPL" operation="RetrieveByParentSubscriptionReference" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" portType="tns:NhincComponentSubscriptionReferenceRepositoryPortType" inputVariable="RetrieveByParentSubscriptionReferenceIn" outputVariable="RetrieveByParentSubscriptionReferenceOut"/>
78 <assign name="AssignSubscriptionReferenceCount">
79 <copy>
80 <from>count($RetrieveByParentSubscriptionReferenceOut.SubscriptionItems/ns0:subscriptionItem)</from>
81 <to variable="SubscriptionReferenceCount"/>
82 </copy>
83 </assign>
84 <if name="IfSubscriptionReferencesFound">
85 <condition>$SubscriptionReferenceCount &gt;= 0</condition>
86 <sequence name="SubRefsFoundSeq">
87 <forEach name="ForEachSubscriptionRef" parallel="no" counterName="SubRefCounter">
88 <startCounterValue>1</startCounterValue>
89 <finalCounterValue>$SubscriptionReferenceCount</finalCounterValue>
90 <scope name="ProcessSingleSubRefScope">
91 <variables>
92 <variable name="NhincProxyUnsubscribeIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxysubscriptionmanagement" messageType="tns:UnsubscribeRequestMessage"/>
93 <variable name="NhincProxyUnsubscribeOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxysubscriptionmanagement" messageType="tns:UnsubscribeResponseMessage"/>
94 </variables>
95 <faultHandlers>
96 <catch faultName="sxeh:systemFault" faultVariable="systemFaultIndividualMsgVar" faultMessageType="sxeh:faultMessage">
97 <empty name="LogSystemFault">
98 <sxt:trace>
99 <sxt:log level="info" location="onStart">
100 <from>'EntityComponentInternalUnsubscribeOrch.bpel - A system fault was encountered processing a single subscription reference for unsubscribe. Fault detials follow...'</from>
101 </sxt:log>
102 <sxt:log level="warning" location="onStart">
103 <from variable="systemFaultIndividualMsgVar"/>
104 </sxt:log>
105 </sxt:trace>
106 </empty>
107 </catch>
108 <catchAll>
109 <empty name="LogCatchAll">
110 <sxt:trace>
111 <sxt:log level="warning" location="onStart">
112 <from>'EntityComponentInternalUnsubscribeOrch.bpel - An unexpected fault was encountered processing a single subscription reference for unsubscribe.'</from>
113 </sxt:log>
114 </sxt:trace>
115 </empty>
116 </catchAll>
117 </faultHandlers>
118 <sequence name="ProcessSingleSubRefSeq">
119 <empty name="TODO_PolicyCheck"/>
120 <assign name="AssignNhincProxyInput">
121 <copy>
122 <from>$UnsubscribeIn.UnsubscribeRequest/ns1:assertion</from>
123 <to>$NhincProxyUnsubscribeIn.UnsubscribeRequest/ns2:assertion</to>
124 </copy>
125 <copy>
126 <from>$RetrieveByParentSubscriptionReferenceOut.SubscriptionItems/ns0:subscriptionItem[$SubRefCounter]/ns0:SubscriptionReference</from>
127 <to>$NhincProxyUnsubscribeIn.UnsubscribeRequest/ns2:unsubscribe/ns0:subscriptionReference</to>
128 </copy>
129 <copy>
130 <from>$RetrieveByParentSubscriptionReferenceOut.SubscriptionItems/ns0:subscriptionItem[$SubRefCounter]/ns0:Subscribee/ns0:Community/ns0:Id
131 <sxed:editor>
132 <sxed:predicate path="$RetrieveByParentSubscriptionReferenceOut.SubscriptionItems/ns0:subscriptionItem[$SubRefCounter]" source="from"/>
133 </sxed:editor>
134 </from>
135 <to>$NhincProxyUnsubscribeIn.UnsubscribeRequest/ns2:nhinTargetSystem/ns4:homeCommunity/ns4:homeCommunityId</to>
136 </copy>
137 </assign>
138 <invoke name="InvokeProxyUnsubscribe" partnerLink="NhincProxySubscriptionMgmtPL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxysubscriptionmanagement" portType="tns:NhincProxySubscriptionManagerPortType" inputVariable="NhincProxyUnsubscribeIn" outputVariable="NhincProxyUnsubscribeOut"/>
139 <assign name="AssignDeleteChildSubscriptionRefInput">
140 <sxt:trace>
141 <sxt:log level="info" location="onStart">
142 <from variable="NhincProxyUnsubscribeOut"/>
143 </sxt:log>
144 </sxt:trace>
145 <copy>
146 <from>$RetrieveByParentSubscriptionReferenceOut.SubscriptionItems/ns0:subscriptionItem/ns0:SubscriptionReference</from>
147 <to>$DeleteSubscriptionReferenceIn.DeleteSubscriptionMessage/ns0:SubscriptionReference</to>
148 </copy>
149 </assign>
150 <invoke name="InvokeDeleteChildSubscriptionRef" partnerLink="SubRefRepPL" operation="DeleteSubscriptionReference" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" portType="tns:NhincComponentSubscriptionReferenceRepositoryPortType" inputVariable="DeleteSubscriptionReferenceIn" outputVariable="DeleteSubscriptionReferenceOut">
151 <sxt:trace>
152 <sxt:log level="info" location="onStart">
153 <from>'### Deteting child subscription reference'</from>
154 </sxt:log>
155 </sxt:trace>
156 </invoke>
157 <empty name="LogDeleteChildSubRefResults">
158 <sxt:trace>
159 <sxt:log level="info" location="onStart">
160 <from variable="DeleteSubscriptionReferenceOut"/>
161 </sxt:log>
162 <sxt:log level="warning" location="onStart">
163 <from>'Child subscription reference deleted - message follows...'</from>
164 </sxt:log>
165 </sxt:trace>
166 </empty>
167 </sequence>
168 </scope>
169 </forEach>
170 <assign name="AssignDeleteParentSubscriptionRefInput">
171 <copy>
172 <from>$UnsubscribeIn.UnsubscribeRequest/ns0:Unsubscribe/ns0:subscriptionReference</from>
173 <to>$DeleteSubscriptionReferenceIn.DeleteSubscriptionMessage/ns0:SubscriptionReference</to>
174 </copy>
175 </assign>
176 <invoke name="InvokeDeleteParentSubscriptionRef" partnerLink="SubRefRepPL" operation="DeleteSubscriptionReference" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentsubscriptionreferencerepository" portType="tns:NhincComponentSubscriptionReferenceRepositoryPortType" inputVariable="DeleteSubscriptionReferenceIn" outputVariable="DeleteSubscriptionReferenceOut">
177 <sxt:trace>
178 <sxt:log level="info" location="onStart">
179 <from>'### Deleting parent subscription reference'</from>
180 </sxt:log>
181 </sxt:trace>
182 </invoke>
183 </sequence>
184 </if>
185 <assign name="AssignCreateUnsubscribeResponseInput">
186 <copy>
187 <from>'not used'</from>
188 <to>$CreateUnsubscribeResponseIn.CreateUnsubscribeResponse/ns0:Empty/ns0:notUsed</to>
189 </copy>
190 </assign>
191 <invoke name="InvokeCreateUnsubscribeResponse" partnerLink="SubscriptionDtePL" operation="CreateUnsubscribeResponse" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincinternalcomponentpolicyenginetransform" portType="tns:NhincComponentInternalSubscriptionDtePortType" inputVariable="CreateUnsubscribeResponseIn" outputVariable="CreateUnsubscribeResponseOut"/>
192 <assign name="AssignCreateUnsubscribeResponseOutput">
193 <copy>
194 <from>$CreateUnsubscribeResponseOut.CreateUnsubscribeResponse/ns3:UnsubscribeResponse</from>
195 <to variable="UnsubscribeOut" part="UnsubscribeResponse"/>
196 </copy>
197 </assign>
198 </sequence>
199 </scope>
200 <reply name="ReplyUnsubscribeInternal" partnerLink="EntityUnsubscribeInternalPL" operation="Unsubscribe" xmlns:tns="urn:gov:hhs:fha:nhinc:entitycomponentinternalunsubscribeorch" portType="tns:EntityComponentInternalUnsubscribeOrchPortType" variable="UnsubscribeOut"/>
201 </sequence>
202</process>
Note: See TracBrowser for help on using the repository browser.