Thank you Sigitas. I do get some error messages and the event status goes to unknown without (successfully) executing the action though. Do these errors mean anything to you?
02/25 09:55:55.79 ivd-sdm-web1 spelsrvr 7696 ERROR pcexec.c 6503 Spell interp failed at bopevt.spl:1243:atev::compute_next_time | bopevt.spl:1021:atev.wait_time::post_val10: AHD04324:Error on line 1 column 1 of definition. AHD04321:Invalid date specification. Error line:0
02/25 09:56:05.04 ivd-sdm-web1 spelsrvr 7696 ERROR interp.c 583 __eval__ Code error at line 7 at "" (syntax error)
02/25 09:56:05.04 ivd-sdm-web1 spelsrvr 7696 ERROR macro.spl 538 __eval__ Code error at line 7 at "" (syntax error)
02/25 09:56:05.04 ivd-sdm-web1 animator_nxd 11672 ERROR animator_nxd.c 2723 Method 2 failed for event *Start RFC Workflow in animator ANI:403055 (chg:438635) for atev:606358
My SPEL script is listed below if you venture the issue might be there. The event finishes and does seem to work just fine if I use another action macro to set workflow task violation for example.
__________________________
chg::z_myscript4(...){
duration timeout;
timeout = 5;
object group_leader;
send_wait(0, top_object(), "get_co_group");
if (msg_error()) {
printf("Error'%s'", msg[0]);
return;
}
else{
group_leader = msg[0];
send_wait(0, top_object(), "call_attr", "evt", "new_attached_event", group_leader, "chg:438635","*Start RFC Workflow", timeout ,now(), "SLA", 0, 0,"GMT-0800");
if (msg_error()) {
printf("Error %s",msg[0]);
}
}
send_wait(0, group_leader, "checkin");
if (msg_error()) {
printf("Error'%s'", msg[0]);
}
}
Original Message:
Sent: 02-25-2020 04:49 AM
From: Sigitas Grincevicius
Subject: Attached Event Issue
Hello,
Here is some action code, that sets task status:
uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
send_wait(0, top_object(), "call_attr", "api", "update_object_super", who, persistent_id, 0, "status", "APP");
if (msg_error()) {
logf(ERROR,"update_object_super error: %s",msg[0]);
}
Original Message:
Sent: 02-24-2020 05:56 PM
From: DEREK Johnson
Subject: Attached Event Issue
We have a requirement that a classic workflow begins once the Status has changed from 'RFC' and not when the ticket is created, which is the default behavior. I've setup the first task in the workflow, sequence #2 to be a dummy 'Approval' task.
I've managed to get the Event to attach via SPEL and get an out of the box action to execute. However I really need some help on what the action macro should look like to change the workflow status from "Pending" to "Approved". There is a thread in here that seems to discuss it but the screenshot links that I believe have the code are broken.
I played around with manipulating the upd_val mention from a cr_wf to wf reference but no luck.
Running version 17.2
------------------------------
Derek
------------------------------