protected void saveDesignToServer(final boolean needConfirm) throws Exception{
saveDesignToServer(needConfirm, (ProcessDefinition)getProcessDefinitionDesigner().getActivity());
}
public boolean validateDefinition(ProcessDefinition definition){
ValidationContext valCtx = definition.validate(null);
if(valCtx!=null && !valCtx.hasNoError()){
JDialog d = new JDialog(this, "This process definition need to be verified.", true);
JTextArea ta = new JTextArea();
ta.setEditable(false);
d.getContentPane().add(new JScrollPane(ta));
StringBuffer errMsg = new StringBuffer();
for(Enumeration enumeration = valCtx.elements(); enumeration.hasMoreElements();){
Object item = (Object)enumeration.nextElement();
errMsg.append(item +"\n");
}
ta.setText(errMsg.toString());