CA Service Management

  • 1.  Macro task

    Posted Dec 14, 2016 03:17 AM

    Hi Community,

     

    I've SDM R14.1 CUM3, and I have a doubt. is it possible to create a workflow task macro that APP a task is chg.log_agent is member that wf.group task?

     

    Regards.



  • 2.  Re: Macro task

    Posted Dec 14, 2016 03:25 AM

    Hi Joaquin,

     

    Are you trying to create a condition macro that checks if the person updating the workflow task is the same person that logged\created the CO (chg.log_agent) and a member of the group assigned to the workflow task (wf.group)?

     

    Kind Regards,

    Brian



  • 3.  Re: Macro task

    Posted Dec 14, 2016 06:04 AM

    Hi Mathato, 

     

    No, I need to create a action macro that is executed in PEND status task, This macro check if chg.log_agent is member of task group assignee, and it's TRUE, the task is APP.

     

    Regards.



  • 4.  Re: Macro task
    Best Answer

    Posted Dec 14, 2016 05:37 AM

    Hi,

    code could be:

    int zcount, msg_i;
    send_wait(0, top_object(), "call_attr", "grpmem", "sync_fetch", "STATIC", format("group = U'%s' AND member = U'%s'", group.id, chg.log_agent.id),  -1, 0);
    if (msg_error()) {
         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 == 1) {
              send_wait(0, this, "call_attr", "status", "set_val", "APP", "SURE_SET");
              if (msg_error()) {
                   for (msg_i=0;msg_i<msg_length();msg_i++) {
                        logf(ERROR, "msg[%d]: %s", msg_i, msg[msg_i]);
                   }
              }
         }
    }

     

    Hope you know what to do with it

     

    Regards,

    cdtj



  • 5.  Re: Macro task

    Posted Dec 14, 2016 06:05 AM

    Hi cdtj, 

     

    I'll test it and I'll report the result.

     

    Regards.



  • 6.  Re: Macro task

    Posted Dec 14, 2016 06:46 AM

    Hi again, 

     

    I get a error in send_wait "msg[0]: AHD03025:Intento de modificar un valor non_CO"

     

    The send_wait correct is:

     

    send_wait( 0, top_object(), "call_attr", "api", "update_object_super", (uuid)"3C37FDDDC1839F45B73480B46B7AED8E", persistent_id, 0, "status", "tskstat:7106" );

     

    works ok.!!!!

     

    Thank you so much for your fast help.

     

    Regads.