You need to create condition or action macro depending on your need. To get property values you can use spel code similar to this:
object prp_list, prp;
uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "get_properties", chg.persistent_id);
if (msg_error()) {
logf(ERROR, "get_failed %s",msg[0]);
}
else
{
int count,i;
count = msg[1];
prp_list = msg[0];
for(i=0;i<count;i++) {
send_wait(0, prp_list, "dob_by_index", "DEFAULT", i, i);
prp = msg[0];
logf(SIGNIFICANT,"Property %s value is %s",i,prp.value);
}
}