Hi,
I have a class which runs in batch. The class is called by different menu items, for example:
-MenuItem1: EnumTypeParameter=myEnumParameter, EnumParameter = "Version1"
-MenuItem2: EnumTypeParameter=myEnumParameter, EnumParameter = "Version2"
The main method retrieves the value of the EnumParameter:
static void main(Args args)
{
MyClass myClass;
;
myClass = MyClass::construct();
if(args && args.parmEnum())
{
myClass.parmMyEnumParameter(args.parmEnum());
}
if (myClass.prompt())
myClass.run();
}
The run method of the class checks the value of the EnumParameter to understand which operations must be executed:
switch(myEnumParameter)
{
case myEnumParameter::Version1:
this.runVersion1();
break;
case myEnumParameter::Version2:
this.runVersion2();
break;
default:
info("default");
break;
}
When i run it in client mode it all works fine: the value of enumParameter is read correctly and the corresponding method "runVersion" is executed.
In batch mode looks like the enumParameter's value is not retrieved and the execution falls down into the "default" branch of that switch statement.
I think I've tried every combination of the RunOn property on both the action MenuItem and the Class. Is there something i'm forgetting here?
Thanks in advance for your help
regards