-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transfer.xml
209 lines (208 loc) · 8.35 KB
/
Transfer.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="UTF-8"?>
<Pipeline xmlns="http://nrg.wustl.edu/pipeline" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:autorun="http://www.xnat.org/java/org.nrg.pipeline.client.webservices.WebserviceClient" xsi:schemaLocation="http://nrg.wustl.edu/pipeline
..\..\schema\pipeline.xsd" >
<name>Transfer</name>
<location>/home/xnat/xnat/pipeline_1_4/catalog/xnat_tools</location>
<description>Tranfer Pipeline for XNAT </description>
<outputFileNamePrefix>^concat(/Pipeline/parameters/parameter[name='logDir']/values/unique/text(),'/',/Pipeline/parameters/parameter[name='xnat_project']/values/unique/text(),'/',/Pipeline/parameters/parameter[name='sessionLabel']/values/unique/text(),'/',/Pipeline/name/text())^</outputFileNamePrefix>
<parameters>
<!--
<parameter>
<name>destinationDir</name>
<values>
<unique>/data/dest</unique>
</values>
<description>The path to the destination directory</description>
</parameter>
<parameter>
<name>sourceDir</name>
<values>
<unique>/data/XNAT_CACHE/Prearc/20070313_133824/head_Black_1</unique>
</values>
<description>The path to the source directory to transfer from</description>
</parameter>
<parameter>
<name>cachepath</name>
<values>
<unique>/data/destcache/20070313_133824</unique>
</values>
<description>Path to Cache folder into</description>
</parameter>
<parameter>
<name>useremail</name>
<values>
<unique>[email protected]</unique>
</values>
<description>User email to notify to</description>
</parameter>
<parameter>
<name>userfullname</name>
<values>
<unique>Mohana Ramaratnam</unique>
</values>
<description>User email to notify to</description>
</parameter>
<parameter>
<name>mailhost</name>
<values>
<unique>nrglin1.wustl.edu</unique>
</values>
<description>Mail host</description>
</parameter>
<parameter>
<name>aliasHost</name>
<values>
<unique>http://localhost:8080</unique>
</values>
<description>Mail host</description>
</parameter>
<parameter>
<name>xnatserver</name>
<values>
<unique>CNDA</unique>
</values>
<description>User email to notify to</description>
</parameter>
<parameter>
<name>sessionType</name>
<values>
<unique>xnat:mrSessionData</unique>
</values>
<description>Search Element to be used for the link sent out in Step 5</description>
</parameter>
<parameter>
<name>session</name>
<values>
<unique>VB19094</unique>
</values>
<description>XNAT MR Session Id</description>
</parameter>
<parameter>
<name>sessionLabel</name>
<values>
<unique>label</unique>
</values>
<description>Project MR Session Id</description>
</parameter>
<parameter>
<name>adminemail</name>
<values>
<unique>[email protected]</unique>
</values>
<description>MR Session Id</description>
</parameter>
-->
<!-- <parameter>
<name>host</name>
<values>
<unique>http://cninds03.neuroimage.wustl.edu:8070/cnda_xnat</unique>
</values>
<description>XNAT Host</description>
</parameter>
<parameter>
<name>user</name>
<values>
<unique>mohanar</unique>
</values>
<description>XNAT User Id</description>
</parameter>
<parameter>
<name>pwd</name>
<values>
<unique>PWD</unique>
</values>
<description>XNAT Password</description>
</parameter>
-->
</parameters>
<steps>
<step id="1" description="Copy files from prearc to archive">
<resource name="AntCopy" location="ant-tools">
<argument id="source">
<value>^/Pipeline/parameters/parameter[name='sourceDir']/values/unique/text()^</value>
</argument>
<argument id="destination">
<value>^/Pipeline/parameters/parameter[name='destinationDir']/values/unique/text()^</value>
</argument>
<argument id="overwrite"/>
</resource>
</step>
<step id="2" description="Create Quality Control Images" continueOnFailure="true">
<resource name="WebBasedQCImageCreator" location="images/resources">
<argument id="session">
<value>^/Pipeline/parameters/parameter[name='sessionLabel']/values/unique/text()^</value>
</argument>
<argument id="xnatId">
<value>^/Pipeline/parameters/parameter[name='session']/values/unique/text()^</value>
</argument>
<argument id="project">
<value>^/Pipeline/parameters/parameter[name='xnat_project']/values/unique/text()^</value>
</argument>
<argument id="host">
<value>^if (count(/Pipeline/parameters/parameter[name='aliasHost']/values) > 0) then /Pipeline/parameters/parameter[name='aliasHost']/values/unique/text() else /Pipeline/parameters/parameter[name='host']/values/unique/text()^</value>
</argument>
<argument id="user">
<value>^/Pipeline/parameters/parameter[name='user']/values/unique/text()^</value>
</argument>
<argument id="pwd">
<value>^/Pipeline/parameters/parameter[name='pwd']/values/unique/text()^</value>
</argument>
<argument id="raw"/>
</resource>
</step>
<!-- <step id="3" description="GZip files in the archive">
<resource name="AntGZip" location="ant-tools">
<argument id="source">
<value>^/Pipeline/parameters/parameter[name='destinationDir']/values/unique/text()^</value>
</argument>
<argument id="delete"/>
</resource>
</step> -->
<step id="4" description="Move folder to the Cache" precondition="^count(/Pipeline/parameters/parameter[name='cachepath']/values/unique/text())=1^" continueOnFailure="true">
<resource name="AntMove" location="ant-tools">
<argument id="source">
<value>^/Pipeline/parameters/parameter[name='sourceDir']/values/unique/text()^</value>
</argument>
<argument id="destination">
<value>^/Pipeline/parameters/parameter[name='cachepath']/values/unique/text()^</value>
</argument>
</resource>
</step>
<step id="4a" description="Move Session XML" precondition="^count(/Pipeline/parameters/parameter[name='cachepath']/values/unique/text())=1^" continueOnFailure="true">
<resource name="AntMove" location="ant-tools">
<argument id="source">
<value>^concat(/Pipeline/parameters/parameter[name='sourceDir']/values/unique/text(),'.xml')^</value>
</argument>
<argument id="destination">
<value>^/Pipeline/parameters/parameter[name='cachepath']/values/unique/text()^</value>
</argument>
</resource>
</step>
<step id="5" description="Notify">
<resource name="Notifier" location="notifications">
<argument id="to">
<value>^/Pipeline/parameters/parameter[name='useremail']/values/unique/text()^</value>
</argument>
<argument id="cc">
<value>^/Pipeline/parameters/parameter[name='adminemail']/values/unique/text()^</value>
</argument>
<argument id="from">
<value>^/Pipeline/parameters/parameter[name='adminemail']/values/unique/text()^</value>
</argument>
<argument id="subject">
<value>^concat(/Pipeline/parameters/parameter[name='xnatserver']/values/unique/text(), ' update: ', /Pipeline/parameters/parameter[name='sessionLabel']/values/unique/text(),' Archiving complete')^</value>
</argument>
<argument id="host">
<value>^/Pipeline/parameters/parameter[name='mailhost']/values/unique/text()^</value>
</argument>
<argument id="body">
<value>^concat('Dear ',/Pipeline/parameters/parameter[name='userfullname']/values/unique/text(),',<br> <p>', /Pipeline/parameters/parameter[name='sessionLabel']/values/unique/text(),' has been archived without errors.</p><br> <p> Details for this session are available at <a href="',/Pipeline/parameters/parameter[name='host']/values/unique/text(),'/app/action/DisplayItemAction/search_element/',/Pipeline/parameters/parameter[name='sessionType']/values/unique/text(),'/search_field/',/Pipeline/parameters/parameter[name='sessionType']/values/unique/text(),'.ID/search_value/',/Pipeline/parameters/parameter[name='session']/values/unique/text(),'">', 'the ', /Pipeline/parameters/parameter[name='xnatserver']/values/unique/text(),' website.</a> </p><br>', /Pipeline/parameters/parameter[name='xnatserver']/values/unique/text(),' Team.')^
</value>
</argument>
<argument id="notifyAdmin">
<value>^/Pipeline/parameters/parameter[name='notifyAdmin']/values/unique/text()^</value>
</argument>
</resource>
</step>
</steps>
</Pipeline>