2 Replies Latest reply on Feb 5, 2013 5:25 AM by fludimir

    Integration with not Java application

    fludimir

      I need to integrate BPM system in application written on PHP(Symfony2) and ExtJS4. For example, in my app there are entities called 'knowledge document' - this is pdf file and some text metadata, user is allowed to upload it, document manager allowed to accept/decline it. I need to create same task in jBPM and integrate it with my app - ie when process in jBPM will be finished my application should update data - get document if it was accepted in jBPM or log document decline.

       

      Ideally workflow should be like this:

      User logins in current application,  clicks on link 'BPM'   and starts work on 'knowledge document' process - uploads file

      Document Manager  also logins in app, opens BPM and finishes process - accepting file for example

      Document saved in application

       

      Looks like I have three  main tasks:

      Make jBPM to use users from my app - dont even know how. I can make web api for users, or allow to use users table in db..

      Render forms using ExtJS instead of jBPM html forms - this will be possible if I can get form definition from api

      Save data in app after process in jBPM is finished (either sending request from jBPM to application, or getting data from jBPM REST API by notification/cron)

       

       

      I'm new with BPM and actually with Java too, and lot of things are not clear for me, any help will be very useful

        • 1. Re: Integration with not Java application
          vchmakov

          Hi,

           

          That is exactly what we do – we integrate non-Java system with Drool/jBPM application. In fact – we extend/enrich functionality of the old application server with powerful rule and workflow engine. Here is how:

           

          Our main system is written in Delphi. It is a multi-tier system. Clients send and receive messages to/from the Application Server. The Application Server communicates with the Rule Service via ActiveMQ. At the moment the Rule Service is a Java SE application which we run as a Windows Service, but the new EE version is about to go into testing and it will be running under the JBoss AS 7. The frontend of the Task Manager is a JSF application under the JBoss AS 7. We present our own Task List to the users as we need to display a lot of custom information stored as a part (content) of each task. We develop our own approval forms as the complexity of the layout is much higher than any editor can allow to resolve. Approval pages are resolved by a JSF router based on the Task ID, i.e. each approval page bears the name of the task. Approve/Reject commands are sent to the Rule Service via Active MQ for processing.  The communication protocol between Rule Service, Task Manager and Delphi system is designed as a set of messages that are defined in XML. Delphi and Java classes and the serialization code is generated with Free Marker templates. This makes Delphi and Java understand each other perfectly and I’d say natively as both sides are working on the same set of commands/classes.

          Here is just one example of the workflow we run.

          1)      A client starts a process by pressing a button on a Delphi form. Business logic says that before the system would start the workflow, the data validation must be performed. A message is sent to the Rule Service which employs a set of the Drools rules to perform a validation. This makes the process flexible, extensible and adaptable. Validation results are then sent back to the client. Validation results are presented to the user and a decision is made if the approval process can actually start.

          2)      If approval can start, then a message is sent to the Rule Service which accepts a command as a Drools event and starts the jBPM process, which creates a Human task. The user is then notified by e-mail that a task has been created for him/her.

          3)      User opens a Delphi form which in fact encapsulates an instance of a web-browser and connects to the Task Server (JBoss AS 7) . The user is able to see only those tasks which are allowed by security rules. User selects a task and presses “Work On Task” button which routes him/her to an  approval page.

           

          I can assure that nothing listed above is difficult. Drools/jBPM engine is extremely flexible, can be adapted easily and can run in both SE and EE environment. It is natural enough that it has certain flaws, but that is why we all are here: to make it perfect.

           

          Have fun!

           

          HTH

           

          Vladimir

          • 2. Re: Integration with not Java application
            fludimir

            Thanks vchmakov, but I'm not sure that your solution can help me - I need not Delphi forms but web forms, integrated in my web app, and I need run it on linux server. I need solution for three tasks I described above