4 Replies Latest reply on Mar 12, 2010 5:06 AM by richard.clayton

    JBPM Console Error: "No UI associated with PROCESS ..."

    richard.clayton

      Hi all,

       

      I was hoping someone could help me with a little problem I'm having with deployments.  I've created a Servlet that allows authenticated users to upload Workflow definitions using a zip file.  The Servlet extracts the contents of the zip file and then creates a new deployment, adding each extracted file as resource for the deployment.  Instead of adding resources using the "addResourceFromClasspath" method, I am using the "addResourceFromFile" method.

       

      This method of deployment is working pretty decently, unfortunately, if I add Freemarker templates, I am not able to use them in the JBPM Console.  Everytime I start a new instance of a Process Definition, I get a "No UI associated with PROCESS ..." from the BPM Console.  When I go to the database, I can verify that the template exists as a BLOB and is associated with the right process definition id.

       

      I'm curious if there is some special way I'm supposed to reference this file?  Currently, I'm just refering to the file by name:

       

      <start form="template.ftl">

       

      Is there some other way I should be refering to this template file?

       

      Thanks,

       

      Richard

        • 1. Re: JBPM Console Error: "No UI associated with PROCESS ..."
          kukeltje
          what 'other way of refering'? What is your current way? It should be referred to from the processdefinition. Look at the examples how to do this
          • 2. Re: JBPM Console Error: "No UI associated with PROCESS ..."
            richard.clayton

            Ronald,

             

            I have poured over the examples and none of them detail how to reference a freemarker template if uploaded via the "addResourceFromFile" method.  What I meant by "other way of refering" is that freemarker templates are typically given a path relative to the class path when using the "form" attribute in a process definition.

             

            Richard

            • 3. Re: JBPM Console Error: "No UI associated with PROCESS ..."
              swiderski.maciej

              Hi Richard,

               

              first of all I would like to suggest reading Task forms section of dev guide if you haven't done that yet - http://docs.jboss.com/jbpm/v4/devguide/html_single/#taskforms

               

              In my opinion resources (including task forms) are stored in database and they will be referenced by classpath relative path on runtime.

               

              You could try to check if the data base entry has correct name. Task forms are retrieved from data base using following method:

              // check if a template exists
                  String name = task.getFormResourceName();
                  InputStream template = repoService.getResourceAsStream(procDef.getDeploymentId(), name);
              

              and if templete is null it will throw the exception you mentioned.

               

              So, possible issue could be:

              1. template is not deployed due to not being compliant with rules defined in dev guide (mainly ftl extension)

              2. name is different than expected (can be checked on Task object by inspecting formResourceName field

               

              /Maciej

              1 of 1 people found this helpful
              • 4. Re: JBPM Console Error: "No UI associated with PROCESS ..."
                richard.clayton

                Maciej,

                 

                Thanks for the reply.  I've read the jBPM documentation (both User and Developer's Guide) from start to finish.  The "task form" section does not offer any insight into this issue.  In the past, I have been able to successfully use templates, but only when creating the ProcessEngine outside of JBoss.

                 

                I will attempt to pull the form using the code you have submitted to see if it is returning null from the api.  I will update this forum when I get the results.

                 

                Thanks,

                 

                Richard