8 Replies Latest reply on Nov 16, 2006 9:07 AM by s_aliakbary

    Extending jPDL for using in web application

    s_aliakbary

      Dear friends
      I'm using jBPM in a web application environment. Each Task-Node would be a representative for a task in the worklist of a user in my web application. So I think it is better to specify the target URL coresponding to each task in the jPDL file. But original jPDL standard does not support extra information -like this URL- for task-nodes. I think I should implement my own Node and add this extra information to it. some other information like menu id can also be included in the tag.
      Is this approach correct?
      The jPDL would have something like this :

      <my-task-node name="something">
       <task swimlane="something else">
       </task>
       <transition name="something" to="somewhere" />
       <menukey menukey="letter" />
       <Link url="/somepage.jsp" />
       <extendedattribute name="ip" value="192.168.110.110" />
      
      </my-task-node>
      

      When I'm showing worklist to user, using jbpm_taskinstance, I will bring this Link and coresponding taskInstance row Id to user.

      Thanks and excuse me for the long message.


        • 1. Re: Extending jPDL for using in web application
          kukeltje

          in this case you could make your own taskcontroller (afaik, never tried it to the fullest)

          • 2. Re: Extending jPDL for using in web application
            s_aliakbary

            So there is no better way than this scenario?

            • 3. Re: Extending jPDL for using in web application
              kukeltje

              depends on your definition of better..... I feel you want a different solution. Can you explain why?

              • 4. Re: Extending jPDL for using in web application
                s_aliakbary

                I'm not sure that a different solution is better or not, because I'm newbie in jBPM. But this approach has some side effects. For example by implementing our own node tags, the eclipse graphical designer will not recognize these node definitions. And some extra code for implementing this new node is necessary.
                Do other jBPM-webbased applications use a similar approach?
                Thanks

                • 5. Re: Extending jPDL for using in web application
                  hannes

                  In my webapp the task name resolves the jsp name, in other words if there is a file 'taskname' + '.jsp' in my folder then the funktion (it is a jsf action) has the taskname as output (string). then there is a nav case in the faces-config that leads to the specific jsp.

                  But I also support a more generic task definition in the jpdl.

                  • 6. Re: Extending jPDL for using in web application
                    s_aliakbary

                    Thanks Hannes
                    That will work for links. Thank you.
                    What about other information needed for each node? For example each node would have a menu id which specifies the place of the task in the menu in worklist of users (something defined in my web application)?
                    Is there similar way for supporting such informations?

                    • 7. Re: Extending jPDL for using in web application
                      kukeltje

                      Specifying a taskcontroller is not a specific node. It is an attribute of an existing node. So no problem there. You can even do it generic for the whole engine.

                      The solution Hannes proposes can also work. I did something similar once.

                      If you 'only' have/need forms for tasks and not as a part of another webapp, look at 3.2 (cvs-head) it has functionality for doing custom pages per task

                      • 8. Re: Extending jPDL for using in web application
                        s_aliakbary

                        Hi again
                        I still think that I should implement my own nodes!
                        task-controllers and more genral, process variables do not seem a good solution, because for each process instantiation the variables are created and they should get values for each process instance, while properties like URL, menuID, .. are labels for "node definitions" not for "nodes in a process instances". So performance using process and task variables is not good.
                        So I think I should design a table along with JBPM_NODE storing extra properties for each node.

                        Please if this design has a drawback, inform me about that.
                        And my new problem is the graphical-designer, which does not support third-party implemented nodes. Is it easy to change the graphical designer so that it supports new implemented nodes in jPDL?

                        Thanks again