CA Service Management

  • 1.  Spel to validate summary

    Posted Aug 27, 2018 10:52 AM

    hello Expert,

     

    I need your opinion on the below Spel,

     

    send_wait(0, top_object(), "call_attr", "chg", "sync_fetch", "RLIST_DYNAMIC", format("summary like '%xxyyzz%'", this.chg), -1, 0);

     

    And I am expecting true or false value on msg[1]. That means if the summary pattern matches the given criteria msg[1] will be 1 or else 0.

    Is it a write approach?

     

    Thanks

    ArunavaS



  • 2.  Re: Spel to validate summary

    Broadcom Employee
    Posted Aug 27, 2018 10:59 AM

    Arunava,

     

    Before we answer the above, can you describe what this code is meant to do?  And what specifically are you trying to achieve here with the spel code?  Are you testing for a specific string to appear in the summary field and have a reaction take place based on the presence/absence of the given string?



  • 3.  Re: Spel to validate summary

    Posted Aug 27, 2018 11:12 AM

    Exactly David-Ng . I want test a particular keyword presence on summary and based on want to do some operation. The above spel is just to validate the presence of a given string in summary filed.

     

    Thanks

    Arunava



  • 4.  Re: Spel to validate summary

    Posted Aug 28, 2018 03:02 AM

    The sync_fetch method will return a number of records, not True/False, so that's not the right approach to test. Note that a search by summary will be expensive - in terms of peformance - so I'd advise against it.

    It's much easier to use the OOB capabilities in SD and perform this test in an Event associated with the Initial activity type. You can design your condition with a Site Defined Condition macro and perform the necessary actions using an Action Macro.



  • 5.  Re: Spel to validate summary
    Best Answer

    Posted Aug 28, 2018 11:34 AM

    Hi!

    Using  CA SDM::.SPEL::. Sindex instead of sync_fetch could be a better way to validate string.

    my 2 cents.



  • 6.  Re: Spel to validate summary

    Posted Aug 28, 2018 12:40 PM

    Dear cdtj , The solution is amazing and I loved the simplicity. Thats perfect answer for my requirement. You rock again! Also learned something new!

     

    Thanks

    ArunavaS