4 Replies Latest reply on May 23, 2007 7:18 AM by françois peyrical

    customize jbpm-starters-kit-3.1.2  interface

    françois peyrical Newbie

      Hi,
      I?m beginning to use jbpm-starters-kit-3.1.2 to create a workflow.

      I would like to modify the value of the commandbutton ?Save and close Tasks? located in task screen.

      For this,
      I changed the files taskBean.java and task.jsp.
      I compiled and deployed my jbpm.war in " jbpm-server/?/deploy" to include the changes for my JSP but it didn?t succeed . There's an error concerning the faces servlet Is it linked to the "web.xml" file ?? or "faces-config.xml" ??

      (To change the value of the other command button ?Save? and ?Cancel? it?s ok because it?s not linked to the Bean).

      Can anybody help me to customize my application view by giving me a method to modify this button (translate or change the words ?Save and close Tasks?).

      Thanks in advance. Best regards.

        • 1. Re: customize jbpm-starters-kit-3.1.2  interface
          Martin Weiler Apprentice

          If you just want to change the displayed text, I'd guess the only thing you would have to change is task.jsp from

          <h:commandButton id="transitionButton" action="#{taskBean.saveAndClose}" value="Save and Close Task"/>


          to something like
          <h:commandButton id="transitionButton" action="#{taskBean.saveAndClose}" value="your_custom_text"/>


          Regards, Martin

          • 2. customize jbpm-starters-kit-3.1.2  interface
            françois peyrical Newbie

            Thanks for your prompt reply,

            But it doesnt work because it's probably linked to the file: "TaskBean.java". When i do the changes in both "Task.jsp" and "TaskBean.java" and redeploy the "app.war" ive got an "error message".

            Following lines are taken from the "Taskbean.java":


            public String saveAndClose() {
            // save
            save();

            // close the task instance
            String transitionButton = JsfHelper.getParameter("taskform:transitionButton");
            log.debug("Submitted button:" + transitionButton);
            TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(taskInstanceId);
            if ("Save and Close Task".equals(transitionButton)) {
            //if ("Hello".equals(transitionButton)) {
            taskInstance.end();
            } else {
            taskInstance.end(transitionButton);
            }

            • 3. Re: customize jbpm-starters-kit-3.1.2  interface
              Martin Weiler Apprentice

              "app.war", "error message"

              I don't know what you are referring to. Also, I don't see a problem when you change the values in both files and deploy the changed artifacts correctly.

              Generally, I'd suggest to move on to jBPM 3.2, which has a much more sophisticated web app included.

              Regards, Martin

              • 4. customize jbpm-starters-kit-3.1.2  interface
                françois peyrical Newbie

                Thanks for your advise but my process is ready and i dont have time to change the kit now. I customized the other commandbutton and the interface by acting upon the .JSP except this one .... My problem is linked to the FacesServlet.java.

                Thanks. Regards.

                You can see the error message:

                description The server encountered an internal error () that prevented it from fulfilling this request.
                exception
                javax.servlet.ServletException: Error calling action method of component with id taskform:transitionButton
                javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
                org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
                org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
                org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
                org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                root cause
                javax.faces.FacesException: Error calling action method of component with id taskform:transitionButton
                org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
                javax.faces.component.UICommand.broadcast(UICommand.java:106)
                javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
                javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)


                org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:271)
                org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
                org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
                org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
                org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
                org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)