<?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: Cannot end task/delete workflow using console in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271111#M224241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To prevent this error, use the following check instead of the normal '!= undefended', as done in the out-of-the-box workflow task-listeners:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;if (typeof bpm_workflowDueDate != 'undefined') &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This will prevent future 'bpm_siteShortName" is not defined.' exception. To get the current task completed or workflow deleted, I'm afraid you'll keep bumping into the "process end listener" which tries to run the failing code (this is the way activiti is designed, to have a mechanism to run eg. cleanup-code when process ends or is deleted). What I don't get is why the exception keeps on occurring, even if the variable has been set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you show all variables that are set in the workflow-path/task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you REALLY want the workflow to go away it will require some fiddling in the activiti-database, replacing the process-definition-id on the executions and tasks with the next version of the workflow that doesn't show this error. Although, this is imho the last resort and a bit tricky.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Frederik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2012 07:49:02 GMT</pubDate>
    <dc:creator>frederikhereman</dc:creator>
    <dc:date>2012-03-20T07:49:02Z</dc:date>
    <item>
      <title>Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271108#M224238</link>
      <description>Sigh…My Activiti workflow has a Listener (alfrescoScriptType) that fires at the end of the workflow.&amp;nbsp; Unfortunately my code didn't catch an exception for an unset variable (bpm_siteShortName) and now the Workflow is stuck at the last task.When the assigned User attempts to acknowledge completion of</description>
      <pubDate>Mon, 05 Mar 2012 13:31:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271108#M224238</guid>
      <dc:creator>devodl</dc:creator>
      <dc:date>2012-03-05T13:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271109#M224239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried using the workflow console to set a value for the missing variable? Assuming you have already done a "use workflow" command, you should be able to set it with something like "var bpm_siteShortName='foo'".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also try doing an "end workflow".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 00:04:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271109#M224239</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-03-08T00:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271110#M224240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the response, it got my hopes up but the Workflow process/Task is still hung.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I logged into the workflow console as admin and issued the following commands:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;user sdeal&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;using user sdeal&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;show my tasks&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;sdeal:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;id: activiti$10278 , name: wf:approvedParallelTask , properties: 21 , workflow: activiti$10130 , path: activiti$10130&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;use workflow activiti$10130&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;definition: activiti$alfParallelReview-Lifecycle:1:6990 , name: ALF Parallel Review with Lifecycle , version: 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workflow: activiti$10130 , active: true&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;path: activiti$10130 , node: Document Approved&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;var bpm:siteShortName='dsprojectdemosite'&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;set var {&lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/model/bpm/1.0}siteShortName" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/bpm/1.0}siteShortName&lt;/A&gt;&lt;SPAN&gt; = 'dsprojectdemosite'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;end task activiti$10278&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;org.alfresco.scripts.ScriptException: 021958052 Failed to execute supplied script: 021958051 ReferenceError: "bpm_siteShortName" is not defined. (AlfrescoJS#2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that this is due to my hastily/poorly written Listener Javascript in the workflow&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Move to Final Review folder */&lt;BR /&gt;if (bpm_siteShortName != undefined &amp;amp;&amp;amp; bpm_finalReview != undefined)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; var destPath = "/Sites/" + bpm_siteShortName + "/documentLibrary/" + bpm_finalReview;&lt;BR /&gt;&amp;nbsp; var destNode = companyhome.childByNamePath(destPath);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for (var i = 0; i &amp;lt; bpm_package.children.length; i++)&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bpm_package.children[i].move(destNode);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;} // end of if&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;/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;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;STRONG style="color: #4040AA;"&gt;But how can I get the Workflow to end?&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 16:36:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271110#M224240</guid>
      <dc:creator>devodl</dc:creator>
      <dc:date>2012-03-19T16:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271111#M224241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To prevent this error, use the following check instead of the normal '!= undefended', as done in the out-of-the-box workflow task-listeners:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;if (typeof bpm_workflowDueDate != 'undefined') &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This will prevent future 'bpm_siteShortName" is not defined.' exception. To get the current task completed or workflow deleted, I'm afraid you'll keep bumping into the "process end listener" which tries to run the failing code (this is the way activiti is designed, to have a mechanism to run eg. cleanup-code when process ends or is deleted). What I don't get is why the exception keeps on occurring, even if the variable has been set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you show all variables that are set in the workflow-path/task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you REALLY want the workflow to go away it will require some fiddling in the activiti-database, replacing the process-definition-id on the executions and tasks with the next version of the workflow that doesn't show this error. Although, this is imho the last resort and a bit tricky.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Frederik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 07:49:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271111#M224241</guid>
      <dc:creator>frederikhereman</dc:creator>
      <dc:date>2012-03-20T07:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271112#M224242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt; Sigh… I could not get the bpm_siteShortName defined in a manner that would satisfy the JavaScript for the end task so…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Against my better judgement I hacked the database directly to end the task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the ID displayed in the Task Share (10278) I logged into Postgresql and issued the command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;delete from public.act_ru_task where id_ = '10278';&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;It remains to be seen if my actions have corrupted the workflow processes or the database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to all for your advice on this matter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 11:03:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271112#M224242</guid>
      <dc:creator>devodl</dc:creator>
      <dc:date>2012-03-30T11:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot end task/delete workflow using console</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271113#M224243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the same problem as devodl.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End ExecutionListener references a var that doesn't exist (due to misspelling)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've had no luck creating or editing the vars through the workflow console. The var command works but doesn't seem to set any variables on the actual workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what next steps to take in order to remove this workflow definition.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 03:14:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-end-task-delete-workflow-using-console/m-p/271113#M224243</guid>
      <dc:creator>tomoconnell</dc:creator>
      <dc:date>2014-02-27T03:14:28Z</dc:date>
    </item>
  </channel>
</rss>

