You can add trigger on category change, then write the spel code that will look for approval task
e.g.
chg::check_app(...)
{
send_wait(0,top_object(),"call_attr","wf","sync_fetch","MLIST_STATIC", format("task = 'APP' AND chg = %s", id),-1,0);
if (msg_error()) {
logf(ERROR, "Error in get_list_values for slatpl '%s'", msg[0]);
return;
}
app_count = msg[1];
if (app_count > 0)
{
uuid who;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "update_object_super", who, persistent_id, 0, "status", "chgstat:400001");
if (msg_error()) {
logf(ERROR, "Error setting est_completion_date: '%s'", msg[0]);
return;
}
}
Few notes:
You may need to use POST_CI trigger to ensure workflow is allready there. In this case you will need to pass change id and persistent_id as parameter to your spel code
You will need change chgstat:400001