2 Replies Latest reply on Mar 7, 2009 10:18 AM by p.gentili

    jbpm integration: task commands

    p.gentili

      i'm currently developing a bpm solution focused on managing human activities and i'm using jboss esb and jbpm as central infrastructure.

      I want to manage employee task list from an external web app (Opentaps ERP/CRM) which sends task create/assign/end ... commands to jbpm by sending messages on the ESB.

      Looking in 4.4.GA at the jbossESB-jbpm integration code i saw that only few commands where implemented which are the ones related to process instance management (start,stop etc) and the others just leaved commented (in the Constants class) so i thought that this was a part leaved to the community and i was plannig to develop them on my own but with my surprise i saw that in jbossESB 4.5 code SignalComand disappeared together with other command names, task commands included so i'd like to ask if someone can tell me the motivations that stands behind this chioce.

      Am i wrong in thinking about managing jbpm tasks through esb messages?
      Is there some other method i'm not aware of to achieve the same results? maybe using CallBack Command?

      Thanks for your explanations

        • 1. Re: jbpm integration: task commands
          kconner

          There has never been any intention to support worklists from within the ESB, if that is what you are asking. This was always intended to be driven through integration with jBPM.

          What are the use cases you are considering?

          • 2. Re: jbpm integration: task commands
            p.gentili

            Hi Kevin and thanks for you reply.

            I'll try to explain what i want to do:

            I've got an opensource ERP/CRM system (http://www.opentaps.org/)
            with a web interface where employees of my company go to execute thier activities that basically consist of compiling forms and submitting them.

            I want to orchestrate all theese human activities as parts of jbpm processes, using jbossESB as interconnection layer between the ERP system and workflow engine.

            When the employee connects to ERP system, he goes to his personal task list page. Now the ERP should get task list data from jbpm invoking an esb service whose action pipeline contains a BPMProcessor that sends a "GetTaskListCommand" to jbpm. When action pipeline finish a message with results is returned to the ERP who can display to the user a page with his assigned tasks.

            When employee has finished working on that task he should submit a form to ERP system. Now, as for the GetTaskList case, the ERP should invoke another esb service whose action pipeline contains a BPMProcessor that sends another type of command to jbpm: "TaskEndCommand", so that jbpm can continue the execution of the process.

            In other words i would like to extend BPMProcessor to make it able to send jbpm all commands related to task lifecycle events.

            I've allready implemented the capability to send TaskEndCommand,
            here is the xml i use:

            <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="contactReviewTaskEndBpmProcessorAction">
             <property name="command" value="TaskInstanceEndCommand"/>
             <property name="task-instance-id" value="93"/>
             <property name="transition-name" value="accept"/>
            </action>
            



            The value of "task-instance-id" should be set dinamically after getting the value from task list in a previous invocation of GetTaskListCommand but this is a very work in progress.

            Regards
            Paolo