This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

Mapping BMC Atrium Integration Engine rules and function syntax with corresponding Java output in Atrium Integrator

The following table lists the rule and function syntax that the AIE to AI Migration Tool can migrate to Atrium Integrator. For more information and examples about the rule and function syntax, see the BMC Atrium Integration Engine User's Guide in PDFs and videos.

Rule syntax and functions that are migrated as Java code in Atrium Integrator

Rule syntax in BMC Atrium Integration Engine

Function in BMC Atrium Integration Engine

Corresponding Java code in Atrium Integrator

constant|

Not applicable

Not applicable

function|

calc_token_id

public String calc_token_id(String[]
strList) throws NoSuchAlgorithmException,
UnsupportedEncodingException
MessageDigest md;md =
MessageDigest.getInstance("MD5");byte[]
md5hash = new byte; //strList should
not be null if null then do not
implement this functionString text =
concat(strList);md.update
(text.getBytes("iso-8859-1"), 0,
text.length());md5hash =
md.digest();return convertToHex(md5hash);}

function|

currentdate()

private static String
currentdate(){return
DateFormat.getDateInstance(DateFormat.LONG).
format(new Date());}

function|

currenttime()

private static String currenttime()
{SimpleDateFormat sdf =
new SimpleDateFormat("hh:mm:ss")
;return sdf.format(new Date());}

function|

date(timestamp)
(where timestamp is a constant, field name, or function)

private static String date(String date)
{String ret =null;SimpleDateFormat sdf =
new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa");try
{ret = (DateFormat.getDateInstance
(DateFormat.MEDIUM).format
(sdf.parse(date.replace(".", ""))));}
catch (ParseException e) {e.printStackTrace()
;}return ret;}|

function|

day(timestamp)
(where timestamp is a constant, field name, or function)

private static int day(String date)
{SimpleDateFormat sdf =
new SimpleDateFormat
"EEEE, MMMM dd, yyyy hh:mm:ss aa")
;int day=-1;try
{day= (sdf.parse(date.replace(".", "")).getDate());
} catch (ParseException e)
{e.printStackTrace();}return day;}

function|

hour(timestamp)
(where timestamp is a constant, field name, or function)

private static int hour(String date)
{SimpleDateFormat sdf = new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;int hour=-1;try {hour=
(sdf.parse(date.replace(".", "")).getHours());} catch (ParseException e) {e.printStackTrace();}return hour;}

function|

timestamp

private static String timestamp()
{Calendar currentDate =
Calendar.getInstance();SimpleDateFormat
formatter= new SimpleDateFormat
("yyyy/MMM/dd HH:mm:ss")
;String dateNow = formatter.format
currentDate.getTime());return dateNow;}

function|

time(timestamp)
(where timestamp is a constant, field name, or function)

private static String time(String date)
{String ret =null;SimpleDateFormat
sdf = new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;SimpleDateFormat sdf1 = new SimpleDateFormat
("hh:mm:ss");try
{ret = sdf1.format(sdf.parse(date.replace
(".", "")));} catch
(ParseException e) {e.printStackTrace();
}return ret;}

function|

weekday(timestamp)
(where timestamp is a constant, field name, or function)

private static int weekday(String date)
{SimpleDateFormat sdf = new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa");int
tmp=-1;try {tmp= (sdf.parse(date.replace(".", "")).getDay())+1;} catch (ParseException e) {e.printStackTrace();}return tmp;}

function|

year(timestamp)
(where timestamp is a constant, field name, or function)

private static String year(String date)
{String ret =null;SimpleDateFormat sdf =
new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;SimpleDateFormat sdf1 = new SimpleDateFormat
("yyyy");try {ret = sdf1.format
(sdf.parse(date.replace(".", "")));}
catch (ParseException e)
{e.printStackTrace();}return ret;}

function|

minute(timestamp)

private static int minute(String date)
{SimpleDateFormat sdf =
new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;int tmp=-1;try
{tmp= (sdf.parse(date.replace(".", ""))
.getMinutes());} catch (ParseException e) {e.printStackTrace();}return tmp;}

function|

month(timestamp)
(where timestamp is a constant, field name, or function)

private static int month(String date)
{SimpleDateFormat sdf = new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;int tmp=-1;try
{tmp= (sdf.parse(date.replace(".", ""))
.getMonth())+1;} catch (ParseException e) {e.printStackTrace();}return tmp;}

function|

