Wednesday, June 22, 2016

camunda BPM platform OSGi 2.0.0 released

It has been a while since we had the last release of camunda BPM platform OSGi that included some new features and I am glad to be able to announce the new major version today.

The new version includes one new feature,some dependency adjustments and a restructuring of the whole project.

The new feature is the OSGi Event Bridge, which I already explained here. So now you'll be able to receive camunda process events in an OSGi way.

The most notable change in the dependencies is the change from OSGi 4.2 to version 4.3. This version enables e.g. the usage of generics and of the Require-Capabilityand Provide-Capability headers (one example how you could use them is explained in another blog post).

Finally, the whole project is now more modularized. Using one of the 1.x.x versions, many features were included in the camunda-bpm-osgi module, which you always needed. That ways, you would always have the classes for file install, process application or Blueprint present, if you used them or not. With the new structure you can better choose, which features you want to use and which not to.

Configadmin, Fileinstall and Processapplication are now separate bundles and no longer contained in camunda-bpm-osgi. What is left in the "main" module are the capabilities to find process definitions in your bundles, EL resolving, locating scripting engines and utility classes, e.g. for classloading. Also, all integration tests (except for the Karaf ones), are now located in a central itest module.

I hope all those changes ease the use for you to combine the powers of OSGi and camunda BPM. If you have any feedback or would like to make a wish for a new feature, feel free to leave a comment, open an issue on GitHub or open a pull request.

11 comments:

  1. On which version of Camunda BPM is it based? 7.4 or already 7.5?

    ReplyDelete
    Replies
    1. It is based on 7.5. This time I wanted to follow the camunda BPM release quickly.

      Delete

  2. favorite
    I`m trying to deploy a process where I use (https://github.com/rbraeunlich/camunda-bpm-processapplication-example/blob/master/process-application) this example. I am able to deploy my process successfully by following this (https://github.com/camunda/camunda-bpm-platform-osgi/tree/master/camunda-bpm-karaf-commands)

    I can see these many commands in my karaf

    karaf@default> help
    COMMANDS
    ...
    camunda:activity-list List activities.
    camunda:deployments-list List camunda deployments.
    camunda:execution-list List process executions by process definition.
    camunda:export-diagram Export definition of a diagram
    camunda:instance-list List process instances of a specific process definition.
    camunda:process-list List process definitions.
    camunda:task-list List tasks for a specific process definition.
    camunda:variable-list List variables on a specific instance.
    My question is after deploying this process how to instantiate it?

    ReplyDelete
    Replies
    1. Dear Keshav,
      there is currently no Karaf command implemented to directly start a process. You basically have two choices to start your process:
      1. Use a bundle activator, which looks up the ProcessEngine as service and starts the process.
      2. Directly start your process within your ProcessApplication subclass.

      For the latter case, you can take a look at the test case here [1]. The class has a @PostDeploy in which you could start your process instance e.g.

      I think adding a new Karaf command which allows starting a process would also be a good idea. Feel free to open a GitHub issue (and maybe create a pull request ;) ).

      Cheers,
      Ronny

      [1] https://github.com/camunda/camunda-bpm-platform-osgi/blob/master/camunda-bpm-osgi-itest/src/test/java/org/camunda/bpm/extension/osgi/itest/application/MyProcessApplication.java

      Delete
  3. Dear Ronnie,

    First of all thankyou so much for your prompt reply.

    I tried 2nd method and add this piece of code in my ExampleProcessApplication class
    @PostDeploy
    public void sayHello(ProcessEngine processEngine) {
    try {

    ProcessInstantiationBuilder x=processEngine.getRuntimeService().createProcessInstanceById("Process_1");
    x.execute();
    } catch (Exception e) {
    e.printStackTrace();
    }
    }
    But now when i start my bundle i am getting this error:

    There is no process definition deply with id "Process_1"
    and then NULL time exception.

    It would be really helpful if you can tell me the problem in this method or how should i proceed further?

    ReplyDelete
    Replies
    1. Dear Keshav,
      firstly, if you use the Karaf command, does your process definition show up?
      Secondly, you shouldn't use createProcessInstanceById() but startProcessInstanceByKey() from the RuntimeService. If your BPMN file looks like this:

      Then the key is "Process_1". The id of a process is something more technical.
      I hope this helps.
      Cheers,
      Ronny

      Delete
  4. Dear Ronny,

    Thank you so much for your prompt reply,I really appreciate your help.You saved my time and project.
    startProcessInstanceByKey() worked.

    ReplyDelete
  5. Dear Ronny,

    As i am able to start my process inside this bundle.Now i want to use REST API in karaf environment so that i can start process when i get some external triggering.

    I installed camunda-bpm-karaf-feature-minimal by following this https://github.com/camunda/camunda-bpm-platform-osgi/tree/master/camunda-bpm-karaf-feature.

    I am not able to install feature:install camunda-bpm-karaf-feature-full(I am using apache karaf 3.0.7) error msg is as follows:

    Missing requirements osgi.wiring.package=javax.transaction
    I couldn't find how to install version 1.3.

    Do i need to install any other bundle for REST API in karaf environment and is there any example after https://github.com/camunda/camunda-bpm-platform-osgi

    I also want to know by default what is the port of camunda-bpm-engine in karaf environment ?

    Thanks!!

    ReplyDelete
  6. Dear Ronny,

    I am able to start my process by using @PostDeploy as suggested by you.

    Now i don't want to use @PostDeploy method to start my process i want to use service consumer of this post and org.camunda.bpm.application.ProcessApplicationInterface provided by my process application example.
    So I imported service consumer from (http://wrongtracks.blogspot.in/2014/05/consuming-arbitrary-remote-services.html) example and change process1.bpmn by my process.bpmn and change context.xml of service consumer by changing



    as follows:




    i am able to successfully start this bundle in my bundle but it didn't start the process.
    Please enlighten me.Thanks :)

    ReplyDelete
    Replies
    1. Dear Keshav,

      could you please repost your questions in the camunda forum?
      That ways, others might help you and people with the same problem can find a solution, too. Of course, I'll answer there, too.
      The URL is this: https://forum.camunda.org/c/community-extensions

      Cheers,
      Ronny

      Delete
  7. Dear Ronny,

    I have posted my question there.
    Awaiting for reply from Camunda-BPM enthusiast.

    Thanking you,
    Keshav Taparia

    ReplyDelete

 

Copyright @ 2013 Wrong tracks of a developer.

Designed by Templateiy