TMACUL

CA SDM  Spell - Code example for cleanup SLA - delete all events on ticket

Blog Post created by TMACUL Champion on Oct 22, 2015

It's spel code will delete all events on ticket (incident, request, problem).


It's code was based on SPEL API methods  /  SPEL API methods / métodos - Brazilian Portuguese

wrote by Giedrius and Timur


What do you need know before prove it:


  • CA Technologies don't recommend to delete any data
  • Secure disposal processes to erase sensitive corporate and personal data. (ISO 27001 - security Guideline audit)
  • Using "cancel_me" keeps event history which is could be helpful, sometimes
  • It's extremely necessary a precision where clause or you'll loss more information's/events then you really want to do.

 

 

mod file

MODIFY cr {

  POST_VALIDATE zPrioridade() 993 FILTER ( impact{} );

};

 

Spel File

cr::zPrioridade(...)

{

    string cr_id;

    cr_id = persistent_id; //persid

 

    send_wait(0, top_object(), "call_attr", "api", "delete_wc", "atev", format("obj_id='%s'", cr_id), NULL);

}

 

Where can I find Spel functions documentation?

CA SDM Spel variables for cr object - call_req

CA SDM  Spell - Code example for set SLA looking for impact

CA SDM  Spell - Code example for set SLA looking for impact and CI - Affected Resource

Outcomes