How to fetch the script (code) for all the JS activities within one workflow?
Hi All,
I have 2 JS activities in one workflow (Workflow A). I am trying to fetch the script within both the JS activities in another workflow (Workflow B) using [activities/js/script] field from xtk:workflow data schema using the below code.
var res = xtk.queryDef.create(
<queryDef schema="xtk:workflow" operation="select">
<select>
<node expr="[activities/js/script]"/>
</select>
<where>
<condition expr = {"@internalName = 'WKF123'"} />
</where>
</queryDef>).ExecuteQuery();
However, I see that the script field stores the code for only one JS activity. Is it possible to fetch the code within all the JS activities in one workflow?
There is another issue that I'm observing. When viewed in the Data tab of the xtk:workflow table, the [activities/js/script] field displays the code for JS activity 1. Whereas, when I fetch the same field within another workflow, I see the code for JS activity 2. Can someone please help me understand this behavior?
Thank you in advance.
Kind Regards,
Anushka RK