3 Replies Latest reply on Jan 3, 2013 1:59 AM by Umesh Bude

    jBPM REST API for custom client application

    jhrobbin Newbie

      Hi folks,

       

      I'd appreciate some suggestions on the topic of exposing jBPM REST API to a custom client application.

       

      Cliff Notes:

      Bulding a custom smartphone app (not just using BPM Console client).  Better to re-use the REST API already exposed by the Console-Server or roll our own REST API for jBPM?  (See details below for better explanation)

       

      Details:

      Let's say we want to build a smartphone app that provides a small subset of what the BPM Console browser app does along with some other functionality specific to our own application.  To be clear, the smartphone app doesn't just interact with jBPM.  If that were the case, then I assume it would be a no-brainer to have the smartphone app directly hit the Console-Server.

       

      I'm thinking the smartphone app makes REST calls to our own server API.  From there, one option would be for our server API to make REST API calls to the Console-Server (also running in our server environment) for jBPM related things like get a list of tasks, claim a task, etc.

       

      Would that be preferrable to rolling our own?  Or would it be better to skip using the Console-Server and have our API server side code use the jBPM Java API instead.  I'm assuming I can do things like get a list of tasks for a user, claim a test, etc using the jBPM Java API (I haven't dug deep into the capabilities of the jBPM Java API).  I have seen the list of available URIs prvided by the Console-Server so I think I have a handle on what the Console-Server API exposes.

       

      Many thanks for your input.

        • 1. Re: jBPM REST API for custom client application
          Maciej Swiderski Master

          I can see two options here that depends on your needs:

          1. use console server REST api if you plan to employ the usage of console in your case as well, not talking about using it from the smartphone app but rather for admins/operators to perform additional actions on the processes and tasks

          2. if option one is not valid in your case then I would go for using jBPM API instead of adding unnecessary layer (console server REST api) that will do pretty much the same what you need to do while embedding jBPM into your application

           

          HTH

          • 2. Re: jBPM REST API for custom client application
            Newbie

            Can you please provide me any sample/guide? By using that i can call any process instance running in BPM engine. The issue i am facing is bypassing the "Form Based Authentication". Once i bypass the authentication part from my web module and then i can access the JSON file by invoking/reading using the REST call, and after that the rest of the part is pretty simple. I will appreciate if you can throw some light on this.

            • 3. Re: jBPM REST API for custom client application
              Umesh Bude Newbie

              Did you find solution for this problem? I'm facing similar challenge. I tried removing security filter entry in web.xml of jbpm-console. It helps in getting rid of authentication layer, but the problem is, few rest api calls are stateful and they fail if we remove auth layer.

               

              Have you considered upon security if you bypass the auth layer? In my case, my custom app and the jbpm console, both will be behind a firewall. I'll provide authentication from my custom app and jbpm console rest api will be reachable only from my custom web app.