CA Service Management

  • 1.  WebScreen Painter + Spell + Object Filter Event options

    Posted Jan 21, 2016 05:21 PM

    Hi, anyone knows what options are available  for filtering when defined a object trigger from CA Service Desk Manager Web Screen Painter?

     

     

    What is the difference between "UPDATE", "INSERT", "INSERT, UPDATE"? What other events exists? Where could i find this documentation?

    What are the differences beteen PRE_VALIDATE, POST_VALIDATE, POST_CI and when to use each of them?

     

    Thanks for your help.

     

    Regards,

    JOHN



  • 2.  Re: WebScreen Painter + Spell + Object Filter Event options
    Best Answer

    Posted Jan 21, 2016 07:12 PM

    Hi,

    What is the difference between "UPDATE", "INSERT", "INSERT, UPDATE"? What other events exists?

     

    INSERT event will filter all events except object creation, so basicaly trigger will fire only when new object created

    UPDATE event will filter all events except object update, so it will fire when object updated

    DELETE event will filter all events except object deletion, so it will fire when object deleted

    Than you can have differn combinations of them like

    INSERT UPDATE

    INSERT UPDATE DELETE and etc

    Some examples:

     

    POST_VALIDATE update_demand_record() 23331 FILTER( EVENT("UPDATE") );

    this will fire update_demand_record method each time request is updated

    POST_VALIDATE update_demand_record() 23331 FILTER( EVENT("UPDATE") && description{});

    this will fire update_demand_record method each time request description is updated excluding creation event

    POST_VALIDATE update_demand_record() 23331 FILTER(description{});

    this will fire update_demand_record method each time request description is updated

    POST_VALIDATE update_demand_record() 23331 FILTER(description{} || status{->'WIP'});

    this will fire update_demand_record method each time request description is updated or status changed to work in progress

     

     

    Where could i find this documentation?

    There is no official documents

     

    What are the differences beteen PRE_VALIDATE, POST_VALIDATE, POST_CI and when to use each of them?

    My understanding is that differences between them are the firetime, while i am not sure what is the difference of PRE_VALIDATE, POST_VALIDATE, but POS_CI is definetly used when transaction is checked in, and if you will use this trigger you will not have direct access to context object attributes. There is also DB_INIT trigger that, as i remember, can be used to prepopulate attributes. It seems sd14 introduced new set of triggers ON_PRE_VAL and ON_POST_VAL more info can be found here: How to terminate action via spel macro without displaying error? 

    CA also have attribute triggers like ATTR_INIT but i never used them.



  • 3.  Re: WebScreen Painter + Spell + Object Filter Event options

    Posted Jan 25, 2016 03:31 PM

    POST_VALIDATE update_demand_record() 23331 FILTER( EVENT("UPDATE") );

    What this number means? I always put a different number in each trigger/code, afraid of some kind of conflict.

     

    Also, these triggers can be placed both in WSP (site-defined triggers) and in spel folder (as a .mod file). What's the difference between them? Are there any advantages?



  • 4.  Re: WebScreen Painter + Spell + Object Filter Event options

    Posted Jan 25, 2016 03:42 PM

    If you will do it via webscreen painter all triggers will be writen to the file wsp.mods, personaly i prefer to use mod files, this way i can define meaningful names for files that holds my custom functionalities. 

    Numbers as i understand is fire sequences for triggers trigger with 123 will be fired before 124. If you will define two triggers with the same sequence you will get warning message in log, but they still will work.



  • 5.  Re: WebScreen Painter + Spell + Object Filter Event options

    Posted Jan 25, 2016 03:49 PM

    Nice! Thanks for the info!