Hi team!
I'm looking a way to extend objects that have possibility to perform condition check like events, notifications and status transitions have.
Directly I have chg workflows which are added on some conditions,
currently these conditions are predefined and very limited,
so I wish to extend that limitations via site-defined conditions.
I have found that macros are executed by method called execute.
Here is a place where I have stuck, no more ideas.
object new_obj;
send_wait(0, top_object(), "call_attr", "macro", "dob_by_persid", 0, "macro:403912");
new_obj = msg[0];
send_wait(0, new_obj, "execute", this);
int j;
if (msg_error()) {
for (j=0;j<msg_length();j++) {
logf(ERROR, "msg[%d]: '%s'", j, msg[j]);
}
}
Log:
Spell interp failed at macro.spl:357:macro::execute: Arg message [1]: bad index - size is 1
msg[0]: 'macro.spl:357:macro::execute'
msg[1]: 'Arg message [1]: bad index - size is 1'
Here is another method to execute macros : execute_macro_object(object);
But it returns error state and cannot be used for my purposes.
upd: got totally stuck and switched to workaround soltution:
1. created string attribute called z_condition;
2. used sync_fetch with where_clause from z_condition to get amount of matches if more than 1 means condition validated.
Regards
cdtj