Hi All,
I am trying to join two tables
Table 1 : Contains few workflow columns
Table 2 : workflow table
after taking out desired columns (status ==13(Paused)) I need to stop these paused workflows through some external command.
below is the screenshot of my workflow.

after joining both the tables I am taking desired columns in javascript and trying to stop the workflow on the criteria, below is the javascript.

also writing the code below.
{
var strUnactionedWf = "";
var AlertEmail = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@counter"/>
<node expr="@internalName"/>
<node expr="@name"/>
<node expr="@state"/>
<node expr="@deliverySentDate"/>
</select>
</queryDef>
);
var strUnActionedWorkflow = AlertEmail.ExecuteQuery();
logInfo("Select output "+strUnActionedWorkflow);
for each (var wkf in strUnActionedWorkflow)
{
if (wkf.@state == '13' )
{xtk.workflow.PostEvent;}
}
instance.vars.strUnActionedWorkflow = strUnactionedWf;
logInfo(" outputPausedworkflow "+strUnactionedWf);
}