cancel
Showing results for 
Search instead for 
Did you mean: 

Running Activiti on WebSphere Application Server

b_schnarr
Champ in-the-making
Champ in-the-making
We want to execute Activiti 5.15 on a WebSphere Application Server. I googled a lot and the only thing I found is the message that this would be very tricky.

Therefore my question: is there any tutorial / documentation for this?
Are there any restrictions or developing tasks to get Activiti work in WebShpere?

Thanks and best regards
Ben
15 REPLIES 15

jayblanc1
Champ in-the-making
Champ in-the-making
Hi Heiko,

I'm pretty intrested in your solution. I'm working on wildfly but I had the same approach than you to inject the container managed thread pool executor provided by JEE7. I have wrote my own JobExecutor and everything works fine as asyn service tasks are executed in manged thread according to log.
Now I'm facing another problem regarding authentication. When calling EJB from Service Task, initial context of workflow execution (aka the initier logged in when starting the workflow instance) is lost when service task execute and, because I use security domain, unauthentified service task thread is not able to make the EJB call due to security restrictions…
Before embedding activiti in my application, I had code a very simple task manager which was using an Executor too but also the ContextService in order to create Threads keeping the original EJB caller SecurityContext…
I don't see how to handle security problem (a kind of runas) from the activiti async thread to be able to be authentified…
I haven't understand precisly where you use the @Asynchronous EJB call in order to keep some Context information like Transaction and if it is suitable for my needs.
Could you please give me some sample code or a little bit more information about your solution ?

Best Regards, Jérôme.

mvharish
Champ on-the-rise
Champ on-the-rise
Hello Heiko,
Nice explanation you have provided , but what i have found is that by using Activiti with SpringprocessEngineconfiguration over websphere in a jndi based datasource we will always be connected to public schema and no where i have found that we can specify our own schema if we use jndi based datasource for that approach we need to use jdbc type datasource which is sometimes not desirable.

Thanks,
Harish

jbarrez
Star Contributor
Star Contributor
Is this specific to jndi? Or is this a general Activiti problem?

mvharish
Champ on-the-rise
Champ on-the-rise
it looks like activiti problem as specifying datatableprefix prefix in SpringProcessEngineConfiguration doesnt takes the value as database schema in the jndi datasource.

mvharish
Champ on-the-rise
Champ on-the-rise
am using below configuration
<bean id="transactionManager"
class="org.springframework.transaction.jta.WebSphereUowTransactionManager"/>

<!– process engine configuration –>
<bean id="processEngineConfiguration"
class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSourceJndiName" value="XXXWDS" />
<property name="databaseTablePrefix" value="ACTIVITI." />
<property name="databaseSchema" value="ACTIVITI" />
<property name="transactionManager" ref="transactionManager" />
<property name="transactionsExternallyManaged" value="true" />
<property name="databaseSchemaUpdate" value="false" />
<property name="mailServerHost" value="localhost" />
<property name="mailServerPort" value="2525" />
</bean>

<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>

<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
</beans>


but it gives me empty stack trace error

jbarrez
Star Contributor
Star Contributor
an empty stack trace? that sounds very strange.

The prefix is applied to all queries through MyBatis, so it shouldn't matter which approach you use, jndi or direct. When do you see that it is not workin? During boot? Or during some process execution?