Finding negative numbers in a field in ILog

I have a following requirement in Ilog Jrules,

Having an Integer field that contains both positive and negative numbers. Requirement is to loop through the Integer field, find and remove the negative sign in the negative numbers. It sounds simple but I could n't find a way to to this.

Any help or pointers would be highly appreciated. Many thanks.


(Supposing that XArray is an input/output Array of Integer in your rule project) You can create a rule like this:

set 'x' to a Number from  XArray;
x is less than 0
set x to -x;

PS: don't forget to add the rule in a ruleTask (with RetePlus Alogorithm: default) in the main ruleflow.

I ve created the following function in BOM to XML mapping and passing all the incoming integer field values through this, which solved the problem.

if (integer < 0) return integer * -1; else return integer;

Need Your Help

android + google map api v2 + current location

android google-maps

i am creating an app with a google map view and i want this app to detect the current location of the user and display the lat and long with a marker on the map but all i can do until now is the

On a wiki, is it acceptable to restructure people's headings?

layout coding-style wiki social

I dislike the fact that people use h3 rather h1, or skip a level just because of the way it looks. IMHO, headings signify document structure, rather than layout. The layout is just a side effect,