<?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 TaskQuery missing .variableValueEquals() in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36414#M19176</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 started evaluating Activiti and I am quite impressed. It was very easy to write an example workflow and use the API, straight foward, very nice, thanks for the execellent work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I implemented a simple order management with these nodes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start -&amp;gt; UserTask -&amp;gt; ServiceTask -&amp;gt; End&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The UserTask sets a variable that decides if the order goes to the ServiceTask or to an EndError node, this works fine so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Concerning performance I am stuck at the moment because my TaskQuery is way too slow. I am not sure if I misuse Activiti or if a feature is missing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I start the workflow I set a variable "department" = "dep1". This way I started 100.000 Workflows for 500 different departments - this was very fast as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get the tasks I do the following at the moment:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;TaskQuery taskQuery = taskService.createTaskQuery();&lt;BR /&gt;taskQuery.taskDefinitionKey("userTask");&lt;BR /&gt;taskQuery.taskName("Allow order");&lt;BR /&gt;List&amp;lt;Task&amp;gt; taskList = taskQuery.list();&lt;BR /&gt;&lt;BR /&gt;for (Task task : taskList) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&amp;lt;String, Object&amp;gt; variables = taskService.getVariables(task.getId());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;final String taskDepartment = (String)variables.get("department");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (taskDepartment.matches("dep1")) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Hit!");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;BR /&gt;&lt;SPAN&gt;Obviously this runs forever. 100.000+1 SQL Queries are executed, then I have to throw away 99.800 of the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Querying the process instances on the other hand is very fast:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery();&lt;BR /&gt;query.variableValueEquals("department", "dep1");&lt;BR /&gt;rc = query.list();&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;So this should be possible for Tasks as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Jan 2011 16:10:23 GMT</pubDate>
    <dc:creator>thomas1</dc:creator>
    <dc:date>2011-01-06T16:10:23Z</dc:date>
    <item>
      <title>TaskQuery missing .variableValueEquals()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36414#M19176</link>
      <description>Hi,I started evaluating Activiti and I am quite impressed. It was very easy to write an example workflow and use the API, straight foward, very nice, thanks for the execellent work.I implemented a simple order management with these nodes&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;tart -&amp;gt; UserTask -&amp;gt; ServiceTask -&amp;gt; EndThe UserTask s</description>
      <pubDate>Thu, 06 Jan 2011 16:10:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36414#M19176</guid>
      <dc:creator>thomas1</dc:creator>
      <dc:date>2011-01-06T16:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: TaskQuery missing .variableValueEquals()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36415#M19177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I started evaluating Activiti and I am quite impressed. It was very easy to write an example workflow and use the API, straight foward, very nice, thanks for the execellent work.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding your question: It is not yet possible to query tasks using variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've filed a feature request for it: &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-501" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-501&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this will not be implemented in the near future due to more important feature requests at this moment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively, we can offer a 'backport' to run custom SQL queries, see &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-502" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-502&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;This can be implemented very quickly. Are you capable/willing of building from trunk and trying this fix for us?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 10:26:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36415#M19177</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-01-07T10:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: TaskQuery missing .variableValueEquals()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36416#M19178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I've filed a feature request for it: &lt;A href="http://jira.codehaus.org/browse/ACT-501" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-501&lt;/A&gt;&lt;BR /&gt;However, this will not be implemented in the near future due to more important feature requests at this moment.&lt;BR /&gt;&lt;BR /&gt;Alternatively, we can off a 'backport' to run custom SQL queries, see &lt;A href="http://jira.codehaus.org/browse/ACT-502" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-502&lt;/A&gt;&lt;BR /&gt;This can be implemented very quickly. Are you capable/willing of building from trunk and trying this fox for us?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At the moment this is a showstopper for me but I really like Activiti. If there is a way around the showstopper I'd be happy to help out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 14:25:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36416#M19178</guid>
      <dc:creator>thomas1</dc:creator>
      <dc:date>2011-01-07T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: TaskQuery missing .variableValueEquals()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36417#M19179</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 just resolved &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-588" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-588&lt;/A&gt;&lt;SPAN&gt;, which adds taskVariableValueEquals() to the taskQuery, will be available in 5.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 08:02:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/taskquery-missing-variablevalueequals/m-p/36417#M19179</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-02-07T08:02:26Z</dc:date>
    </item>
  </channel>
</rss>

