Script Actions :
- Events can be fired from most of the server side script elements for processing later. i.e Async processing.
- Script actions can be defined with the processing logic to process those events.
- Events are processed when the processing capability available.
- Events are processed as user system.
- Events may be processed in parallel if there is enough processing capacity. i.e Schedule workers and semaphores.
- Events are defined on a table and script actions are defined on events.
Events can be triggered using,
gs.eventQueue('procssed.load.event',gr, parmValue1,parmValue2);
Objects available in a script action:
current : represents GlideRecord object of the record on which event is triggered
event : represents event parameter object. two additional parameters can be processed to an event when it is being triggered and those parameters are accessed using event.parm1, event.parm2 in the script actions.
Quick points:
- Event and script actions can be used to develop event driven async integrations.
- Event and script actions can be used to defer the bulk crud operations processing to later point in time.
- Avoid writing lengthy script action scripts, call script includes instead.
No comments:
Post a Comment