cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to start workflow activiti$publishWhitepaper

va22079
Champ in-the-making
Champ in-the-making
Hello,

I followed the workflow tutorial at http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html#using-th...
Everything looked great until I completed step 1 of WhitePaper Submission Example.

After the step 1, I start share and repository. And all starts fine.

I went to http://localhost:8081/share -> start workflow then selected publich Whitepaper to Web workflow.

When I clicked on "Start Workflow" button, I get "01260009 Failed to start workflow activiti$publishWhitepaper"

The log says:

16:31:49,149 WARN  [org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior] Exception while executing scripttask1 : couldn't find a variable type that is able to serialize [object global]
16:31:49,149 DEBUG [org.alfresco.repo.jscript.ScriptLogger] org.alfresco.service.cmr.workflow.WorkflowException: 01260010 Failed to start workflow activiti$publishWhitepaper:1:404.
16:31:49,164 DEBUG [org.alfresco.repo.jscript.ScriptLogger] Returning 500 status code


It complains about scripttask1 which is as below:

    <scriptTask id="scripttask1" name="Submit" scriptFormat="javascript" activiti:autoStoreVariables="true">
      <script><![CDATA[var scwf_approveCount = 0; var scwf_tpApproved = false;]]></script>     
    </scriptTask>

Can someone let me know what I am missing, please?
I am using Tomcat 7.0.37 and JDK 1.7

Thanks in advance.
Sean
6 REPLIES 6

s_palyukh
Star Contributor
Star Contributor
I guess you did a mistake in your javascript code. Please attach code that is executed while workflow starting and stack trace.

danielrhein
Champ in-the-making
Champ in-the-making
Hello,

I'm new to Alfresco and started to rebuild and understand the Workflow mechanism in Alfresco. I used therefore the "https://github.com/jpotts/alfresco-developer-series/tree/master/workflow" tutorial. Everything works fine until I'll step into the publishWhitepaper.bpmn example.

I tried to recreate the example with the source code of Jeff Potts. But I end up at this point again. Maybe I'll missed something.

At the execution of

<scriptTask id="scripttask1" name="Submit" scriptFormat="javascript" activiti:autoStoreVariables="true">
      <script>execution.setVariable('scwf_approveCount', 0); execution.setVariable('scwf_tpApproved', false);</script>
    </scriptTask>

it fails with the log:
INFORMATION: Starting ProtocolHandler ["http-bio-8080"]
2015-05-26 08:44:05,374  WARN  [bpmn.behavior.ScriptTaskActivityBehavior] [http-bio-8080-exec-3] Exception while executing scripttask1 : couldn't find a variabl
e type that is able to serialize [object global]

Now I hope, there is somebody who could help me to understand the failure within this javascript code.


I usede Alfresco in the Version

<alfresco.version>5.0.d</alfresco.version>

The javascript code is fine, but before of the script task, the variable scwf_approveCount or scwf_tpApproved is not defined or initialized.

I don't know why your workflow not start. May be you don't have a form assigned to the start task, in this case, add a "bpm:startTask" form or other form:


<startEvent id="start" name="Start" activiti:formKey="bpm:startTask"></startEvent>


Greetings,
Pablo.

sergeyzaytsev
Champ in-the-making
Champ in-the-making
Hi! There is a form assigned in a tutorial:


<startEvent id="startevent1" name="Start" activiti:formKey="scwf:submitReviewTask"></startEvent>

but It really won't start neither in javascript language nor after changing to groovy…

It just doesn't work….

( btw, the message the same as mentioned above:
2015-10-03 18:55:18,824  WARN  [bpmn.behavior.ScriptTaskActivityBehavior] [http-bio-8080-exec-7] Exception while executing scripttask1 : couldn't find a variable type that is able to serialize [object global]
2015-10-03 18:55:18,829  DEBUG [repo.jscript.ScriptLogger] [http-bio-8080-exec-7] org.alfresco.service.cmr.workflow.WorkflowException: 09030008 Failed to start workflow activiti$publishWhitepaper:1:607.
).

Any clue ?

Hi! Have you found the solution ? I have the very same problem….

vmiorga
Confirmed Champ
Confirmed Champ

I just discover that the error of the type:

Failed to start workflow activiti$***:1:404.

could append if the script in the fisrt task of a workflow is in error.

In my case the fisrt task add a script of the type ScriptTaskListener with the property event="create", and this script add a typo, whitch result in this error message.