Hi,
sure, you need to call cancel_me method.
Detailed example could be found here:
Talking about whole code, it could be:
mod file:
MODIFY cr status ON_POST_VAL z_cancel_hacr() 9337701 FILTER(status('HACR' -> ));
spl file:
int zcount, i, msg_i;
object zfound, zobj;
send_wait(0, top_object(), "call_attr", "atev", "sync_fetch", "STATIC", format("event_tmpl = 'evt:123456' AND status_flag IN (2, 12) AND obj_id = '%s'", persistent_id), -1, 0);
if (msg_error()) {
logf(ERROR, "%s > Unable to fetch atev", persistent_id);
for (msg_i = 0; msg_i < msg_length(); msg_i++) {
logf(ERROR, "msg[%d]: %s", msg_i, msg[msg_i]);
}
} else {
zcount = msg[1];
if (zcount > 0) {
zfound = msg[0];
for (i = 0; i < zcount; i++) {
send_wait(0, zfound, "dob_by_index", "DEFAULT", i, i);
if (msg_error()) {
logf(ERROR, "%s > Unable to get dob_by_index", persistent_id);
for (msg_i = 0; msg_i < msg_length(); msg_i++) {
logf(ERROR, "msg[%d]: %s", msg_i, msg[msg_i]);
}
} else {
zobj = msg[0];
atev::z_cnclme_by_persid(zobj.persistent_id);
}
}
}
}
Regards,
cdtj