Passing workflowId from xml

19 views
Skip to first unread message

Binita Shrestha

unread,
Mar 8, 2026, 6:37:07 PMMar 8
to xnat_discussion
Hi everyone, 
I am trying to save pipeline execution details (such as pipeline name, user, workflow ID, etc.) when a user runs a pipeline via the XNAT UI. The goal is to store these details so that I can later update the workflow status from my queue system.

I am facing problem with  passing worklfowId. To do this, I am attempting to pass the workflow ID from the pipeline XML to my CLI application. However, I have not been successful so far.

In my pipeline XML, I tried passing the workflow ID like this:

<argument id="workflowId">
    <value>^WORKFLOWID^</value>
</argument>

But when the CLI receives the argument, it gets the literal string ^WORKFLOWID^ instead of the actual workflow ID value.

I am currently using XNAT version 1.8.4.

Has anyone successfully passed the workflow ID (or other workflow metadata) from a pipeline XML to a CLI script in XNAT? If so, what is the correct way to reference the workflow ID in the pipeline XML?

Any guidance would be appreciated.

Thank you

Mohana Ramaratnam

unread,
Mar 10, 2026, 12:57:53 PMMar 10
to xnat_di...@googlegroups.com

--
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 view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/017bff32-94b8-4a55-bd85-89c1e5c3e10an%40googlegroups.com.

Binita Shrestha

unread,
Mar 16, 2026, 11:35:53 PMMar 16
to xnat_discussion
Thank you for the solution. However this doesnot work for me as all col value from csv are empty as shown below.

https://localhost/data/services/workflows/ SimpleEchoPipeline?columns=builddir&format=csv
Is there any other solution.

csv.png

Mohana Ramaratnam

unread,
Mar 16, 2026, 11:37:06 PMMar 16
to xnat_di...@googlegroups.com
If you remove everything after ? (Including?) what do you get


Regards,
Mohana Ramaratnam,

 moh...@xnatworks.io
 xnatworks.io | Find us on LinkedIn

Binita Shrestha

unread,
Mar 16, 2026, 11:40:45 PMMar 16
to xnat_di...@googlegroups.com
It says 

Unable to find workflow entry with pipeline_name 

Is this pipeline_name suppose to be the name of xml file that we are running? For eg: If we run SimpleEchoPipeline.xml then pipeline_name should be SimpleEchoPipeline??
--
Best Regards,
Binita Shrestha
Full Stack Engineer
Sydney Neuroimaging Analysis Centre
94 Mallet Street, Camperdown, NSW   2050 Australia

This email and any files transmitted with it are confidential and may be privileged information that is intended only for the individual or entity named in the email address. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. SNAC will NOT accept liability in connection with any computer virus, data corruption, delay or interruption and do not warrant that this email and its attachments are free from unauthorised amendment or other defect.



You received this message because you are subscribed to a topic in the Google Groups "xnat_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xnat_discussion/DwuWY4-N63Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CAHPNens90dmURuXg7J%2BYGx8pQA0oVbu9TgZ-6sbNiSpq7HYdtQ%40mail.gmail.com.

Binita Shrestha

unread,
Mar 17, 2026, 12:00:30 AMMar 17
to xnat_di...@googlegroups.com
From our xnat one of workflows is like this


  "data_fields": {
        "step_description": "Run pipeline",
        "current_step_id": "Run",
        "ExternalID": "TestProjectMerge",
        "type": "PROCESS",
        "pipeline_name": "/data/xnat/pipeline/catalog/test/SimpleEchoPipeline.xml",

This is retrieved from 
Here pipeline_name is stored as filepath, so I was wondering if this is the cause for not working the previous suggested api.

  "data_fields": {
        "step_description": "Run pipeline",
        "current_step_id": "Run",
        "ExternalID": "TestProjectMerge",
        "type": "PROCESS", 
        "pipeline_name": "/data/xnat/pipeline/catalog/snac/sami/sami-SeriesSelection.xml",  "data_fields": {
        "step_description": "Run pipeline",
        "current_step_id": "Run",
        "ExternalID": "TestProjectMerge",
        "type": "PROCESS",
        "pipeline_name": "/data/xnat/pipeline/catalog/snac/sami/sami-SeriesSelection.xml",  "data_fields": {
        "step_description": "Run pipeline",
        "current_step_id": "Run",
        "ExternalID": "TestProjectMerge",
        "type": "PROCESS",
        "pipeline_name": "/data/xnat/pipeline/catalog/snac/sami/sami-SeriesSelection.xml",
--
Best Regards,
Binita Shrestha
Full Stack Engineer
Sydney Neuroimaging Analysis Centre
94 Mallet Street, Camperdown, NSW   2050 Australia

This email and any files transmitted with it are confidential and may be privileged information that is intended only for the individual or entity named in the email address. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. SNAC will NOT accept liability in connection with any computer virus, data corruption, delay or interruption and do not warrant that this email and its attachments are free from unauthorised amendment or other defect.


Mohana Ramaratnam

unread,
Mar 17, 2026, 8:44:55 AMMar 17
to xnat_di...@googlegroups.com
Hi Binita,

The use of SimpleEchoPipeline as the value of pipeline_name is correct as the code is looking for pipeline_name like %SimpleEchoPipeline%. 

Looking back at what you are trying to achieve, if all you are trying to do is that each time a user launches the pipeline, you want to track from a separate tool. 

Choice 1:

Customize PIPELINE_HOME/bin/schedule script to log all parameters which are passed each time a user launches the pipeline. (More details under What we have done before). The exact call without any modifications to the schedule script would be logged in XNAT_HOME/logs/pipeline.log. From the content in pipeline.log, you could "overload" the schedule script to extract the values you want and send to the other tool

Choice 2 (which seems to be buggy for now): 

Use the /data/services/workflows/SimpleEchoPipeline?columns=builddir

This will return the latest execution of SimpleEchoPipeline independent of user. (I have logged a bug XNAT-8662 for the issue you have reported)

Regards,
Mohana Ramaratnam,

 moh...@xnatworks.io
 xnatworks.io | Find us on LinkedIn

Reply all
Reply to author
Forward
0 new messages