second(timestamp)
(where timestamp is a constant, field name, or function

private static int second(String date)
{SimpleDateFormat sdf =
new SimpleDateFormat
("EEEE, MMMM dd, yyyy hh:mm:ss aa")
;int tmp=-1;try {tmp=
(sdf.parse
(date.replace(".", "")).getSeconds());}
catch (ParseException e)
{e.printStackTrace();}return tmp;}

function|

concat(string,string, string,...)
(where string is a constant, field name, or function)

private static String concat
(String[] strArray)
{String str = "";for
(int i=0; i<strArray.length; i++){str = str + strArrayHTMLUATatriumcoreAIG:i;}return str;}

function|

left(string,long)
(where string and long are constants, field names, or functions)

private static String subStringLeft
(String strMain, int numChar){return strMain.substring(0,numChar);}

function|

length(string)
(where string is a constant, field name, or function)

private static int stringLength
(String strMain){return strMain.length();}

function|

lower(string)
(where string is a constant, field name, or function)

private static String lowerCase
(String strMain){return strMain.toLowerCase();}

function|

lpad(string,long,string)
(where string and long are constants, field names, or functions)

private static String leftPad
(String strMain, int size, String padStr)
{if (strMain == null) {{}return null;}
if (padStr == null || padStr.length() == 0)
{padStr = " ";}int padLen = padStr.length()
;int strLen = strMain.length();int pads =
size - strLen;if (pads <= 0) {return strMain;}
if (pads == padLen)
{return padStr.concat(strMain);}
else if (pads < padLen)
{return padStr.substring
(0, pads).concat(strMain);}
else {char[] padding =
new charHTMLUATatriumcoreAIG:pads;char[] padChars = padStr.toCharArray();for
(int i = 0; i < pads; i++)
{paddingHTMLUATatriumcoreAIG:i =
padCharsHTMLUATatriumcoreAIG:i %
padLen;}
return new String(padding).concat(strMain);}{}}

function|

ltrim(string)
(where string is a constant, field name, or function)

private static String leftTrim(String strMain){while(strMain.startsWith(" ")){strMain = strMain.substring(1);}return strMain;}

function|

max(any,any,any,...)
(where any is a constant, field name, or function)

public static Object max(Object[] numbers)
{Object maxValue = null;if
(numbersHTMLUATatriumcoreAIG:
0 instanceof Integer)
{Integer[] intArray =
(Integer[])Arrays.copyOf
(numbers, numbers.length, Integer[].class)
;maxValue = max(intArray);}
if(numbersHTMLUATatriumcoreAIG:
0 instanceof String)
{String[] stringArray =
(String[])Arrays.copyOf
(numbers, numbers.length, String[].class)
;maxValue = max(stringArray);}
if(numbersHTMLUATatriumcoreAIG:
0 instanceof Double)
{Double[] doubleArray =
(Double[])Arrays.copyOf
(numbers, numbers.length, Double[].class)
;maxValue = max(doubleArray);}return maxValue;}

function|

min(any,any,any,...)
(where any is a constant, field name, or function)

public static Object min(Object[] numbers)
{Object minValue = null;if
(numbersHTMLUATatriumcoreAIG:0 instanceof Integer)
{Integer[] intArray =
(Integer[])Arrays.copyOf(numbers, numbers.length, Integer[].class);minValue = min(intArray);}
if(numbersHTMLUATatriumcoreAIG:0 instanceof String)
{String[] stringArray =
(String[])Arrays.copyOf
(numbers, numbers.length, String[].class)
;minValue = min(stringArray);}
if(numbersHTMLUATatriumcoreAIG:0 instanceof Double)
{Double[] doubleArray = (Double[])Arrays.copyOf(numbers, numbers.length, Double[].class);minValue = min(doubleArray);}return minValue;}

function|

trunc(real)
(where real is a constant, field name, or function)

public static int trunc(double Rval) {return (int)Math.floor(Rval);}

function|

null()

Not applicable

function|

replace(string,string,string...)
(where string is a constant, field name, or function)

private static String replaceString
(String strMain, String toReplace,
String replaceWith)
{return strMain.replace
(toReplace, replaceWith);}

function|

right(string,long)
(where string is a constant, field name, or function)

private static String subStringRight(String strMain, int numChar){return strMain.substring(strMain.length()-numChar, strMain.length());}

function|

round(real)
(where real is a constant, field name, or function)

public static double round(double Rval) {return Math.round(Rval);}

function|

rpad(string, long,string)
(where string and long are constants, field names, or functions)

private static String rightPad(String strMain, int size, String padStr) {if (strMain == null) {return null;}if (padStr == null || padStr.length() == 0) {padStr = " ";}int padLen = padStr.length();int strLen = strMain.length();int pads = size - strLen;if (pads <= 0) {return strMain;}if (pads == padLen) {return strMain.concat(padStr);} else if (pads < padLen) {return strMain.concat(padStr.substring(0,pads));} else {char[] padding = new charHTMLUATatriumcoreAIG:pads;char[] padChars = padStr.toCharArray();for (int i = 0; i < pads; i++) {paddingHTMLUATatriumcoreAIG:i = padCharsHTMLUATatriumcoreAIG:i % padLen;}return strMain.concat(new String(padding));}}

function|

rtrim(string)
(where string is a constant, field name, or function)

private static String rightTrim(String strMain){while(strMain.endsWith(" ")){strMain = strMain.substring(0, strMain.length()-1);}return strMain;}

function|

status()

Not applicable The status () function is used only for response mapping. However, in Atrium Integrator, Response will be indicated in the job results.

function|

strstr(string, string)
(where string is a constant, field name, or function)

private static String subString(String strMain, int beginIndex){return strMain.substring(beginIndex);}

function|

substr(string,long,
HTMLUATatriumcoreAIG:,long) (where string and long are constants, field names, or functions)

private static String subString(String strMain, int beginIndex, int endIndex){return strMain.substring(beginIndex, endIndex);}

function|

upper(string)
(where string is a constant, field name, or function)

private static String upperCase(String strMain){return strMain.toUpperCase();}

stmt|

Not applicable

Not applicable

Was this page helpful? Yes No Submitting... Thank you

Comments