SPELL CODE to Make ACT / EVT INTERNAL

From SDU
Revision as of 06:26, 22 January 2010 by Rollas (Talk | contribs) (SPELL Code to -> To make the activites of type EVT e.g. SLA Expired as INTERNAL and wheneever if new activites are added for the same CR, if its SLA was violated then that activity is INTERNAL)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

->The vrequirement is that, whenever an event / activity is performed e.g. SLA VIOLATION then that activity should be loged as internal so that EMPLOYEES would not be able to view it. -> If new activites are added e.g. UPDATE FIELD to ticket (CR) whos' SLA is already violated then log that activity as internal.............Italic text

To achive the above req. I have writen two mod and spell files.

1) To make the activites of type EVT which sets as SLA VIOLATION

MOD File:-

MODIFY alg POST_VALIDATE zevt_set() 125 FILTER( EVENT("INSERT")) ;

SPELL File:-

//method zevt_set() //Sets the EVENT of SDMr12.1 as internal =>1 //author: adi : adi_g001@yahoo.com //********************************************************

alg::zevt_set( ... ) {

      logf(SIGNIFICANT, "SPELL zevt_set %s",type.code);

if(type.code == "EVT") { send_wait(0, this, "call_attr", "internal", "set_val", 1,"SURE_SET"); if ( msg_error() ) {

     	logf(ERROR, "Error initializing object:%s",msg[0]);

return;

   	}

} logf(SIGNIFICANT, "SPELL zevt_set %s",internal); }



Save, the above files in site/mods/majic folder and bounce the SDMr12.1 services.