BPM Events User's Guide
Predefined functions and operators

# Predefined functions and operators

In the following text, the symbol: ‘x’ is a generic symbol used to denote any expression type, either atomic (for example, int, double) or composed (for example, a structure type like {a:int, b:string }).
The symbols: // are followed by comments.
!= // different
: ((‘x*‘x)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
% // modulo
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
* // multiply
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
* // time expressions
: ((time*int)->time)
: ((int*time)->time)
: ((btime*int)->btime)
: ((int*btime)->btime)
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
+ // concatenation
: ((string*string)->string)
: ((string*any)->string)
: ((any*string)->string)
+ // union
: ((set<‘x>*set<‘x>)->set<‘x>)
: ((set<‘x>*list<‘x>)->set<‘x>)
: ((list<‘x>*set<‘x>)->list<‘x>)
: ((list<‘x>*list<‘x>)->list<‘x>)
+ // date forward shift
: ((time*date)->date)
: ((date*time)->date)
: ((btime*date)->date)
: ((date*btime)->date)
: ((time*time)->time)
: ((btime*btime)->btime)
- // minus
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
- // unary minus
: (int->int)
: (double->double)
- // date backward shift
: ((date*time)->date)
: ((date*btime)->date)
- // time subtraction
: ((time*time)->time)
: ((btime*btime)->btime)
/ //division
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
/ // time division
: ((time*int)->time)
: ((int*time)->time)
: ((btime*int)->btime)
: ((int*btime)->btime)
< // less than
: ((int*int)->boolean)
: ((double*double)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
< // earlier than
: ((date*date)->boolean)
< // duration less than
: ((time*time)->boolean)
: ((btime*btime)->boolean)
<- // belongs to
: ((‘x*set<‘x>)->boolean)
: ((‘x*list<‘x>)->boolean)
<= // less than or equal to
: ((int*int)->boolean)
: ((double*double)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
<= // earlier or at same date as
: ((date*date)->boolean)
<= // duration less than or equal to
: ((time*time)->boolean)
: ((btime*btime)->boolean)
= // equal to
: ((‘x*‘x)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
> // greater than
: ((int*int)->boolean)
: ((double*double)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
> // later than
: ((date*date)->boolean)
> // duration greater than
: ((time*time)->boolean)
: ((btime*btime)->boolean)
>= // greater or equal to
: ((int*int)->boolean)
: ((double*double)->boolean)
: ((int*double)->boolean)
: ((double*int)->boolean)
>= // later than or same date as
: ((date*date)->boolean)
>= // duration greater than or equal to
: ((time*time)->boolean)
: ((btime*btime)->boolean)
abs // absolute part of
: (int->int)
: (double->double)
: ((set<‘x>*‘x)->boolean)
: ((list<‘x>*‘x)->boolean)
: (array<‘x>[]->int)
: (array<‘x>[][]->int)
: ((array<‘x>[]*‘x)->int)
: ((array<‘x>[][]*array<‘x>[])->int)
: ((list<‘x>*int*‘x)->void)
: ((array<‘x>[][]*string*list<string>)->void)
: ((array<‘x>[][]*string)->void)
: ((array<‘x>[]*string*list<string>)->void)
: ((array<‘x>[][]*string*list<string>)->void)
: ((array<‘x>[][]*string*list<string>)->void)
: ((array<‘x>[][]*string)->void)
: ((array<‘x>[]*string)->void)
: ((array<‘x>[][]*string)->void)
avg // re-calculate an average value, given a new value and its weight
: ((int*int*int*int)->int)
: ((double*double*int*double)->double)
: ((double*double*int*int)->double)
: ((double*int*int*int)->double)
: ((double*int*int*double)->double)
check // associates an alarm check with an infopad
: ((array<‘x>[]*string*string*string*int*string)->void)
: ((array<‘x>[]*string*string*string*string*string)->void)
: ((array<‘x>[][]*string*string*string*int*string)->void)
: ((array<‘x>[][]*string*string*string*string*string)->void)
close // close a file
: (output->void)
colCount //return the number of columns in an infopad
: (array<‘x>[][]->int)
colKeySet // return the list of column labels
: (array<‘x>[][]->list<string>)
day // extract the day (number) from a date
: (date->int)
: (time->int)
: (btime->int)
disableRule // disable a rule currently loaded
: ((string*string*string)->boolean)
// discard all events of a process and subprocess in the cache index
: (string->void)
discardIndexEntry // discard all events of a process in the cache index
: (string->void)
dueDate // calculate the due date based on the specified calendar
: ((btime*date)->date)
: ((btime*date*string)->date)
duration // elapsed time between two dates
: ((time*date*date)->int)
: ((btime*date*date)->int)
: ((btime*date*date*string)->int)
elementAt // return Nth element of a list
: ((list<‘x>*int)->‘x)
elements // iterator for list elements
: (set<‘x>->iterator<‘x>)
: (list<‘x>->iterator<‘x>)
enableRule // enable a rule currently loaded
: ((string*string*string)->boolean)
except // set difference
: ((set<‘x>*set<‘x>)->set<‘x>)
findColIndex // return index given the column label, if label is not found, then return -1
: ((array<‘x>[][]*string)->int)
findIndex
: ((array<‘x>[]*string)->int)
: ((array<‘x>[][]*string)->int)
findRowIndex // return index given the row label, if label is not found, then return -1
: ((array<‘x>[][]*string)->int)
first // first elt of a list
: (list<‘x>->‘x)
flush // flush pending outputs to a file
: (output->void)
getColIndex // return index given the column label
: ((array<‘x>[][]*string)->int)
getColLabel // return label given the column index
: ((array<‘x>[][]*int)->string)
getDateProperty // return a field of a date
: ((date*string)->int)
getEventDate // return date of an event
: (EVENT->date)
getEventDateProperty // return a field of a date of an event
: ((EVENT*string)->int)
getEventProperty // return a field of an event
: ((EVENT*string)->string)
getIndex
: ((array<‘x>[]*string)->int)
: ((array<‘x>[][]*string)->int)
getLabel
: ((array<‘x>[]*int)->string)
: ((array<‘x>[][]*int)->string)
getProcessTemplateId // given the process template name, return its id
: (string->int)
getRowIndex // return index given the row label
: ((array<‘x>[][]*string)->int)
getRowLabel // return label given the row index
: ((array<‘x>[][]*int)->string)
hasNext
: (iterator<‘x>->boolean)
hour // extract the hour field (number) from a date
: (date->int)
: (time->int)
: (btime->int)
index // return element at index
: ((list<‘x>*int)->‘x)
: ((string*int)->char)
intersect // set intersection
: ((set<‘x>*set<‘x>)->set<‘x>)
last // last elt of a list
: (list<‘x>->‘x)
like
: ((string*string)->boolean)
max // max of two numbers
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
min // min of two numbers
: ((int*int)->int)
: ((double*double)->double)
: ((int*double)->double)
: ((double*int)->double)
minute // extract the minute field (number) from a date
: (date->int)
: (time->int)
: (btime->int)
month // extract the month field (number) from a date
: (date->int)
: (time->int)
: (btime->int)
next
: (iterator<‘x>->‘x)
not // negation
: (boolean->boolean)
openFile // open a file
: (string->output)
: (string*boolean->output)
print // print to standard output
: (boolean->void)
: (int->void)
: (double->void)
: (char->void)
: (string->void)
print // print to file
: ((output*boolean)->void)
: ((output*int)->void)
: ((output*double)->void)
: ((output*char)->void)
: ((output*string)->void)
println // print a line to standard output
: (boolean->void)
: (int->void)
: (double->void)
: (char->void)
: (string->void)
println // print a line to file
: ((output*boolean)->void)
: ((output*int)->void)
: ((output*double)->void)
: ((output*char)->void)
: ((output*string)->void)
remove
: ((set<‘x>*‘x)->boolean)
: ((list<‘x>*‘x)->boolean)
remove
: ((array<‘x>[]*int)->void)
: ((array<‘x>[][]*int)->void)
: ((array<‘x>[]*string)->void)
: ((array<‘x>[][]*string)->void)
removeAt
: ((list<‘x>*int)->‘x)
removeCheck // remove alarm check from infopad
: ((array<‘x>[]*string)->void)
: ((array<‘x>[][]*string)->void)
rowCount //return the number of rows in an infopad
: (array<‘x>[][]->int)
rowKeySet // return the list of row labels
: (array<‘x>[][]->list<string>)
second // extract the second field (number) from a date
: (date->int)
: (time->int)
: (btime->int)
sendMail // send a mail
: ((string*string*string)->void)
: ((string*string*EVENT)->void)
: ((string*string*string*string)->void)
: ((string*string*string*EVENT)->void)
setAll // initialize all cells of an infopad to some value
: ((array<‘x>[]*‘x)->void)
: ((array<‘x>[][]*‘x)->void)
setAt
: ((list<‘x>*int*‘x)->void)
setColLabel // set one column label of an infopad
: ((array<‘x>[][]*int*string)->void)
setLabel
: ((array<‘x>[]*int*string)->void)
: ((array<‘x>[][]*int*string)->void)
setRowLabel // set one row label of an infopad
: ((array<‘x>[][]*int*string)->void)
size
: (array<‘x>[]->int)
: (array<‘x>[][]->int)
: (list<‘x>->int)
: (set<‘x>->int)
: (map<‘x,‘y>->int)
toDate // convert to a date
: (string->date)
: (date->date)
: (int->date)
toFloat
: (string->double)
: (int->double)
: (double->double)
toInt
: (string->int)
: (double->int)
: (int->int)
: (date->int)
toString
: (any->string)
union
: ((set<‘x>*set<‘x>)->set<‘x>)
year // extract year field (number) from a date
: (date->int)
: (time->int)
: (btime->int)