AnsweredAssumed Answered

Error in deploying custom workflow in Alfresco 4.0

Question asked by sradha on Oct 23, 2012
Latest reply on Oct 24, 2012 by amandaluniz_z
Hi,


I have created a custom workflow using activity.for this I have created a custom worklflow and initialize a spring bean.But I am getting the following error–


Started at:
      java.util.ArrayList.RangeCheck(ArrayList.java:547)
      java.util.ArrayList.get(ArrayList.java:322)
      org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:115)
      org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.deployDefinition(ActivitiWorkflowEngine.java:342)
      org.alfresco.repo.workflow.WorkflowServiceImpl.deployDefinition(WorkflowServiceImpl.java:208)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      org.springframework.aop.framew
   /alfresco-api/post/WorkflowService/deployDefinition/args/mimetype=text/xml
2012-10-23 19:27:23,595  ERROR [web.context.ContextLoader] [main] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 09230000 Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:347)
   at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:465)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:516)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:461)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.RangeCheck(ArrayList.java:547)
   at java.util.ArrayList.get(ArrayList.java:322)
   at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:115)
   at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.deployDefinition(ActivitiWorkflowEngine.java:342)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.deployDefinition(WorkflowServiceImpl.java:208)
   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.proceedWithAudit(AuditMethodInterceptor.java:245)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:211)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:164)
   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 $Proxy66.deployDefinition(Unknown Source)
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:301)
   … 37 more


my custom workflow model context file  code are posted below:-


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<bean id="sc.workflowBootstrap" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>

                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/workflows/MyProcess.bpmn20.xml</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">false</prop>
                </props>
            </list>
        </property>
        <property name="models">
            <list>
                <value>alfresco/extension/model/scWorkflowModel.xml</value>
            </list>
        </property>
        <property name="labels">
            <list>
                <value>alfresco.extension.messages.scWorkflow</value>
            </list>
        </property>
    </bean>

</beans>


Can anybody help me? It is urgent

Outcomes