[jboss-user] [JBoss jBPM] - Re: Task form cancel button not working

naseem.k do-not-reply at jboss.com
Mon May 28 02:59:45 EDT 2007


Class TaskForm.java.

If condition defined in the try block checks formButton an instance of CancelButton? If condition is true, then outcome is set to "cancel".


  | public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
  | 
  | .....
  | 
  |   try {
  |     if (formButton instanceof CancelButton) {
  |           
  |       //formButton.setDisabled(true);          
  |       log.debug("Cancel button was pressed");
  |       outcome = "cancel";
  |       if (creationLogsVar != null) {
  |          requestMap.put(creationLogsVar, Collections.EMPTY_LIST);
  |       }
  |          commit = true;
  |          return;
  |       }
  |   }
  | 
  | ...
  | }
  |         

In the view.xhtml by <jbpm:outcome custom tag, there is a redirect. Task instance id query parameter is not submitted due to this redirect after a user click the cancel button. Therefore the custom tag which is responsible for rendering the process image tag throws NullPointerException.

    
  | <jbpm:outcome outcome="cancel" type="redirect"/>    

Url of Task Instance View page before cancel button is clicked: http://localhost/main/task/view.html?tiid=11863

Url of Task Instance View page after cancel button is clicked: http://localhost/main/task/view.html

I managed to solve the NullpointerException problem by changing the type to "stay".

Still I don't know what is the purpose of cancel task form button?

Is this cancel button for stopping a process which you started?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048968#4048968

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048968



More information about the jboss-user mailing list