source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/EntityBPEL/src/EntityAuditLogQuery.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.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<process
3 name="EntityAuditLogQuery"
4 targetNamespace="urn:gov:hhs:fha:nhinc:gateway:entitybpel:entityauditlogquery"
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:entitybpel:entityauditlogquery"
12 xmlns:audit="http://nhinc.services.com/schema/auditmessage"
13 xmlns:auditlog="urn:gov:hhs:fha:nhinc:common:auditlog"
14 xmlns:nccommonentity="urn:gov:hhs:fha:nhinc:common:nhinccommonentity"
15 xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions"
16 xmlns:nccommon="urn:gov:hhs:fha:nhinc:common:nhinccommon"
17 xmlns:propacc="urn:gov:hhs:fha:nhinc:common:propertyaccess"
18 xmlns:conninfo="urn:gov:hhs:fha:nhinc:common:connectionmanagerinfo"
19 xmlns:nccommonadapter="urn:gov:hhs:fha:nhinc:common:nhinccommonadapter"
20 xmlns:nccommonproxy="urn:gov:hhs:fha:nhinc:common:nhinccommonproxy"
21 xmlns:agg="urn:gov:hhs:fha:nhinc:gateway:aggregator">
22 <import namespace="urn:gov:hhs:fha:nhinc:entityauditlogquery" location="Interfaces/wsdl/EntityAuditLogQuery.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
23 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" location="Interfaces/wsdl/NhincComponentInternalAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
24 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" location="Interfaces/wsdl/NhincComponentPropAccessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
25 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" location="Interfaces/wsdl/NhincComponentConnectionManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
26 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentauditrepository" location="Interfaces/wsdl/NhincComponentAuditRepository.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
27 <import namespace="urn:gov:hhs:fha:nhinc:nhincproxyauditlogquery" location="Interfaces/wsdl/NhincProxyAuditLogQuery.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
28 <import namespace="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" location="Interfaces/wsdl/NhincComponentAggregator.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
29 <partnerLinks>
30 <partnerLink name="NhincAuditRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" partnerLinkType="tns:NhincComponentInternalAuditRepository" partnerRole="NhincComponentInternalAuditRepositoryPortTypeRole"/>
31 <partnerLink name="PropertyAccessorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" partnerLinkType="tns:NhincComponentPropAccessor" partnerRole="NhincComponentPropAccessorPortTypeRole"/>
32 <partnerLink name="ConnectionManagerPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" partnerLinkType="tns:NhincComponentConnectionManager" partnerRole="NhincComponentConnectionManagerPortTypeRole"/>
33 <partnerLink name="AuditRepositoryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentauditrepository" partnerLinkType="tns:AuditRepositoryManager" partnerRole="AuditRepositoryManagerPortTypeRole"/>
34 <partnerLink name="NhincProxyAuditQueryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxyauditlogquery" partnerLinkType="tns:NhincProxyAuditLogQuery" partnerRole="NhincProxyAuditLogQueryPortTypeRole"/>
35 <partnerLink name="AggregatorPL" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" partnerLinkType="tns:NhincComponentAggregator" partnerRole="NhincComponentAggregatorPortTypeRole"/>
36 <partnerLink name="EntityAuditLogQueryPL" xmlns:tns="urn:gov:hhs:fha:nhinc:entityauditlogquery" partnerLinkType="tns:EntityAuditLogQuery" myRole="EntityAuditLogQueryPortTypeRole"/>
37 </partnerLinks>
38 <variables>
39 <variable name="LocalAuditQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentauditrepository" messageType="tns:QueryAuditEventsResponseMessage"/>
40 <variable name="LocalAuditQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentauditrepository" messageType="tns:QueryAuditEventsRequestMessage"/>
41 <variable name="GetAuditRepoEndpointOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameResponseMessage"/>
42 <variable name="GetAuditRepoEndpointIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" messageType="tns:GetConnectionInfoEndpointByServiceNameRequestMessage"/>
43 <variable name="GeLocalHcidPropOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyResponseMessage"/>
44 <variable name="GeLocalHcidPropIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" messageType="tns:GetPropertyRequestMessage"/>
45 <variable name="LogFindAuditEventsOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogEventResponseMessage"/>
46 <variable name="LogFindAuditEventsIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" messageType="tns:LogFindAuditEventsRequestMessage"/>
47 <variable name="FindAuditEventsOut" xmlns:tns="urn:gov:hhs:fha:nhinc:entityauditlogquery" messageType="tns:findAuditEventsResponseMessage"/>
48 <variable name="FindAuditEventsIn" xmlns:tns="urn:gov:hhs:fha:nhinc:entityauditlogquery" messageType="tns:findAuditEventsRequestMessage"/>
49 <variable name="targetIdx" type="xsd:integer"/>
50 <variable name="first" type="xsd:boolean"/>
51 </variables>
52 <sequence>
53 <receive name="ReceiveEntityAuditLogQuery" createInstance="yes" partnerLink="EntityAuditLogQueryPL" operation="findAuditEvents" xmlns:tns="urn:gov:hhs:fha:nhinc:entityauditlogquery" portType="tns:EntityAuditLogQueryPortType" variable="FindAuditEventsIn"/>
54 <assign name="AssignLogAuditQuery">
55 <copy>
56 <from>$FindAuditEventsIn.FindAuditEventsRequest/audit:FindAuditEvents</from>
57 <to>$LogFindAuditEventsIn.LogFindAuditEventsRequest/auditlog:message/audit:FindAuditEvents</to>
58 </copy>
59 <copy>
60 <from>$FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:assertion</from>
61 <to>$LogFindAuditEventsIn.LogFindAuditEventsRequest/auditlog:message/auditlog:assertion</to>
62 </copy>
63 </assign>
64 <invoke name="InvokeLogAuditQuery" partnerLink="NhincAuditRepositoryPL" operation="LogFindAuditEvents" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentinternalauditrepository" portType="tns:NhincComponentInternalAuditRepositoryPortType" inputVariable="LogFindAuditEventsIn" outputVariable="LogFindAuditEventsOut"/>
65 <assign name="Initialize">
66 <copy>
67 <from>1</from>
68 <to variable="targetIdx"/>
69 </copy>
70 <copy>
71 <from>true()</from>
72 <to variable="first"/>
73 </copy>
74 </assign>
75 <if name="IfNoTargetCommunitiesSpecified">
76 <condition>count($FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:nhinTargetCommunities/nccommon:nhinTargetCommunity) = 0</condition>
77 <sequence name="LocalAuditQuerySeq">
78 <assign name="AssignGetLocalHcid">
79 <copy>
80 <from>'gateway'</from>
81 <to>$GeLocalHcidPropIn.GetPropertyRequest/propacc:propertyFile</to>
82 </copy>
83 <copy>
84 <from>'localHomeCommunityId'</from>
85 <to>$GeLocalHcidPropIn.GetPropertyRequest/propacc:propertyName</to>
86 </copy>
87 </assign>
88 <invoke name="InvokeGetLocalHcid" partnerLink="PropertyAccessorPL" operation="GetProperty" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentpropaccessor" portType="tns:NhincComponentPropAccessorPortType" inputVariable="GeLocalHcidPropIn" outputVariable="GeLocalHcidPropOut"/>
89 <assign name="AssignAuditRepoEndpointLookup">
90 <copy>
91 <from>$GeLocalHcidPropOut.GetPropertyResponse/propacc:propertyValue</from>
92 <to>$GetAuditRepoEndpointIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:homeCommunity/nccommon:homeCommunityId</to>
93 </copy>
94 <copy>
95 <from>'auditrepository'</from>
96 <to>$GetAuditRepoEndpointIn.GetConnectionInfoEndpointByServiceNameRequest/conninfo:homeCommunityWithServiceName/conninfo:serviceName</to>
97 </copy>
98 </assign>
99 <invoke name="InvokeAuditRepoEndpointLookup" partnerLink="ConnectionManagerPL" operation="GetConnectionInfoEndpointByServiceName" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentconnectionmanager" portType="tns:NhincComponentConnectionManagerPortType" inputVariable="GetAuditRepoEndpointIn" outputVariable="GetAuditRepoEndpointOut"/>
100 <assign name="AssignLocalAuditQuery">
101 <copy>
102 <from>$FindAuditEventsIn.FindAuditEventsRequest/audit:FindAuditEvents</from>
103 <to>$LocalAuditQueryIn.QueryAuditEventsRequest/audit:FindAuditEvents</to>
104 </copy>
105 <copy>
106 <from>$FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:assertion</from>
107 <to>$LocalAuditQueryIn.QueryAuditEventsRequest/nccommonadapter:assertion</to>
108 </copy>
109 </assign>
110 <invoke name="InvokeLocalAuditQuery" partnerLink="AuditRepositoryPL" operation="QueryAuditEvents" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentauditrepository" portType="tns:AuditRepositoryManagerPortType" inputVariable="LocalAuditQueryIn" outputVariable="LocalAuditQueryOut"/>
111 <forEach name="ForEachRefCommunity" parallel="no" counterName="CommunityCtr">
112 <startCounterValue>1</startCounterValue>
113 <finalCounterValue>count($LocalAuditQueryOut.QueryAuditEventsResponse/nccommonadapter:communities)</finalCounterValue>
114 <scope name="SaveTargetCommunitiesScope">
115 <if name="IfNotLocalHcid">
116 <condition>$LocalAuditQueryOut.QueryAuditEventsResponse/nccommonadapter:communities[$CommunityCtr] != $GeLocalHcidPropOut.GetPropertyResponse/propacc:propertyValue</condition>
117 <assign name="AssignTargetCommunity">
118 <copy>
119 <from>$LocalAuditQueryOut.QueryAuditEventsResponse/nccommonadapter:communities[$CommunityCtr]</from>
120 <to>$FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:nhinTargetCommunities/nccommon:nhinTargetCommunity[$targetIdx]/nccommon:homeCommunity/nccommon:homeCommunityId</to>
121 </copy>
122 <copy>
123 <from>$targetIdx + 1</from>
124 <to variable="targetIdx"/>
125 </copy>
126 </assign>
127 </if>
128 </scope>
129 </forEach>
130 <assign name="AssignLocalAuditQueryResp">
131 <copy>
132 <from>$LocalAuditQueryOut.QueryAuditEventsResponse/nccommonadapter:findAuditEventResponse</from>
133 <to variable="FindAuditEventsOut" part="FindAuditEventsResponse"/>
134 </copy>
135 <copy>
136 <from>false()</from>
137 <to variable="first"/>
138 </copy>
139 </assign>
140 </sequence>
141 </if>
142 <forEach name="ForEachTargetCommunity" parallel="no" counterName="TargetCtr">
143 <startCounterValue>1</startCounterValue>
144 <finalCounterValue>count($FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:nhinTargetCommunities/nccommon:nhinTargetCommunity)</finalCounterValue>
145 <scope name="QueryEachTargetCommScope">
146 <variables>
147 <variable name="GetAggResultsAuditQueryOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:GetAggResultsAuditQueryResponseMessage"/>
148 <variable name="GetAggResultsAuditQueryIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" messageType="tns:GetAggResultsAuditQueryRequestMessage"/>
149 <variable name="ProxyFindAuditEventsOut" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxyauditlogquery" messageType="tns:findAuditEventsResponseMessage"/>
150 <variable name="ProxyFindAuditEventsIn" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxyauditlogquery" messageType="tns:findAuditEventsRequestMessage"/>
151 </variables>
152 <sequence name="QueryEachTargetCommSeq">
153 <assign name="AssignNhincProxy">
154 <copy>
155 <from>$FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:nhinTargetCommunities/nccommon:nhinTargetCommunity[$TargetCtr]/nccommon:homeCommunity</from>
156 <to>$ProxyFindAuditEventsIn.FindAuditEventsRequest/nccommonproxy:nhinTargetSystem/nccommon:homeCommunity</to>
157 </copy>
158 <copy>
159 <from>$FindAuditEventsIn.FindAuditEventsRequest/audit:FindAuditEvents</from>
160 <to>$ProxyFindAuditEventsIn.FindAuditEventsRequest/audit:FindAuditEvents</to>
161 </copy>
162 <copy>
163 <from>$FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:assertion</from>
164 <to>$ProxyFindAuditEventsIn.FindAuditEventsRequest/nccommonproxy:assertion</to>
165 </copy>
166 </assign>
167 <invoke name="InvokeNhincProxy" partnerLink="NhincProxyAuditQueryPL" operation="findAuditEvents" xmlns:tns="urn:gov:hhs:fha:nhinc:nhincproxyauditlogquery" portType="tns:NhincProxyAuditLogQueryPortType" inputVariable="ProxyFindAuditEventsIn" outputVariable="ProxyFindAuditEventsOut">
168 <sxt:trace>
169 <sxt:log level="info" location="onStart">
170 <from>concat('Invoking Audit Query for community: ', $FindAuditEventsIn.FindAuditEventsRequest/nccommonentity:nhinTargetCommunities/nccommon:nhinTargetCommunity[$TargetCtr]/nccommon:homeCommunity/nccommon:homeCommunityId)</from>
171 </sxt:log>
172 </sxt:trace>
173 </invoke>
174 <if name="IfPreviousResultsExist">
175 <condition>false() = $first</condition>
176 <assign name="AssignExistingAggregate">
177 <copy>
178 <from variable="FindAuditEventsOut" part="FindAuditEventsResponse"/>
179 <to>$GetAggResultsAuditQueryIn.GetAggResultsAuditQueryRequest/agg:aggregate</to>
180 </copy>
181 </assign>
182 </if>
183 <assign name="AssignNewAggregate">
184 <copy>
185 <from variable="ProxyFindAuditEventsOut" part="FindAuditEventsResponse"/>
186 <to>$GetAggResultsAuditQueryIn.GetAggResultsAuditQueryRequest/agg:new</to>
187 </copy>
188 <copy>
189 <from>false()</from>
190 <to variable="first"/>
191 </copy>
192 </assign>
193 <invoke name="InvokeTheAggregator" partnerLink="AggregatorPL" operation="GetAggResultsAuditQuery" xmlns:tns="urn:gov:hhs:fha:nhinc:nhinccomponentaggregator" portType="tns:NhincComponentAggregatorPortType" inputVariable="GetAggResultsAuditQueryIn" outputVariable="GetAggResultsAuditQueryOut"/>
194 <assign name="AssignAggregatorResults">
195 <copy>
196 <from variable="GetAggResultsAuditQueryOut" part="GetAggResultsAuditQueryResponse"/>
197 <to variable="FindAuditEventsOut" part="FindAuditEventsResponse"/>
198 </copy>
199 </assign>
200 </sequence>
201 </scope>
202 </forEach>
203 <reply name="ReplyEntityAuditLogQuery" partnerLink="EntityAuditLogQueryPL" operation="findAuditEvents" xmlns:tns="urn:gov:hhs:fha:nhinc:entityauditlogquery" portType="tns:EntityAuditLogQueryPortType" variable="FindAuditEventsOut"/>
204 </sequence>
205</process>
Note: See TracBrowser for help on using the repository browser.