Where can I find Spel functions documentation?

Document created by TMACUL Champion on Jun 6, 2015Last modified by TMACUL Champion on Mar 14, 2017
Version 39Show Document
  • View in full screen mode

What is spel

Spel is a procedural language closely resembling C, with some additional statements for handling the Business Object Process (BOP) messaging architecture.

(Integrations Vol2 p124)

Overview

  • Spel is CA proprietary code language script for CA Service Desk Manager where is a interpreted language executed by Method Engine called SPEL_SRVR  - "Spel code interpretation server" (CA WIKI)
    • Spel code can be interpreted not only by spel server but also by webengine if it is placed in www directory and defined as custom webengine operation, know how more SPEL: Register custom webengine OP by cdtj
  • All changes using spel changes on CA Service Desk Manager will change factory standard
  • All changes using spel code it´s a customization and don't have support by CA Support. (CA Support Brief)
  • All custom changes on CA SDM is  located in $NX_ROOT\site\mods\
  • Spel code can be found in .spl and .maj files located in $NX_ROOT\bopcfg\majic and $NX_ROOT\site\mods\majic directories. (Integrations Vol2 p122)
  • Examples can be found in the $NX_ROOT\samples (CA WIKI)
  • .spl files with a pcd preceding the .spl are encrypted files, such as chgpcd.spl or itilpcd.spl.
  • We are using usually spel to do attribute validation and/or notification

 

Be Careful

By Kyle_R

WARNING: Incorrect SPL code customization can stop your system

Click here for more information

 

Data Types

int 32 bit integerlong 32 bit integerfloat or double (same)
datedurationstring C++ object
object BOP object

 

Logical operators

A programming-language symbol that denotes a logical operation, are generally derived from Boolean algebra, which is a mathematical way of manipulating the truth values of concepts

 

&&

Logical operator AND.

understanding

||

Logical operator OR

understanding

!

logical or bitwise OR

 

Relational operators

Relational operators allow comparison of values. (know more...)

 

==

Equal to

!=

Not Equal to

<=

Less than or equal to

<

Less than

>=

Greater than or equal to

>

Greater than

Example:
x == yx != yx <= yx < yx >= yx > y

 

Arithmetic operators

Arithmetic operators able to add, subtract, multiply, and divide. (know more...)

 

+
Addition
-
Subtraction
*
Multiplication
/
Division

 

Concatenation operators

Concatenation is the process of appending one string to the end of another string. When you concatenate string literals or string constants by using the + operator, the spel creates a single string.

 

+

 

Assignment operators

Assign a value to a name. (more...)

 

=
simple assignment
+=>
Compound addition
-=
Compound subtraction
*=
Compound multiplication
/=
Compound division
%=
Compound modulo

 

Statements

 

IF

Conditional statements are evaluated condition where are compared values,  Example: if (x % 2 == 0)

 

FOR

Loops are used in performing repetitive task in programming.

 

WHILE

Loop statement in programming language repeatedly executes a target statement as long as a given condition

 

Functions

 

 

 

SPEL API methods

 


 

 

msg_lenght()

 

msg_length(), which returns length of msg array after send_wait usage

 

Example Code:

 

for (i=0;i<msg_length();i++) {

    logf(SIGNIFICANT, "msg[%d]: '%s'", i, msg[i]);

}

 

 

upd_val

SPEL: Object update

 

upd_val, update objects

 

Example code:

 

 

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

 

Spel files and Advanced Availability

1. create your files

2. run pdm_server control -b on standby it will become background

3. run pdm_server_control -v on standby former background

4. run pdm_server control -b on standby former background it will become background

5. restart standby and application servers

By Gutis

 

Makes SPEL code easier to understand

 

References - To find out more about Spell, then go to:

http://www.servicedeskusers.com/Spel_Reference_Guide

http://www.servicedeskusers.com/Get_dob_Spell_method

 

 

Technical Reference Guide Release 12.9.00

CA SDM Spell coding - How to recycle Spel Service - (spel_srvr)

SPEL: Dummy atevs cancellation 

SPEL: HTML styled notification via SPEL ( cdtj )

SPEL: How to call SDM method using WebServies 

Custom WebEngine OP : Who is currently watching object

SPEL: Object update (cdtj )

SPEL: Register custom webengine OP

 

SPEL API methods (Gutis)

SPEL API: BOP Manual  Chapters

SPEL API: Overview

SPEL API: Lessons

SPEL API: BOP - Executables

SPEL API: BOP Interpretive C Language

SPEL API: BOP - Schema - Majic

SPEL API: Domain Server Public Messages

SPEL API: Domain Server - Attached Events

SPEL API: VBOP Detail Description

SPEL API: BOP TRIGGERS

SPEL API: WAND

 

Update Change Status based on Task Status using SPELL. by Fabiano Domingues 

 

 

 Service Desk Manager 15 days Implementation 

 

---------------------------------

Authors:

 

Tiago Macul

Timur

Gutis

Kyle_R

 Daniel Bighelini 

Tiago MACUL's Blog

---------------------------------

 

 

 

Was useful, please leave your feedback!

10 people found this helpful

Attachments

    Outcomes