Avatar

Level 2

@LaurentLam 

Thank you for all your responses.

After adding the additional data @internalName

I no longer have that error but I got this one this time, I think it's a code error *

Ofattah_0-1623931821636.png

Here's the code I used :

 

 

var wkf2restart = NLWS.xtkQueryDef.create(

<queryDef schema={vars.targetSchema} operation="select">

   <select>

      <node expr="@internalName"/>

   </select>

</queryDef>

);

 

var workflows = wkf2restart.ExecuteQuery()

 

for each(var workflow in workflows.getElement()) {

   logInfo("restarting :" + workflow.@internalName);

   xtk.workflow.restart(workflow.@internalName);

}