cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade Activiti 5.7 to 5.8 (5.9) into Alfresco 4.0.d

angello0571
Champ on-the-rise
Champ on-the-rise
Hello,

I am trying to upgrade the Activiti's engine that has Alfresco 4.0.d

The steps I'm doing are these:

1) I replaced the activiti's jar engine library and activiti spring library 5.7 in webapps/alfresco/WEB-INF/lib with:

activiti-engine-5.8.jar
activiti-spring-5.8.jar

2) In the activiti-context.xml I set the databaseSchemaUpdate to "true":

    <!– –>
    <!– Activiti Process Engine –>
    <!– –>
    <bean id="activitiProcessEngineConfiguration"
        class="org.alfresco.repo.workflow.activiti.AlfrescoProcessEngineConfiguration">
        <property name="dataSource" ref="wrappedDataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <!–property name="databaseSchemaUpdate" value="none" /–>
      <property name="databaseSchemaUpdate" value="true" />
      <!–property name="databaseSchemaUpdate" value="create-drop" /–>
        <property name="history" value="full" />

        <!– Job-executor will be enabled once the SchemaAvailableEvent has
            been fired –>
        <property name="jobExecutorActivate" value="false" />

        <!– Limit the visible beans in expressions –>
        <property name="beans" ref="activitiBeanRegistry" />

        <property name="customTypes">
            <list>
                <ref bean="activitiScriptNodeType" />
                <ref bean="activitiScriptNodeListType" />
            </list>
        </property>
        <property name="customPreBPMNParseListeners">
            <list>
                <ref bean="activitiParseListener" />
            </list>
        </property>
    </bean>

After that I looked into act_ge_property table to check the changes, now it looks as:


historyLevel        3   1
schema.history   create(5.7) upgrade( 5.7->5.8 )   3
schema.version   5.8   3
next.dbid   501   6

Then I run a workflow and it was successful but I have a trouble to fill the "My Task" dashlet. The log is showing an error:

2012-07-24 13:02:44,862  ERROR [extensions.webscripts.AbstractRuntime] [http-9000-1] Exception from executeScript - redirecting to status template error: 06240002 Wrapped Exception (with status template): org.activiti.engine.task.TaskQuery.taskCandidateGroupIn(Ljava/util/List;)Lorg/activiti/engine/task/TaskQuery;
org.springframework.extensions.webscripts.WebScriptException: 06240002 Wrapped Exception (with status template): org.activiti.engine.task.TaskQuery.taskCandidateGroupIn(Ljava/util/List;)Lorg/activiti/engine/task/TaskQuery;
   at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:970)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:393)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:462)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:500)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:316)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
   at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoSuchMethodError: org.activiti.engine.task.TaskQuery.taskCandidateGroupIn(Ljava/util/List;)Lorg/activiti/engine/task/TaskQuery;
   at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.addTasksForCandidateGroups(ActivitiWorkflowEngine.java:1499)
   at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.getPooledTasks(ActivitiWorkflowEngine.java:1461)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.getPooledTasks(WorkflowServiceImpl.java:713)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:147)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy71.getPooledTasks(Unknown Source)
   at org.alfresco.repo.web.scripts.workflow.TaskInstancesGet.buildModel(TaskInstancesGet.java:124)
   at org.alfresco.repo.web.scripts.workflow.AbstractWorkflowWebscript.executeImpl(AbstractWorkflowWebscript.java:80)
   at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
   … 25 more

My goal is upgrade the Activiti Engine to 5.9 in Alfresco 4.0.d , Does anybody know if it is possible?, or someone knows if I can run workflows designed in 5.9 in Alfresco 4.0.d ?

Thanks in advance for any help.
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

you can't simply drop in updated JARs, update the schema and automagically expect Alfresco to work with a significant new release of Activiti. The error you are receiving is about incompatible service interfaces. In order upgrade to Activiti 5.8 or 5.9, you would have to recompile the Alfresco Repository source code against the new libraries and fix any API issues in Alfresco source code - not to mention implicit or under-the-hood functional changes that might interfere with the way the integration has been implemented by Alfresco.
Unless you are a very experienced Java developer / architect and are unafraid to code with the internals of Alfresco and Activiti - or have simply too much free time at your disposal, which you'll probably need - I'd advise to not attempt such an upgrade. Even if you successfully complete it, you would be left in a maintenance hell, as you would have to support your changes yourself and probably would have to expect trouble upgrading Alfresco to the next version.

What are the significant new features of 5.8 or 5.9 that you would need in Alfresco? There must be a significant / worthwhile reason to upgrade and I'd be interested in hearing about it.

Regards
Axel

angello0571
Champ on-the-rise
Champ on-the-rise
Thank you for your reply and great explanation,

I red this article http://www.bpm-guide.de/2012/02/17/activiti-project-alive-and-kicking/ and I noticed there are good features for Activiti 5.9, and you are right, right now I have some free time "to do some experiments", and I wondered how it could be upgraded into the current version of Comunity, and it's clear that some or many Alfresco interfaces will fail, but You are absolutly right: "The maintenance and integretation will be so dificult".

Also I wanted to try if the Activiti Engine of Alfresco 4.0.d is able to parse BPMN process definitions designed with Activiti 5.9 Eclipse Plug-in. I tried to do that with a simple process definition and it worked. I guess the most of the main BPMN 2.0 constructs are available in this comunity version.

Best Regards.