CA Service Management

 View Only
  • 1.  set cr values from alg spell

    Posted Sep 19, 2016 07:30 PM

    Hello community, i need help to update some values on children from the parent. Im using this spell (Propagate Status to Children - SDU). But aditionally need to set the same value of group and resolution code on all children, everytime i propagate the status from the parent.

     

    At the alg::zstat_to_child(...) function i set 2 additional variables:

     

    uuid v_group;

    int v_res_code;

     

    And i assign the following vaues from the parent:

    v_group = call_req_id.group;

    v_res_code = call_req_id.resolution_code;

     

    But i dont know how i can set those values to a children, i try with:

    ---------------------------------------------------------------------------------------------------------------------

    c_desc = c_desc + " (Propagado desde el Padre " + p_type + " " + p_num + ")" ;
    send_wait(0, top_object(), "get_co_group");
    group_leader = msg[0];
    send_wait(0, c_dob, "change_status", group_leader, login_userid, c_desc, p_stat, NULL);

     

    cr.group = v_group;

    cr.resolution_code = v_res_code;


    send_wait(0, group_leader, 'checkin');

    ---------------------------------------------------------------------------------------------------------------------

    But, doesn't work.

     

    Please your help.

     

    Best regards,

     

    Fabian

     



  • 2.  Re: set cr values from alg spell
    Best Answer

    Posted Sep 19, 2016 11:56 PM

    To additionaly set those two attributes with the same group_leader that was used for status change, you may try to use update_object method:

     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", who, c_dob.persistent_id, NULL, group_leader, 0"group" call_req_id.group, "resolution_code", call_req_id.resolution_code);    

    send_wait(0, group_leader, 'checkin');



  • 3.  Re: set cr values from alg spell

    Posted Sep 20, 2016 10:41 AM

    Thank you Gutis

    I only had to change the attributes. The "cr." it was not necessary.
    After that , it worked perfect. Thank you very much.


  • 4.  Re: set cr values from alg spell

    Posted Sep 20, 2016 11:32 AM

    Offcourse , my mistake update_object function allready executed in c_dob contex so there is no need for dot references.



  • 5.  Re: set cr values from alg spell

    Posted Sep 22, 2016 12:57 AM

    I have edited my answer and removed cr. in order to not confuse others