fbm fatma
fbm fatma

Reputation: 450

Workflow deployment issue

I am currently developping a java application using Alfresco as GED and activiti as workflow engine. I want to deploy the workflows but i don't know why it dosen't work ? when i run it with eclipse i got this error:

2017-02-21 15:57:42,282  ERROR [transform.magick.AbstractImageMagickContentTransformerWorker] [localhost-startStop-1] ImageMagickContentTransformerWorker not available: 01210001 Failed to perform ImageMagick transformation: 
Execution result: 
   os:         Windows 10
   command:    ./ImageMagick/bin/convert C:\Users\BM-PC\Desktop\PFE\pfeworkspace2\test\target\Alfresco\ImageMagickContentTransformerWorker_init_source_2752563565323047204.gif C:\Users\BM-PC\Desktop\PFE\pfeworkspace2\test\target\Alfresco\ImageMagickContentTransformerWorker_init_target_7480441981386765009.png
   succeeded:  false
   exit code:  1
   out:        
   err:        Cannot run program "./ImageMagick/bin/convert": CreateProcess error=2, Le fichier spécifié est introuvable
 2017-02-21 15:57:42,283  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
 2017-02-21 15:57:42,283  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'OOoDirect' subsystem, ID: [OOoDirect, default]
 2017-02-21 15:57:43,168  ERROR [util.exec.RuntimeExecBootstrapBean] [localhost-startStop-1] Bootstrap command failed: 
Execution result: 
   os:         Windows 10
   command:    soffice -accept=socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager -env:UserInstallation=file:///C:/Users/BM-PC/Desktop/PFE/pfeworkspace2/test/alf_data_dev/oouser -headless -nocrashreport -nofirststartwizard -nologo -norestore
   succeeded:  false
   exit code:  2
   out:        
   err:        Cannot run program "soffice": CreateProcess error=2, Le fichier spécifié est introuvable
 2017-02-21 15:57:45,246  WARN  [alfresco.util.OpenOfficeConnectionTester] [localhost-startStop-1] An initial OpenOffice connection could not be established.
 2017-02-21 15:57:45,251  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'OOoDirect' subsystem, ID: [OOoDirect, default] complete
 2017-02-21 15:57:45,258  INFO  [repo.admin.ConfigurationChecker] [localhost-startStop-1] The Alfresco root data directory ('dir.root') is: C:\Users\BM-PC\Desktop\PFE\pfeworkspace2\test\alf_data_dev
 2017-02-21 15:57:45,259  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Search' subsystem, ID: [Search, hidden]
 2017-02-21 15:57:47,690  ERROR [lucene.fts.FullTextSearchIndexerBootstrapBean] [localhost-startStop-1] The lucene search subsystem is not supported. Please see http://docs.alfresco.com/null.null/tasks/lucene-solr4-migration.html
 2017-02-21 15:57:47,694  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Search' subsystem, ID: [Search, hidden] complete
 2017-02-21 15:57:47,730  INFO  [admin.patch.PatchExecuter] [localhost-startStop-1] Checking for patches to apply ...
 2017-02-21 15:57:48,707  INFO  [admin.patch.PatchExecuter] [localhost-startStop-1] No patches were required.
 2017-02-21 15:57:48,732  INFO  [repo.module.ModuleServiceImpl] [localhost-startStop-1] Found 2 module package(s).
 2017-02-21 15:57:48,749  INFO  [repo.module.ModuleServiceImpl] [localhost-startStop-1] Starting module 'test' version 1.0-SNAPSHOT.
 2017-02-21 15:57:48,761  INFO  [repo.module.ModuleServiceImpl] [localhost-startStop-1] Starting module 'alfresco-share-services' version 5.1.0.
 2017-02-21 15:57:48,767  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'fileServers' subsystem, ID: [fileServers, default]
 2017-02-21 15:57:50,050  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
 2017-02-21 15:57:50,086  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
 2017-02-21 15:57:50,114  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
 2017-02-21 15:57:50,115  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'imap' subsystem, ID: [imap, default]
 2017-02-21 15:57:50,331  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'imap' subsystem, ID: [imap, default] complete
 2017-02-21 15:57:50,331  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'email' subsystem, ID: [email, outbound]
 2017-02-21 15:57:52,274  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'email' subsystem, ID: [email, outbound] complete
 2017-02-21 15:57:52,274  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'email' subsystem, ID: [email, inbound]
 2017-02-21 15:57:52,417  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'email' subsystem, ID: [email, inbound] complete
 2017-02-21 15:57:52,417  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Subscriptions' subsystem, ID: [Subscriptions, default]
 2017-02-21 15:57:52,463  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Subscriptions' subsystem, ID: [Subscriptions, default] complete
 2017-02-21 15:57:52,503  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
 2017-02-21 15:57:53,117  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
 2017-02-21 15:57:53,142  INFO  [service.descriptor.DescriptorService] [localhost-startStop-1] Alfresco JVM - v1.8.0_121-b13; maximum heap size 247,500MB
 2017-02-21 15:57:53,143  WARN  [service.descriptor.DescriptorService] [localhost-startStop-1] Alfresco JVM - WARNING - maximum heap size 247,500MB is less than recommended 512MB
 2017-02-21 15:57:53,143  INFO  [service.descriptor.DescriptorService] [localhost-startStop-1] Server Mode :UNKNOWN
 2017-02-21 15:57:53,154  INFO  [service.descriptor.DescriptorService] [localhost-startStop-1] Alfresco started (Community). Current version: 5.1.0 (r122274-b3) schema 9 016. Originally installed version: 5.1.0 (r122274-b3) schema 9 016.
 2017-02-21 15:57:53,164  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default]
 2017-02-21 15:57:53,618  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'ActivitiesFeed' subsystem, ID: [ActivitiesFeed, default] complete
 2017-02-21 15:57:53,618  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'Replication' subsystem, ID: [Replication, default]
 2017-02-21 15:57:53,699  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'Replication' subsystem, ID: [Replication, default] complete
 2017-02-21 15:57:59,568  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
 org.alfresco.error.AlfrescoRuntimeException: 01210002 Workflow deployment failed
    at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:351)
    at org.alfresco.repo.workflow.WorkflowDeployer$1$1.doWork(WorkflowDeployer.java:512)
    at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
    at org.alfresco.repo.workflow.WorkflowDeployer$1.execute(WorkflowDeployer.java:508)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
    at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:503)
    at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
    at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: class path resource [alfresco/module/test/workflows/helloWorldFork.bpmn] cannot be opened because it does not exist
    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:171)
    at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:299)
    ... 24 more

