AnsweredAssumed Answered

Parameters for action rules

Question asked by madnicow on Mar 31, 2007
Latest reply on Jul 22, 2010 by markjay50
Hi,

I tried to add some rules on a folder thanks to the WebService api.
I have already seen the others topics on this subject and I can now add rules with extract medata or add aspect actions. :)
However, I would like to know what are the parameters to add for the others possible actions (email,move, transform …).

Here is the method which I would like to know the parameters :

newAction.setParameters(new NamedValue[]{new NamedValue(name,isMultiValue,value,values)});

In order to find  String name, boolean isMultiValue, String value, String[] values for the rules on a particular node, I tried this code:

private static void enumParameters(Reference node) throws ActionFault, RemoteException{
      Rule[] array = WebServiceFactory.getActionService().getRules(node,new RuleFilter());
      String trace = "There are "+ array.length + " rules on this node:\n";
      for (int i=0; i<=(array.length-1); i++){
         trace += "rule("+i+"): "+array[i].getTitle() + " | " + array[i].getDescription()+"\n";
         NamedValue[] parameters=array[i].getAction().getParameters();
         if (parameters!=null){
            trace += "There are "+ parameters.length + " parameters lines for this action:\n";
            for (int j=0; j<=(parameters.length-1); j++){
               trace += "parameters line("+j+"): "+parameters[j].getName() +", "+parameters[j].getIsMultiValue()+", "+parameters[j].getValue()+"\n";               
            }
         }
      }
   System.out.println(trace);
}

Unfortunatly, this only returns the parameters of the rules that I added thanks to the api and not with the web client. And I'm always at the same point. :cry:
So is there anybody who found what are the different parameters to put in NamedValue ??


thanks

Outcomes