jBpm error @EndTask returns a facemessage "Task null not found"
mitabhushan Sep 16, 2010 2:44 PMI upgraded my application from Jboss Seam 2.01 to 2.2.0. After Upgrade non of the jBPM EndTask work. I have no errors in the log file but i have a mesaage on the page saying Task null not found
. When I ran the application in the debug mode it did not even entered approveRequest method. BeginTask has been called before EndTask
.xhtml
       <h:commandButton id="approveRequest" 
                               value="Approve / Reject Request" 
                              action="#{requestReview.approveRequest}" />
java class
@Stateful
@Name("requestReview")
public class RequestReviewAction implements RequestReview, Serializable {
     
     private static final long serialVersionUID = -8438575700172722335L;
     private static final String APPROVE = "Approved";
     private static final String REJECT = "Rejected";
     private static final String INVESTIGATE = "Investigate";
     
     private static final String QUOTE_VIEW = "quoteView";
     
     @In
     EntityManager entityManager;
     
     @In
     Credentials credentials;
          
          
     @In(create=true, required=false)
    @Out(required=false)
    InquireHome inquireHome;
     
     
     Inquire inquire;
     
     @In(scope=ScopeType.BUSINESS_PROCESS, required=false)
    @Out(required=false)     
     int id;
     
     @In
     @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
    String requestStatus;
     
@BeginTask
     public String viewRequest() {
         
         //Find the task to be worked.
         inquire= (Inquire) entityManager.find(Inquire.class, id);
         //Create the instance of the task to be worked.
         inquireHome.setInquireId(id);
         return "viewRequest";
     }
@EndTask(transition="toQuoteApproval")
    public String approveRequest()
    {
          inquireHome.getInstance().setStatusDate(new Date());
          inquireHome.getInstance().setStatusUserid(credentials.getUsername());
          inquireHome.getInstance().setUpdatedDate(new Date());
          inquireHome.getInstance().setUpdatedUserid(credentials.getUsername());
          inquireHome.getInstance().setShowView(QUOTE_VIEW);
          
                    
          requestStatus = inquireHome.getInstance().getStatus();
               
          inquireHome.update();
          
                   
          return "approveRequest";
    }
}
 
    