CA Service Management

  • 1.  Macro execution order (inside an event)

    Posted Jan 04, 2018 03:36 PM

    Hi everyone,

     

    I'm creating an event containing two macros which need to be executed at a specific moment. However, they need to be executed in order, because one of them is notifying a group and the another is transferring the incident to an different group. So, the notify macro needs to run first, or else, the same group in which the ticket will be transferred to will be notified. My question is: is it safe to assume that an event will execute all macros in that specific order? Or there is another way to do this?

     

    Here's a example of what I mean, to be more clear:

     

    Thanks in advance,

     

    Diogo



  • 2.  Re: Macro execution order (inside an event)

    Broadcom Employee
    Posted Jan 04, 2018 04:21 PM

    Diogo, the sure way to make the second macro runs after the first one is to add some delay time...this means you would need to put the second macro into a new event and then the activity notification have both events with the new event delay for certain time(like 5 mins). Thanks _Chi



  • 3.  Re: Macro execution order (inside an event)

    Posted Jan 04, 2018 05:45 PM

    I see... I thought I could do this in only one event, but this way should work too. What I'm afraid is, if the first event fails for some reason and get delayed, the second event might run first, and then the wrong group is notified... I know this has near zero chance to happen, but it's a possibility... I'll study a way to execute both codes within a single macro...

     

    Thanks!

     

    Diogo



  • 4.  Re: Macro execution order (inside an event)

    Posted Jan 05, 2018 03:00 AM

    Macros are executed alphabetically from my experience, so name them accordingally to set the order.



  • 5.  Re: Macro execution order (inside an event)

    Broadcom Employee
    Posted Jan 05, 2018 02:44 PM

    Given timings with macros firing in the same event, my concern is that even if you could reliably get one macro to consistently activate before the next macro, who is to say what other delays, from network latency to spelsrvr processing, may result in the second macro completing before the first?  

     

    The only true way I feel you could ensure the second macro fires after the first is to include that second event specifically for the second macro and introduce a delay time to fire.  If you want to go further than that, include a condition in the second event that will only be true if the first event/macro fired successfully (ie:  have it test if the first event/macro combination turned on a flag to indicate it had fired successfully).  



  • 6.  Re: Macro execution order (inside an event)

    Posted Jan 08, 2018 11:56 AM

    Hello Diego,

    You could create an Spel Macro Action when you could call the Notify Event and if there is not error you could tranfer the ticket or whatever you need.

     

    Regards,