Accessing id of submitted workflow or list of all workflows

21 views
Skip to first unread message

tom.g...@gmail.com

unread,
Nov 16, 2021, 4:01:26 AM11/16/21
to xnat_discussion
Apologies for the double post, but I thought this was probably better in its own thread

How I should retrieve the workflow-id of the workflow I have just submitted?

The workflow-id in launch request result comes back as "To be assigned", how does the UI get the

{ "status": "success", "params": { "SESSION": "/archive/experiments/ArcanaDebug01_E00015", "in_file1": "scan1:text", "in_file2": "scan2:text", "duplicates": "2" }, "command-id": 0, "wrapper-id": 6, "workflow-id": "To be assigned" }

I'm also not sure which POST parameters need to be provided to the /xapi/workflows to get he list of all launched workflows, is there an easy way to do this?

Moore, Charlie

unread,
Nov 16, 2021, 2:34:17 PM11/16/21
to xnat_di...@googlegroups.com
Hi Tom,

The workflow gets displayed in the UI from that JSON you posted. Seeing "To be assigned" as the workflow ID occurs when either:
  1. You're doing a bulk launch.
  2. CS gets confused.
In your launch URL, try replacing "xnat:mrSessionData" with just "session". I'm not super familiar with the newer format of launch API, but that does seem to be what the UI is doing when launching the container at the session level.

Thanks,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of tom.g...@gmail.com <tom.g...@gmail.com>
Sent: Tuesday, November 16, 2021 3:01 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Accessing id of submitted workflow or list of all workflows
 

* External Email - Caution *

--
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 on the web visit https://groups.google.com/d/msgid/xnat_discussion/a03cde19-61af-48ff-87f2-ba79ea08d125n%40googlegroups.com.

 


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.

tom.g...@gmail.com

unread,
Nov 16, 2021, 4:59:59 PM11/16/21
to xnat_discussion
Hi Charlie,

Thanks for the tip but I get the same result with

result = xlogin.post(
f"/xapi/projects/{dataset.name}/wrappers/{cmd_id}/root/session/launch",
json={'SESSION': f'/archive/experiments/{test_xsession.id}',
'in_file1': 'scan1:text',
'in_file2': 'scan2:text',
'duplicates': '2'})

Given that it isn't a bulk launch and the container runs successfully after launch are you sure the CS is confused?

Cheers,

Tom

Moore, Charlie

unread,
Nov 16, 2021, 5:23:32 PM11/16/21
to xnat_di...@googlegroups.com
Hi Tom,

I took a closer look at it. I had thought "session" was a reference to the type of object you're launching on, but after tinkering a bit, I think it's really the name of the external-input. From your command in another thread, that was "SESSION", right? I would give that a try. Also, I wouldn't say I'm sure but I asked internally before my last post, and the answer I got was "Bulk launch will always be TBA (bc launching happens in the background), however, single launch may be as well if CS can’t determine the object on which to create the workflow immediately", so I must admit I paraphrased it a bit. I would say that would count as being "confused" if it needs extra time to resolve the object correctly (even if it does work eventually) 🙂. Let me know if that works for you.

Thanks,
Charlie

Sent: Tuesday, November 16, 2021 3:59 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: Re: [XNAT Discussion] Accessing id of submitted workflow or list of all workflows
 

tom.g...@gmail.com

unread,
Nov 16, 2021, 9:09:11 PM11/16/21
to xnat_discussion
Thanks Charlie, changing the rootElement to SESSION did the trick, i.e.

result = xlogin.post(
f"/xapi/projects/{dataset.name}/wrappers/{cmd_id}/root/SESSION/launch",
json={'SESSION': f'/archive/experiments/{test_xsession.id}',
'in_file1': 'scan1:text',
'in_file2': 'scan2:text',
'duplicates': '2'})
Reply all
Reply to author
Forward
0 new messages