CA Service Management

Expand all | Collapse all

Macro query

  • 1.  Macro query

    Posted Aug 18, 2016 12:55 AM

    Hi Team,

     

    Can we use status_prev or previous status in a macro condition? I'm trying to use the same, however it doesn't seem to work.



  • 2.  Re: Macro query

    Posted Aug 18, 2016 01:15 AM

    Hi John,

     

    I tried adding the Status_prev in the macro condition and it worked fine for me.

    I tried in SDM 14.1 .

    For your cross reference please find the attached screenshots for the same.



  • 3.  Re: Macro query

    Posted Aug 18, 2016 05:56 AM

    Below is the macro, which i have written.

     

     

    have mentioned this condition in the below event:

     

     

    On action true, below attach event is been set:

     

    on which below event is attached:

    Below condition is checked:

    And on true action

    We are cancelling some events.

     

    But the problem here is the Cancel Event, it is supposed to get attached on the ticket basis the condition and that doesn't seem to happen.



  • 4.  Re: Macro query

    Posted Aug 18, 2016 06:50 AM


  • 5.  Re: Macro query

    Posted Aug 18, 2016 12:29 PM

    There are three things that are most likely causing this:

    1. The Attach cancel event macro never fires
    2. The Cancel event is not able to be attached (the ticket is in a closed status, there is a condition preventing this, etc.)
    3. The Cancel event is being attached, but is not firing.

     

    You can verify this by looking at the Attached Event table (att_evt in SQL) and checking to see whether there is an entry for the obj_id of the ticket that the event is attached to as well as the event_tpl which should signify the event that was attached.  (Please note that you should not make any changes directly to the database - this should be used for confirmation only.)

     

    If you do not see an attached event corresponding to the ticket, you could try enabling additional logging on spelsrvr to see what each macro is doing (or failing to do).  Beyond that, I would open a ticket with CA Support to troubleshoot further.  I hope this helps!

     

    Regards,

     

    Marty



  • 6.  Re: Macro query

    Posted Aug 19, 2016 11:19 AM

    Please realize that the _prev attributes are "LOCAL" attributes and not contained in the database. That means the only time you have access to query them is during part of the Save action. An event attached to a ticket will not have access to the value of the _prev attributes.



  • 7.  Re: Macro query

    Posted Aug 22, 2016 02:31 AM

    thanks lindsay!



  • 8.  Re: Macro query

    Posted Aug 22, 2016 06:05 AM

    Is there any way to check the previous status and basis the right condition attach an event.



  • 9.  Re: Macro query

    Posted Aug 23, 2016 11:52 AM

    I think you would need to write some SPEL code, triggered by a change in Status.



  • 10.  Re: Macro query

    Posted Aug 24, 2016 02:52 AM

    Hi, from where do you attach your event? Service type , Others?

    I will suggest you do attach your first event it from the status update activity. At this time the previous_status will be available.

    If your second event is not attached that mean you condition is simply not meet.

    Also As Gidrus asking what is your exact requirements here so we can better help



  • 11.  Re: Macro query

    Posted Aug 23, 2016 05:09 PM

    Definetly you will need spel code for this. But first of all can you describe what functionality You are trying to achive?



  • 12.  Re: Macro query

    Posted Aug 30, 2016 03:33 AM

    Hi Johnny,

    Do you finally come across a solution to your problem?

    /J