<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem in start workflow from script written in Process Definition in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280317#M233447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I already found another solution that works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I compared the activiti-afresco 5.13 with 5.10 to see what has changed and found in activiti-engine that the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org/activiti/engine/impl/interceptor/CommandContextInterceptor.java&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now reuses the context to execute the commands and the old version (5.10 series) creates a new one always.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I changed this class to be as it was in 5.10 and now all the workflow creation issue is gone!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if this change may affect anything else. I've researched in github and found that this change was made in version 5.11, related to the improvement &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1387" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1387&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution involves recompiling activiti-engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ismael Garcia&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 07:27:49 GMT</pubDate>
    <dc:creator>ismaelgarcia</dc:creator>
    <dc:date>2014-09-15T07:27:49Z</dc:date>
    <item>
      <title>Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280312#M233442</link>
      <description>Hi All,I am getting attached error while starting workflow from the script written in processdefinition.&amp;lt;blockcode&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var doc_pack = bpm_package.children[0];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var wfdef = workflow.getDefinitionByName("activiti$activitiReview");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var wfparams = n</description>
      <pubDate>Thu, 26 Jun 2014 14:12:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280312#M233442</guid>
      <dc:creator>yogeshpj</dc:creator>
      <dc:date>2014-06-26T14:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280313#M233443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you attache your processDefinition file, from the log it is showing [strong]Wrapped java.lang.NullPointerException (AlfrescoJS#24)[/strong] nullpointer exception at line 24 in javascript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I look at you processDefinition I can find the issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2014 11:30:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280313#M233443</guid>
      <dc:creator>lementree</dc:creator>
      <dc:date>2014-06-30T11:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280314#M233444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are having the same problem with Alfresco 4.2.f (Activiti 5.13-alf-20130918). We start a new WF in a Alfresco ScriptTask and we are having the same NPE at the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Caused by: java.lang.NullPointerException&lt;BR /&gt;at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:300)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are planning the upgrade from 4.0e and have arround 2000 active workflows, so we cannot change the way the workflows are started in the active workflows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have created a minimal workflow to reproduce the behaviour, (WFTEST.bpmn), that has only one task and start an alfresco ootb adhoc workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt; So far we have tested: &amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Change the start workflow script for a Java service task (for testing purpose) and the error persist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Change the start workflow script for a Java service task (for testing purpose) and start the workflow using an new thread. The new workflow is started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt; Regarding other alfresco versions: &amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- In Alfresco 4.2.a (Activiti 5.10), the script task is working, and the new workflow is started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In Alfresco 4.2.b (Activiti 5.10), the script task is working, , and the new workflow is started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In Alfresco 4.2.c (Activiti 5.10-14112012), Alfresco throws an error when we try to start WFTEST (maybe another alfresco bug)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In Alfresco 4.2.d (Activiti 5.13-alf-20130709), the same error as in 4.2.f&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In Alfresco 4.2.e (Activiti 5.13-alf-20130918), the same error as in 4.2.f&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We have also tryed the lastest activiti-alfresco version (5.13-alf-20140708) with Alfresco 4.2f without luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The log attached is generated by activating debug in alfresco/WEB-INF/classes/log4j.properties :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log4j.logger.org.alfresco.repo.jscript=debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log4j.logger.org.activiti.engine=debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone any guide to solve the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt; Alfresco version &amp;lt;/strong&amp;gt; 4.2.f&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2014 10:45:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280314#M233444</guid>
      <dc:creator>ismaelgarcia</dc:creator>
      <dc:date>2014-08-20T10:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280315#M233445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the exact same issue, trying to start a workflow with the workflow service from a Java Delegate…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you manage to solve it ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Has a JIRA been raised for this issue (couldn't find any) ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 15:14:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280315#M233445</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-09-05T15:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280316#M233446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, now it works for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I started a "start-workflow" action asynchronously instead of using the workflow service and it raised no exception…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 08:30:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280316#M233446</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-09-08T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280317#M233447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I already found another solution that works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I compared the activiti-afresco 5.13 with 5.10 to see what has changed and found in activiti-engine that the class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;org/activiti/engine/impl/interceptor/CommandContextInterceptor.java&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now reuses the context to execute the commands and the old version (5.10 series) creates a new one always.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I changed this class to be as it was in 5.10 and now all the workflow creation issue is gone!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if this change may affect anything else. I've researched in github and found that this change was made in version 5.11, related to the improvement &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1387" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1387&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My solution involves recompiling activiti-engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ismael Garcia&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 07:27:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280317#M233447</guid>
      <dc:creator>ismaelgarcia</dc:creator>
      <dc:date>2014-09-15T07:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280318#M233448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tony, I'm having the same issue trying to get a Workflow to start from an active workflow.&amp;nbsp; Do you have more details of your solution or a work-around?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ismael, are you aware of another solution, I don't really want to make any changes to activiti unless it's a last resort?&amp;nbsp; I'm using verion 5.13 of Activiti on Alfresco 4.2 Enterprise.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been trying multiple variations of this code (below) but with no success.&amp;nbsp; I keep getting the error "org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var docu = userhome.createFile("testingjoebujok.txt");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;docu.content = "original text";&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var workflowDefinition = workflow.getDefinitionByName("activiti$ps_New_Post_Workflow");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var workflowPackage = workflow.createPackage();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflowPackage.addNode(docu); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var workflowParameters = [];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflowParameters["bpm:workflowDescription"] = "Please edit: " + docu.name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflowParameters["bpm:assignees"] = [people.getPerson("admin")];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var workflowPath = workflowDefinition.startWorkflow(workflowPackage, workflowParameters);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 14:54:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280318#M233448</guid>
      <dc:creator>nickc</dc:creator>
      <dc:date>2014-09-22T14:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in start workflow from script written in Process Definition</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280319#M233449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to get round this issue by using the CallActivity functionality available within activiti&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:54:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-in-start-workflow-from-script-written-in-process/m-p/280319#M233449</guid>
      <dc:creator>nickc</dc:creator>
      <dc:date>2014-10-02T13:54:44Z</dc:date>
    </item>
  </channel>
</rss>

