CA Service Management

  • 1.  Change CI status on incident or change open

    Posted Feb 20, 2019 03:26 AM

    Hi all,

     

    how to create a macro to acomplish changing CI status on incident or change open.

     

    Best Regards,

    Domagoj



  • 2.  Re: Change CI status on incident or change open

    Posted Feb 20, 2019 11:44 AM

    Hi Domagoj.

    what kind of macro are you looking for?

    An action macro usuable in Events and task status behaviors?

    Or a pdm_macro, usable in the htmpl files?

    Regards

    ...........Michael



  • 3.  Re: Change CI status on incident or change open

    Posted Feb 21, 2019 03:23 AM

    Hi Michael,

     

    I was thinking about an action macro usuable in Events and task status behaviors.

     

    On initial incident or change order open, i need to change the status of CI.

     

    Regards,

    Domagoj



  • 4.  Re: Change CI status on incident or change open

    Broadcom Employee
    Posted Feb 21, 2019 09:54 AM

    Domagoj, maybe I miss something here...how come I can't recall a CI(configuration item) has a status attribute? Thanks _Chi



  • 5.  Re: Change CI status on incident or change open

    Posted Feb 21, 2019 10:16 AM

    Ressource Status  ?



  • 6.  Re: Change CI status on incident or change open

    Posted Feb 21, 2019 10:19 AM

    My question is more about the following:
    In incident we have a single affected resource.
    In change we have a list of affected ci's
    Shall all ci's of a change set to a specific status?
    Which one?



  • 7.  Re: Change CI status on incident or change open

    Posted Mar 19, 2019 04:40 AM

    Hi Michael,

     

    I want to change the status of CI attached to incident so I can view the change in the Visualizer.

     

    For ex. If I open an incident for Server1 CI then I want to change the status to Maintenance.

    If I add a CI to incident status od CI does not change.

    Same thing for Change Order.

     

    Is this possible?

    Kind Regards,

    Domagoj



  • 8.  Re: Change CI status on incident or change open

    Posted Mar 19, 2019 02:14 PM

    Hi Domagoj.

    Yes , technically this is possible.

    The question is, if it really fits to your business requirements.

    To me, just specifying a CI in an incident, doesn't mean that the CI has a problem !

    Same for Changes. Sure it might make sense to set a CI to status "maintenance" when the change gets implemented, but this is more related to the change implementation start and end date, than to the fact that the CI is attached to the Change. Additionally you need to think about a mechanism which resets the status of your CI's again

    As I understand, this is a complex discussion, and I have my doubts that the different scenarios can be handled with a simple macro.

    nevertheless here is a very simple macro which sets the status of the affected resource of an incident to "in Repair".

    TABLE Spell_Macro
            del description fragment id last_mod_by last_mod_dt lock_object msg_html
            msg_tmpl_info ob_type persid sym tenant type usr_integer1 usr_integer2
            usr_integer3 usr_string2 usr_string3 usr_string4
            { "0" ,"",
            "object nr_obj;\\0012if(!is_null(affected_resource)) {\\0012    send_wait(0, this,\"call_attr\",\"affected_resource\",\"get_dob\");\\0012    nr_obj= msg[0];\\0012\\0012    send_wait(0,group_leader,\"sure_checkout\",nr_obj,10,5);\\0012    if(!msg_error()) {\\0012        send_wait(0,nr_obj,\"call_attr\",\"status\", \"set_val\",2601); // 2601 is rss id of \"in Repair\" status\\0012        if(!msg_error()) {\\0012            logf(SIGNIFICANT,\"Status of affected resource set.\");\\0012        }\\0012        else {\\0012            logf(ERROR,\"error in setting Status of affected resource:%s\",msg[0]);\\0012        }\\0012\\0012    }\\0012    else {\\0012        logf(ERROR,\"Unable to change status of affected resource\");\\0012    }\\0012}\\0012else {\\0012    logf(SIGNIFICANT,\"No affected resource\");\\0012}\\0012\\0012",
            "400311" ,"F66961EF717A01F7A294000C2990289B" ,"03/19/2019 18:58:38" ,"1" ,"",
            "" ,"cr" ,"macro:400311" ,"set affected_resource status to \"in Repair\"",
            "" ,"ACT" ,"" ,"" ,"" ,"" ,"" ,"" }

    Its a pdm_load syntax, I suggest loading it with pdm_load -i -f  to create a new id for this record and not harm existing ones.

    It can be used as an action in an incident event. The macro would look a bit different, when you want to execute it in a task behavior context.

    As said, very simple and not matching to each and any situation, but maybe helpful as starting point.

    Use this on your own risk in your test/development environment.

     

    Best regards

    ............Michael