http://docs.xnat.org/REST+API+-projects-%28ID%29-subjects-%28ID-label%29-experiments-%28ID-label%29
HOST/REST/projects/{X}/subjects/{X}/experiments/{X}?triggerPipelines=true
Or I think HOST/REST/experiments/{ID}?triggerPipelines=true would work as well.
What URLs are you using to upload the session data? There may be other helpful commands depending on how you are uploading the data. Are you uploading one file at a time, or in zip(s)? This is DICOM right?
Tim
REST/projects/GBM_CURATED/subjects/xnat_vault_S00128/experiments/xnat_vault_E00204?triggerPipelines=true
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.
And, yes, doing a PUT to /REST/projects/P/subjects/S/experiments/E?triggerPipelines=true should still be supported.
Tim
For more options, visit https://groups.google.com/d/optout.
You can remotely trigger the generation of the snapshots using the following…
HOST/REST/projects/{X}/subjects/{X}/experiments/{X}?triggerPipelines=trueOr I think HOST/REST/experiments/{ID}?triggerPipelines=true would work as well.
Thanks, that is helpful. I have a few questions.
1. You say that you get back a 200 status from your XNAT when you launch the pipeline (which indicates to me that, from XNAT’s perspective, it launched the pipeline just fine). If you look at that experiment’s page in your browser, does it show an alert at the top about the pipeline? You may see nothing, or you may see an alert that stays in “Queued” status, or it may show “Failed” status; all of these would indicate different potential problems.
2. In the old thread, there is a quote from Tim saying you can do a PUT to the experiment itself with a query parameter telling it to trigger the automatic pipelines (which is essentially just snapshot generation):You can remotely trigger the generation of the snapshots using the following…HOST/REST/projects/{X}/subjects/{X}/experiments/{X}?triggerPipelines=true
Or I think HOST/REST/experiments/{ID}?triggerPipelines=true would work as well.
Have you tried that? I don’t know if that would run into the same error or not. Maybe.
3. Is there anything logged into application.log at the time you launched the pipeline? (The pipeline launch would be logged only for fairly recent versions of XNAT, so depending on your version there may be nothing there.)
4. After you added the pipeline to the XNAT (In Administer > Pipelines) did you add it to your project’s list of pipelines? On the project page there will be a tab for Pipelines; you should add this pipeline to your project there. I don’t think there will be any configuration you would have to do for his pipeline (since it was designed to run without any user input) so you can just click through everything.
1. I think the PipelineScreen_details.vm errors are unrelated.
In my investigation, the only piece of code that attempts to load that non-existent template is some javascript on the project page that renders the pipeline details. As far as I can tell, that code path is not touched when a pipeline is launched. However, I could be wrong, and they could actually be connected. So if you do any more testing and the timestamps of your pipeline launch attempts continue to match those in the turbine.log errors, I’ll have to take another look. But right now I am ignoring the turbine errors.
2. I don’t know what is happening that makes the POST to launch the WebBasedQCImageCreator pipeline fail silently. Can you watch the XNAT logs at the time you try to launch the pipeline to see if anything is logged there about any errors? Because I am really very confused. Even the minimal information from your access.log could help, in that I could see where the POST to launch the pipeline happened, and maybe I could see whether or not anything else happened after that.
3. On a possibly-unrelated-but-possibly-very-related note, I want to investigate the failure of the AutoRun pipeline to launch. Was that launch logged into your application.log?
If it was, then we can use that launch string to do further investigations. If it was not, then the next item could provide the same information.
4. I need you to go poke around your ${pipeline_home}/logs directory. Every time the pipeline engine starts, even if it dies immediately after, it will create a log here. When you look, you will have to correlate the timestamps in the file names to when you launched your various pipeline experiments. You should find an entry for the failed-to-launch AutoRun, and that will be useful, but you may also find logs for other pipelines that are of interest. I’m not sure exactly what will be in there because I don’t know if the various job submissions you tried got to this point or not.
...
Route 1I have a hypothesis. When you added the WebBasedQCImageCreator to your project, did you check the “Run on archive” checkbox? If so, then the name you have to use to launch the pipeline will be different. Try a POST to /projects/{}/pipelines/AUTO_ARCHIVE_WebBasedQCImageCreator/experiments/{}.
Verification: You can check what name XNAT is looking for by looking at the archive spec for your project. Do a GET to (or just open this in your browser) /projects/{}/archive_spec. You’ll see some XML; the root element is arc:project. Follow the tree down to arc:project/arc:pipelines/arc:descendants/arc:descendant[@xsi:type=whatever]/arc:pipeline. I say “xsi:type=whatever” because there may be multiple lists of pipelines for various types, but we don’t care about which is which right now.
The thing you’re looking for is the “stepId” attribute of the WebBasedQCImageCreator pipeline. If my hypothesis is correct, it will be AUTO_ARCHIVE_WebBasedQCImageCreator. Whatever it is, that is what you should use when you’re doing the POST to launch it. Or, you could edit the settings on the project to uncheck the auto-archive checkbox, and it should just be the name.
...
...
POST /data/projects/{}/pipelines/WebBasedQCImageCreator/experiments/{}
PUT /data/experiments/{ID}?triggerPipelines=true
PUT /data/projects/{}/experiments/{label}?triggerPipelines=true
PUT /data/experiments/{ID}?triggerPipelines=true
PUT /data/projects/{}/experiments/{label}?triggerPipelines=true
PUT /data/projects/{}/subjects/{}/experiments/{label}?triggerPipelines=true
Couldnt launch {}/data/xnat/pipeline/bin/XnatPipelineLauncher -pipeline xnat_tools/AutoRun.xml -id {} -host {} -u {} -pwd {} -dataType xnat:usSessionData -label {} -supressNotification -project "{}" -notify {} -notify {} -parameter xnat_project='{}' -parameter userfullname='{}' -parameter supressEmail='false' -parameter useremail='{}' -parameter session='{}' -parameter xnatserver='{}' -parameter mailhost='{}' -parameter sessionType='xnat:usSessionData' -parameter adminemail='{}' -parameter sessionLabel='{}' -workFlowPrimaryKey {}
...
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
I tried to poke around for why this might be happening. Sadly, I have not yet found anything useful.But I did find something of historical interest: an article that looks to me like it almost certainly provided the template for the org.nrg.pipeline.ProcessLauncher class http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html (especially page 2). Names of the fields are mostly identical, the comments are largely intact, and the StreamGobbler class is spot on 💯.
FlavinOn Mar 9, 2016, at 11:42 AM, Tom Doel <tom...@gmail.com> wrote:Hi Rick,The pipeline runs successfully withsudo su - tomcat -s /bin/sh -c "[..]/pipeline/bin/schedule ..."which I believe is similar to how XNAT runs the pipeline.
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine