CA Service Management

SPEL: Object update 

05-20-2015 03:55 AM

Description:

SPEL code is a powerful tool to reach any goals but it still not documented. So most of it is written by trial and errors.

So here I want to share my resolution for most common action: Update one object caused by another.

Here is my latest version of function to make it (Entire function is added as attachment).

 

Usage example (with comments):

macro::upd_val("iss",                          // object factory
               format("id=%d",other_issue_id), // where clause to get object (or objects)
               30,                             // delay to new retry if first iteration fails
               3,                              // amount of retries
               "summary",                      // attribute to update
               "test 1",                       // new value  
               "description",                  // another attr 
               "test 2",                       // another value  
               "z_etc_param",                  // amount of attributes that can be updated in 1 iteration is infinite  
               "here is etc value");           // value can be string, integer or anything else.

 

Conclusion:

Hope this helps to resolve common tasks and makes SPEL code easier to understand.

Any comments or suggestions are welcome!

Statistics
0 Favorited
29 Views
1 Files
0 Shares
8 Downloads
Attachment(s)
zip file
upd_val.spl.zip   855 B   1 version
Uploaded - 05-29-2019

Tags and Keywords

Comments

05-20-2015 01:55 PM

Thanks for sharing this with the community Timur!

SPEL: Object update

Related Entries and Links

No Related Resource entered.