//2009.08.21 added by sh.kim
//schedule option added.
public static void metaworksCallback_changeMetadata(Type type){
type.setName("Wait Activity");
FieldDescriptor fd = null;
fd = type.getFieldDescriptor("Message");
type.removeFieldDescriptor(fd);
fd = type.getFieldDescriptor("Parameters");
type.removeFieldDescriptor(fd);
fd = type.getFieldDescriptor("MessageDefinition");
type.removeFieldDescriptor(fd);
fd = type.getFieldDescriptor("FromRole");
type.removeFieldDescriptor(fd);
fd = type.getFieldDescriptor("HowWait");
fd.setInputter(new RadioInput(
new String[]{
"while for given 'millisecond'",
"for the next occurrance set by 'Cron Expression'",
"until given 'WaitUntil'",
}, new Object[]{
WAITING_TYPE_WHILE,
WAITING_TYPE_PERIOD,
WAITING_TYPE_UNTIL,
}
)
);
fd = type.getFieldDescriptor("ScheCronExp");
fd.setAttribute("dependancy", new EnablingDependancy("HowWait"){
public boolean enableIf(Object dependencyFieldValue) {
return WAITING_TYPE_PERIOD.equals(dependencyFieldValue);
}
});
fd = type.getFieldDescriptor("WaitUntil");
fd.setAttribute("dependancy", new EnablingDependancy("HowWait"){
public boolean enableIf(Object dependencyFieldValue) {
return WAITING_TYPE_UNTIL.equals(dependencyFieldValue);
}
});
fd = type.getFieldDescriptor("MilliSecond");
fd.setAttribute("dependancy", new EnablingDependancy("HowWait"){
public boolean enableIf(Object dependencyFieldValue) {
return WAITING_TYPE_WHILE.equals(dependencyFieldValue);
}