Hi All,
I would like to fetch the instance variable of workflow A in a JS activity in workflow B.
I have written the following code:
var workflowContent = xtk.queryDef.create(
<queryDef schema="xtk:workflow" operation="select">
<select>
<node expr="variables" alias="VariablesTab"/>
</select>
<where>
<condition expr = {"@internalName = 'WKF123'"} />
</where>
</queryDef>).ExecuteQuery();
logInfo("XML: "+workflowContent);
for each(var row in workflowContent)
{
var wkfVariablesTab = row.VariablesTab;
logInfo("Variables: "+wkfVariablesTab);
}
logInfo("XML: "+workflowContent); populates the following result:
XML: <workflow-collection> <workflow>
<VariablesTab running="false" running-type="boolean"/>
</workflow> </workflow-collection>
However, wkfVariablesTab variable is empty. How can I retrieve the instance variable running ="false" running-type="boolean" in the wkfVariablesTab variable?
Kind Regards,
Anushka RK