<?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 Explorer fails on 'standalone' tasks (without process) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77927#M51632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to use the task service of Activiti 5.6 "on its own", without associated processes. We are investigating this because we have some requirements for simple task management, which does not really require a full process model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;TaskService taskService = pe.getTaskService();&lt;BR /&gt;&lt;BR /&gt;// Create and save task&lt;BR /&gt;Task task = taskService.newTask();&lt;BR /&gt;task.setName("testTask");&lt;BR /&gt;taskService.saveTask(task);&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;This seems to work, I can query the task and handle it with the API. It is also correctly inserted into the database. But - as was to be expected - the task instance lacks a process_inst_id and execution_id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I tried to look at the tasks I created with Activiti Explorer, it was showing that there are some tasks, but was unable to show the details. The logs showed&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;18:11:31,343&amp;nbsp; ERROR [freemarker.runtime]&lt;BR /&gt;Expression jsonUtils.encodeJSONString(x) is undefined on line 1, column 15 in org/activiti/rest/api/task/task.lib.ftl.&lt;BR /&gt;The problematic instruction:&lt;BR /&gt;———-&lt;BR /&gt;==&amp;gt; ${task.executionId} escaped ${jsonUtils.encodeJSONString(task.executionId)} [on line 19, column 18 in org/activiti/rest/api/task/task.lib.ftl]&lt;BR /&gt; in user-directive printTask [on line 7, column 5 in org/activiti/rest/api/task/task.lib.ftl]&lt;BR /&gt; in user-directive taskLib.printTaskList [on line 4, column 11 in org/activiti/rest/api/task/tasks.get.json.ftl]&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;After some googling, I found that this is probably due to some value being null. Sure enough, the template contains&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; "assignee": &amp;lt;#if task.assignee??&amp;gt;"${task.assignee}"&amp;lt;#else&amp;gt;null&amp;lt;/#if&amp;gt;,&lt;BR /&gt;&amp;nbsp; "executionId": ${task.executionId},&lt;BR /&gt;&amp;nbsp; "processInstanceId": &amp;lt;#if task.processInstanceId??&amp;gt;"${task.processInstanceId}"&amp;lt;#else&amp;gt;null&amp;lt;/#if&amp;gt;,&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;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Since the executionId is null, this fails. Making it similar to the other checks fixed the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I'm not sure if that is just a little bug - or if the Task Service was never meant to be used like this?? The API would really be sufficient for what we need, and I don't see the point in using a different task engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards, Joe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2011 22:48:31 GMT</pubDate>
    <dc:creator>jammann</dc:creator>
    <dc:date>2011-08-05T22:48:31Z</dc:date>
    <item>
      <title>Explorer fails on 'standalone' tasks (without process)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77927#M51632</link>
      <description>Hi allI tried to use the task service of Activiti 5.6 "on its own", without associated processes. We are investigating this because we have some requirements for simple task management, which does not really require a full process model.So I tried something likeTaskService taskService = pe.getTaskSe</description>
      <pubDate>Fri, 05 Aug 2011 22:48:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77927#M51632</guid>
      <dc:creator>jammann</dc:creator>
      <dc:date>2011-08-05T22:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Explorer fails on 'standalone' tasks (without process)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77928#M51633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think your usecase is valid. Please create a jira for adding the null check.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2011 13:21:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77928#M51633</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-08-06T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Explorer fails on 'standalone' tasks (without process)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77929#M51634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Done. ACT-898 &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-898" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-898&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2011 08:54:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77929#M51634</guid>
      <dc:creator>jammann</dc:creator>
      <dc:date>2011-08-08T08:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Explorer fails on 'standalone' tasks (without process)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77930#M51635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The next version of Explorer will be able to cope with standalone tasks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 12:48:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/explorer-fails-on-standalone-tasks-without-process/m-p/77930#M51635</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-08-10T12:48:24Z</dc:date>
    </item>
  </channel>
</rss>

