AnsweredAssumed Answered

Activiti and Karaf

Question asked by bkonrad on Aug 12, 2014
Latest reply on Aug 13, 2014 by bkonrad
Activiti 5.16 is now OSGi compatible and Apache Karaf is a great environment to run Activiti. After some time I managed to install the engine as bundles in Apache Karaf.
My first question is: Is there a standard provisioning for installing Activiti in Karaf (i.e. a feature.xml)?

What I did is to implement a bundle exposing activiti services.
My current problem is, that deploying a new process causes that the process image can not be created because of classloader issues:

2014-08-11 10:18:20,041 | WARN  | ExtenderThread-4 | BpmnDeployer                     | 218 - org.activiti.engine - 5.16.0 | Error while generating process diagram, image will not be stored in repository
java.lang.IllegalArgumentException: input == null!
   at javax.imageio.ImageIO.read(ImageIO.java:1348)
   at org.activiti.image.impl.DefaultProcessDiagramCanvas.initialize(DefaultProcessDiagramCanvas.java:218)


Is this a known bug running activiti in OSGi?

This snippet is from bundle exposing activiti as OSGi Services:

        <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
      <property name="enableDatabaseEventLogging" value="true" />
      <!– property name="expressionManager" ref="osgiExpressionManager" /–>
   </bean>
   <bean id="processEngineFactory" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
      <property name="processEngineConfiguration" ref="processEngineConfiguration" />
   </bean>
   <bean id="processEngine" factory-bean="processEngineFactory" factory-method="getObject" />
   <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
   <osgi:service id="repositoryServiceOsgi" ref="repositoryService" interface="org.activiti.engine.RepositoryService" />
   <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
   <osgi:service id="runtimeServiceOsgi" ref="runtimeService" interface="org.activiti.engine.RuntimeService" />

Outcomes