CA Service Management

CA SDM::.SPEL::. event() 

03-03-2017 12:38 PM

Overview

 

event name passed in from domsrvr

Usage

string current_event;
current_event = event();
logf(SIGNIFICANT, "Event: %s", current_event);

Results

Returns current event as string value.

Known values:

  • INSERT
  • DELETE
  • UPDATE

 

Examples

Codepart from group membership logging maco.

Depending on event() we will create different log types.

// mod file:
MODIFY grpmem POST_CI z_log_init(persistent_id, group, member) 110 FILTER(EVENT("INSERT DELETE UPDATE"));
// spell side
grpmem::z_log_init(...) {
     uuid member, grp;
     string thisEvt, persid;

     persid = argv[3];
     grp = (uuid)argv[6];
     member = (uuid)argv[9];

     thisEvt = event();
     if (thisEvt == "INSERT") {
          grpmem::z_log_add(persid, grp, member);
     } else if (thisEvt == "DELETE") {
          grpmem::z_log_delete(persid, grp, member);
     } else if (thisEvt == "UPDATE") {
          grpmem::z_log_modify(persid, grp, member);
     } else {
          logf(ERROR, "%s > Unknown event: %s", persid, thisEvt);
          return;
     }
}

 

 

Where can I find Spel functions documentation? 

Statistics
0 Favorited
15 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

03-15-2017 08:06 AM

Hi Timur

 

Thank you for sharing your knowledge with us. 

 

Related Entries and Links

No Related Resource entered.