AnsweredAssumed Answered

ACT Macro

Question asked by jlhawley on Mar 23, 2018
Latest reply on Mar 27, 2018 by Paul_Coccimiglio

I am using this code found here: How to skip request workflow task automatically  when I do the pdm_load as "Inactive" and look at it, it appears to be exactly how I need it. However, when I select "Save" (either as Active or keeping it Inactive) only the set_return_data(TRUE); shows in the code, no errors. I thought maybe it was truncating it, but when I do a pdm_extract of the table, that is all it shows for that macro. I am certain I am missing something but would appreciate any assistance in identifying it, here is what it looks like in Service Desk after the pdm_load:

   FTBWF10APP Macro Detail - CA Service Desk Manager

string method; method="FTBWF10APP";
string theChg;
theChg = this.chg;
//
// Look up task 100 from the chg id.
//
send_wait(0, top_object(), "call_attr", "wf", "sync_fetch",
"RLIST_DYNAMIC", format("chg=%d and sequence=10 and status='APP'", theChg), -1, 0);
if (msg_error())
{
logf(ERROR, "%s: Error on sync_fetch for %s WFs: '%s'", method, theChg, msg[0]);
return;
}
object wf_list;
int wf_count;
wf_list = msg[0];
wf_count = msg[1];
logf(TRACE, "%s - %d recs found for chg %d", method, wf_count, theChg);
if (wf_count > 0)
{
// Have at least one task 10 with status APP (in reality of course there can only be one)
set_return_data(TRUE);
}
else
{
set_return_data(FALSE);
}

but after I save it:

set_return_data(TRUE);

Outcomes