This is my module-context.xml file

<?xml version='1.0' encoding='UTF-8'?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. 
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <!-- This is filtered by Maven at build time, so that module name is single sourced. -->
    <!-- Note. The bootstrap-context.xml file has to be loaded first.
                Otherwise your custom models are not yet loaded when your service beans are instantiated and you
                cannot for example register policies on them. -->

    <bean id="${project.artifactId}.workflowBootstrap" parent="workflowDeployer">
    <property name="workflowDefinitions">
        <list>
            <props>
                <prop key="engineId">activiti</prop>
                <prop key="location">alfresco/module/${project.artifactId}/workflows/helloWorld.bpmn</prop>
                <prop key="mimetype">text/xml</prop>
                <prop key="redeploy">false</prop>
            </props>
            <props>
                <prop key="engineId">activiti</prop>
                <prop key="location">alfresco/module/${project.artifactId}/workflows/helloWorldFork.bpmn</prop>
                <prop key="mimetype">text/xml</prop>
                <prop key="redeploy">false</prop>
            </props>
        </list>
    </property>
</bean>
    <import resource="classpath:alfresco/module/${project.artifactId}/context/bootstrap-context.xml" />
    <import resource="classpath:alfresco/module/${project.artifactId}/context/service-context.xml" />
    <import resource="classpath:alfresco/module/${project.artifactId}/context/webscript-context.xml" />

</beans>

Upvotes: 0

Views: 583

Answers (2)

Ben Chevallereau
Ben Chevallereau

Reputation: 439

If you look at the code, you can see that it fails to create the workflow because it can't find the file:

Caused by: java.io.FileNotFoundException: class path resource [alfresco/module/test/workflows/helloWorldFork.bpmn] cannot be opened because it does not exist

Check if it's the right file path, and most importantly file extension.

Ben

this is myproject structure enter image description here

Upvotes: 2

fbm fatma
fbm fatma

Reputation: 450

it works now in the helloWorldFork.bpmn file i have extra space ;)

Upvotes: 0

Related Questions