cancel
Showing results for 
Search instead for 
Did you mean: 

Exposing the Activiti engine through REST in OSGi container Virgo

dimitrihautot
Champ in-the-making
Champ in-the-making
Hello community,

This is my first post on the developers forum, let me briefly introduce myself.

I am a (Belgian) Java developer for more than 10 years, having worked in 3 IT services companies.
I keep an eye on OSGi for years, without a chance to use it at work…

… until recently! Indeed, for my current mission, I am developing a proof-of-concept project where the Activiti engine would only be accessible through REST API, and running inside an OSGi container.

The rewritten REST API that appeared in release 5.13 is great news!

However, even if the Activiti engine itself can be used as a valid OSGi bundle, this is neither the case of the activiti-rest-5.13.jar , nor of some other, dependent Activiti Jar files.
So I keep fetching the sources from GitHub and I patch the various pom.xml files locally.
Once I get something stable and clean, I will create a pull request.

So far I have been able to generate valid OSGi bundle headers for several modules: activiti-bpmn-layout, activiti-common-rest, activiti-json-converter, activiti-rest and activiti-simple-workflow.

I try to package my POC application as an Eclipse Virgo plan file.
The first big issue I just encountered is the fact that modules activiti-common-rest and activiti-rest share the same package,
org.activiti.rest
. This is explicitly forbidden for Virgo plan files. I will create a JIRA ticket for that issue.


The aim of this post is just to introduce the work I am currently performing, see if there are other persons interested, share experience, receive guidance, …

If this message inspire you some thought, please share it with me! 🙂
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Ok thanks for the introduction, we'll look at the package names.

Best regards,

dimitrihautot
Champ in-the-making
Champ in-the-making
Hi,

Here is the JIRA issue I created: http://jira.codehaus.org/browse/ACT-1786

beattidp
Champ in-the-making
Champ in-the-making
Looking at recent commit history, it almost sounded like the changes had been integrated from pull requests, to achieve "bundle status" for remaining jars. Today's build says otherwise. In fact, 10 out of 17 modules checked have no Bundle information; i.e. are not valid bundles.
    activiti-common-rest-5.14-SNAPSHOT.jar
    activiti-cxf-5.14-SNAPSHOT.jar
    activiti-diagram-rest-5.14-SNAPSHOT.jar
    activiti-explorer-5.14-SNAPSHOT.jar
    activiti-json-converter-5.14-SNAPSHOT.jar
    activiti-modeler-5.14-SNAPSHOT.jar
    activiti-mule-5.14-SNAPSHOT.jar
    activiti-rest-5.14-SNAPSHOT.jar
    activiti-simple-workflow-5.14-SNAPSHOT.jar
    activiti-spring-5.14-SNAPSHOT.jar
Module 'activiti-bpmn-layout' also shows a missing/empty 'Bundle-SymbolicName'.

<blockcode>
$ date -u
Thu Oct 17 17:02:07 UTC 2013
$ svn checkout https\://github.com/Activiti/Activiti
$ cd ./Activiti/trunk/
$ mvn -P distro verify
$ find . -maxdepth 4 -type f -name "*SNAPSHOT.jar" -exec unzip -c {} META-INF/MANIFEST.MF \; | egrep "ArchiveSmiley IndifferentBundle-Version|Bundle-SymbolicName"
Archive:  ./modules/activiti-bpmn-converter/target/activiti-bpmn-converter-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.bpmn.converter
Archive:  ./modules/activiti-bpmn-layout/target/activiti-bpmn-layout-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName:
Archive:  ./modules/activiti-bpmn-model/target/activiti-bpmn-model-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.bpmn.model
Archive:  ./modules/activiti-camel/target/activiti-camel-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.camel
Archive:  ./modules/activiti-common-rest/target/activiti-common-rest-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-cxf/target/activiti-cxf-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-diagram-rest/target/activiti-diagram-rest-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-engine/target/activiti-engine-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.engine
Archive:  ./modules/activiti-explorer/target/activiti-explorer-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-json-converter/target/activiti-json-converter-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-ldap/target/activiti-ldap-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.ldap
Archive:  ./modules/activiti-modeler/target/activiti-modeler-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-mule/target/activiti-mule-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-osgi/target/activiti-osgi-5.14-SNAPSHOT.jar
Bundle-Version: 5.14.0.SNAPSHOT
Bundle-SymbolicName: org.activiti.osgi
Archive:  ./modules/activiti-rest/target/activiti-rest-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-simple-workflow/target/activiti-simple-workflow-5.14-SNAPSHOT.jar
Archive:  ./modules/activiti-spring/target/activiti-spring-5.14-SNAPSHOT.jar
</blockcode>

ACT-1786 is closed; says this was "fixed by pull request 134."  …perhaps I am building the wrong branch?

.

[size=10]
This is all a very interesting development either way. As I found this thread, started by Dimitri just a few weeks ago, it was encouraging to know I wasn't the only one doing proof-of-concept work with Activiti, specifically for an Eclipse Virgo target.  ( http://projects.eclipse.org/projects/rt.virgo )
[/size]

trademak
Star Contributor
Star Contributor
You're right. All these JARs now have a valid OSGi bundle name in the MANIFEST.MF file.

Thanks,