Clarity Service Management

Expand all | Collapse all

Set status resolved from action macro

Jump to Best Answer
  • 1.  Set status resolved from action macro

    Posted 07-26-2018 02:29 PM

    Hi guys, i need to set cr.status = resolved from a workflow task. i'm using this macro:

     

    //*****************************************************************

    send_wait(0, group_leader, "checkout", parent);
    if (msg_error()) {
    logf(ERROR,"Error: %s", msg[0]);
    } else {
    cr.status = "RE";
    send_wait(0, group_leader, "checkin");
    }

    //*****************************************************************

    //ERROR in stdlog

    07/26 12:50:33.47 ****** spelsrvr 2472 ERROR cr_wf.spl 1323 AHD05917:Es necesario un comentario del registro de actividades para configurar el estado en 'Resuelto'.

    //*****************************************************************

    The problem is in the request transition, need to be commented. (i can not change this)

    So, exist some way to change the status from the task using this macro, without unchecking "requiered comment"?

     

    Best regards,

    Fabian

     



  • 2.  Re: Set status resolved from action macro
    Best Answer

    Posted 07-27-2018 02:57 AM

    hi,

    try this one:

    uuid who;
    int msg_i;
    send_wait(0, top_object(), "call_attr", "cnt", "current_user_id");
    who = msg[0];
    send_wait(0, parent, "change_status", group_leader,
         who,
         "test description", // activity description
         "RE", // new status code
         NULL); // alg object, if you dont want to use default (ST)
    if (msg_error()) {
         logf(ERROR, "%s > failed to change status", parent);
         for (msg_i = 0; msg_i < msg_length(); msg_i++) {
              logf(ERROR, "\tmsg[%d]: %s", msg_i, msg[msg_i]);
         }
    } else {
         send_wait(0, group_leader, "checkin");
         if (msg_error()) {
              logf(ERROR, "%s > failed to checkin", parent);
              for (msg_i = 0; msg_i < msg_length(); msg_i++) {
                   logf(ERROR, "\tmsg[%d]: %s", msg_i, msg[msg_i]);
              }
              send_wait(0, group_leader, "uncheck");
         }
    }

    Also you can try to skip checkin call because action macro group_leader should be checked in after all processes automatically.

    Regards.



  • 3.  Re: Set status resolved from action macro

    Posted 07-30-2018 08:27 AM

    Bassoalto 

    Do you have any additional questions regarding this topic?

     

    If not, please mark one of the provided answers as Correct so that this thread can be closed.