5 Replies Latest reply on Jun 5, 2013 11:12 AM by jmiguel77

    Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5

    jmiguel77

      Hi

       

      I am trying the jbpm 5 integration with soa-p 5.3.1. I am includine two files in the .esb deployment:

       

      - the .bpmn file, with the process definition

      - a .ftl file, with a human task form

       

      Through the esb i can start instances of the bpm process, and get to the task i want; after that point, i am using a web client that logins to the bussiness-central-server, shows the tasks for the assignee user, and tries to access the task form, using a url like this:

       

      http://localhost:8080/business-central-server/rs/form/task/1390/render

       

      But when i do this invocation i get an error message like this:

       

      13:17:35,704 WARN  [AbstractFormDispatcher] Could not connect to Guvnor.

      13:17:35,715 ERROR [runtime]

      Expression task.names[0] is undefined on line 4, column 7 in null.

      The problematic instruction:

      ----------

      ==> ${task.names[0].text} [on line 4, column 5 in null]

      ----------

       

      Java backtrace for programmers:

      ----------

      freemarker.core.InvalidReferenceException: Expression task.names[0] is undefined on line 4, column 7 in null.

      .....

      [tons of exception info]

      Caused by: freemarker.core.InvalidReferenceException: Expression task.names[0] is undefined on line 4, column 7 in null.

                at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)

                at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)

                at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)

                at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)

                at freemarker.core.Expression.getStringValue(Expression.java:93)

                at freemarker.core.DollarVariable.accept(DollarVariable.java:76)

                at freemarker.core.Environment.visit(Environment.java:209)

                at freemarker.core.MixedContent.accept(MixedContent.java:92)

                at freemarker.core.Environment.visit(Environment.java:209)

                at freemarker.core.Environment.process(Environment.java:189)

                at freemarker.template.Template.process(Template.java:237)

                at org.jbpm.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:128)

                ... 45 more

       

      So, as you can see, the form dispatcher is trying to connect to guvnor, but there is no guvnor deployed in the server (the installation guide for the jbpm 5 integration, never mentioned guvnor).

       

      How can i access this form ?? or can't i ?? there is another way ??

       

      thanks

        • 1. Re: Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5
          tcunning

          You're right - the JBPM5 / ESB integration guide didn't cover guvnor.      Have you looked at the BRMS documentation?   The "Getting Started" guide covers some of the guvnor installation (I see guvnor.war mentioned), if that doesn't cover installation of guvnor thoroughly, I'd ask on the Drools guvnor forums:

           

          http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html

          • 2. Re: Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5
            jmiguel77

            Hi Tom, thanks for answering

             

            I deployed the jboss-brms.war that comes inside the brms-deployable; but i get another exception:

             

            16:44:23,342 INFO  [GuvnorConnectionUtils] Could not find process template for: null-taskform

            16:44:23,371 ERROR [GuvnorConnectionUtils] Exception checking template url : null

            16:44:23,385 ERROR [runtime]

            Expression task.names[0] is undefined on line 4, column 7 in null.

            The problematic instruction:

            ----------

            ==> ${task.names[0].text} [on line 4, column 5 in null]

            ----------

             

             

            Java backtrace for programmers:

            ----------

            freemarker.core.InvalidReferenceException: Expression task.names[0] is undefined on line 4, column 7 in null.

             

            and the same stack trace as before.

             

            As you can see, the problem about not finding Guvnor is gone, but now i have another error saying that the task form cannot be found. At first i was only including the .bpmn and .ftl files in the .esb project; but now, besides that, i have deployed them in the guvnor repository as well

             

            Another thing i have noticed, is that, despite i have compiled the package, the process defined in the .bmpn file, does not show in the business-central interface.

             

            any other ideas ?

             

            thanks

            • 3. Re: Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5
              jmiguel77

              Another thing that i found weird about this

               

              I can query the business-central-server, and obtain the list of the tasks that i have assigned to some user; in the list of task, i can see the task belongs to a process instance, and see the id of the process definition. something like:

               

              process instance id: 1111

              task id: 1112

              process id: ABC

               

              that should mean that the process ABC has at least one instance, with id 1111; but then, if access the url:

               


              http://localhost:8080/business-central-server/rs/process/definition/ABC/instances

               

              I get 0 results:

               

              {"instances":[]}

               

              How can this be ??

              • 4. Re: Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5
                tcunning

                Jose, are you having these issues only through invoking through ESB, or are you having them also while invoking your processes through a standalone program/etc?  

                If they are completely ESB-related, then it's something we need to look at, but it sounds like these are configuration / general use sort of issues.      Have you tried posting them to the jbpm forum, or the guvnor forum?     

                 

                https://community.jboss.org/en/jbpm?view=discussions

                 

                Also - if you have a service contract - don't hesitate to open a case on these.     I'm just not sure what's going on here, and I think you're going to get a lot more help in those other places.

                1 of 1 people found this helpful
                • 5. Re: Problem with tasks forms in the soa-p 5.3.1 integration with jbpm 5
                  jmiguel77

                  Hi Tom

                  In a pure brms environment (a brms-standalone server), i am not getting this error; but, of course, in that server i dont have any esb related deployment.

                  I have posted this same issue in the jbpm section (https://community.jboss.org/message/821398#821398), but so far, nothing helpfull has come off

                  thanks anyway