Pedro Lino de Sousa

How to use an ruleset input array on a java method

Discussion created by Pedro Lino de Sousa on Apr 28, 2011
Latest reply on May 3, 2011 by Jostein Ulseth

Hi

 

I am having some problems in integrating java in a ruleset, and I will appreciate your help.

 

I have a java class Diagnostic that has a method with this signature:

 

  public boolean checkRules(String[] inList){

 

        if(inList != null){

            return true;

        }else{

            return false;

        }

    }

 

On the Java Business Object Model, the class was registered with success and the method is showed like this:

 

checkRules(fixed array of string): boolean

 

I am trying to use this method ruleset, that receives as input an object that has, among other fields, an array of Strings:

 

ntt_rules_docs_action

                -action:string

                -diagnostics:array of string

 

The input parameter of the ruleset was given the name Action, and a pattern aDiagnostic was created to encapsulate the access to the java class

 

On the first rule of the rule set I have the following code:

 

if ((aDiagnostic.checkRules(Action.diagnostics)))

 

then

   Action.action = "none";

 

Compiling I have the following error:

 

Error: The 'Java:vf.blaze.ntt.Diagnostics' class does not have any matching 'checkRules' method.

There is no method that matches the signature:

checkRules(array_of_string)

 

I think the difference is precisely on the "fixed" prefix. I assume that I have to, in some way, clarify that the array of the Action object input is also with fixed.

 

Am I on the right track? Can you please help me on this?

 

Thanks in advance,

Best Regards,

Pedro

 

Outcomes