cancel
Showing results for 
Search instead for 
Did you mean: 

Custom workflow deployment

nikes
Champ on-the-rise
Champ on-the-rise
Can anybody guide how to deploy custom workflow in Alfresco?

I have gone through http://wiki.alfresco.com/wiki/WorkflowAdministration
but i am confused with the location of files and its naming conventions.

I am using tomcat now for testing.
Do I have to put files in files in tomcat\shared\classes folder or tomcat\webapps\alfresco\web-inf\classes folder?

Can we use web-client-config.xml or we have to create new custom file for web-client configuration?

Thanks,
Nikesh
5 REPLIES 5

mrogers
Star Contributor
Star Contributor
Although it will work you should avoid touching the files in the alfresco webapp since they will get overwritten on an upgrade.   This applies to all of alfresco configuration including workflow.

So your customisations (of any sort) always go into the shared folder.

On the same lines you could hack the web-client config (again it will work) however you are probably better off adding your own separate config files for your workflow.

nikes
Champ on-the-rise
Champ on-the-rise
I am getting following error on console…….


19:50:22,500 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Workflow deployment failed
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:324)
   at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:431)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:437)
   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:427)
   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   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:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/scWorkflowModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:147)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:254)
   … 36 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to compile model scwf:workflowmodel
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:217)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:143)
   … 38 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Mandatory aspect scwf:thirdPartyReviewable of class scwf:submitReviewTask is not found
   at org.alfresco.repo.dictionary.M2ClassDefinition.resolveDependencies(M2ClassDefinition.java:218)
   at org.alfresco.repo.dictionary.CompiledModel.resolveDependencies(CompiledModel.java:236)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:98)
   … 41 more


Please guide.
Thanks,
Nikesh

nikes
Champ on-the-rise
Champ on-the-rise
I renamed mt processdefinition file and now I am able to start Alfresco server.

But when I start advanced workflow, I get following error on web client page….

org.alfresco.service.namespace.NamespaceException: Namespace prefix wf is not mapped to a namespace URI

How to overcome this error?

Thanks,
Nikesh

nicolasc
Champ in-the-making
Champ in-the-making
Hi,
You have to declare your namespace in a custom model xml file , like this

<namespaces>
        <namespace uri="<uri>" prefix="wf" />
</namespaces>

I have the same problem you had. How did you rename uour process definition file. Mine is like custom-process-definition.xml and doesn't work.

Thanks

nikes
Champ on-the-rise
Champ on-the-rise
Your filename should end with "_processdefinition.xml"

Hope it will help.