cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with simple workflow

gm
Champ in-the-making
Champ in-the-making
I'm trying to write simple workflow and run it on Alfresco Share.
these are workflow definition and context files:

simpleTask.bpmn
<blockcode>
<?xml version="1.0" encoding="UTF-8"?>
<definitions
    xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:activiti="http://activiti.org/bpmn"
    typeLanguage="http://www.w3.org/2001/XMLSchema"
    expressionLanguage="http://www.w3.org/1999/XPath"
    targetNamespace="http://www.activiti.org/test">

    <process id="simpleProcess" name="Simple Workflow" isExecutable="true">
        <startEvent id="eventStart" name="Start"></startEvent>
        <userTask id="simpleTask" name="Simple Task" activiti:assignee="admin" activiti:formKey="bpm:workflowTask"></userTask>
        <endEvent id="eventEnd" name="End"></endEvent>
        <sequenceFlow id="flow1" sourceRef="eventStart" targetRef="simpleTask"></sequenceFlow>
        <sequenceFlow id="flow2" sourceRef="simpleTask" targetRef="eventEnd"></sequenceFlow>
    </process>
</definitions>

</blockcode>

simpleTas-workflow-context.xml

<?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="wf-simpleTask" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/extension/simpleTask.bpmn</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">false</prop>
                </props>
            </list>
        </property>
        <property name="models">
            <list>
                <value>alfresco/model/bpmModel.xml</value>
            </list>
        </property>
    </bean>
</beans>


I have deployed it. No errors are shown in alfresco log files.

In the Alfresco Share workflow shows in "Start Workflow" menu, but when I try to start it, "Failure - Workflow could not be started" error message pops up .

this is the exception that gets logged in share.log/catalina.log files:


10:56:56,796 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to
org.springframework.extensions.webscripts.WebScriptException: 01130000 Wrapped Exception (with status template): null
        at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
        at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContai
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
        at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:104
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
        at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
        at org.alfresco.web.scripts.forms.FormUIGet.processFieldConstraintControl(FormUIGet.java:1956)
        at org.alfresco.web.scripts.forms.FormUIGet.generateConstraintModel(FormUIGet.java:1816)
        at org.alfresco.web.scripts.forms.FormUIGet.processFieldConstraints(FormUIGet.java:1701)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFieldModel(FormUIGet.java:1315)
        at org.alfresco.web.scripts.forms.FormUIGet.generateDefaultSetModelUsingServerFields(FormUIGet.java:1255)
        at org.alfresco.web.scripts.forms.FormUIGet.processServerFields(FormUIGet.java:1117)
        at org.alfresco.web.scripts.forms.FormUIGet.processFields(FormUIGet.java:1058)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFormUIModel(FormUIGet.java:666)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFormModel(FormUIGet.java:609)
        at org.alfresco.web.scripts.forms.FormUIGet.generateModel(FormUIGet.java:265)
        at org.alfresco.web.scripts.forms.FormUIGet.executeImpl(FormUIGet.java:220)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        … 40 more




So, where is the problem here?
Thank you
5 REPLIES 5

ashpal19
Champ in-the-making
Champ in-the-making
Can you please change the redeploy property to true(simpleTas-workflow-context.xml) and try again.

You will keep getting an older error until you set redeploy to true. 

gm
Champ in-the-making
Champ in-the-making
done that.
only thing that changed is error code in share.log file:
WebScriptException code is now 01140000, otherwise same exception with same stack trace

ashpal19
Champ in-the-making
Champ in-the-making
Another thing which I noticed is activiti:formKey="bpm:workflowTask". I do not think you can have a bpm:xxx as the formkey. You will need to use something like -  wf:activitiReviewTask or something equivalent as the formkey. Or if you have defined your own custom model, you can use that.

gm
Champ in-the-making
Champ in-the-making
tried that too.
same error with same exception trace

gm
Champ in-the-making
Champ in-the-making
to answer my own question.

this problem is version specific. after upgrading alfresco from 4.2.c to 4.2.e problem resolved.

found related thread about this problem:
http://forums.alfresco.com/forum/developer-discussions/workflow/cant-run-activiti-wf-alfresco-42c-nu...