<?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 with createTaskQuery().taskCandidateGroup and user in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104499#M72989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks again frederikheremans.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If somebody else run into the same error it would be great to read about here. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I go on searching. If i get to know why it would not work on domino I will post it here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jun 2012 12:07:40 GMT</pubDate>
    <dc:creator>cweber</dc:creator>
    <dc:date>2012-06-28T12:07:40Z</dc:date>
    <item>
      <title>Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104495#M72985</link>
      <description>Hi everybody. I got a problem by using return taskService.createTaskQuery().taskCandidateGroup("sales").list();‍and return taskService.createTaskQuery().taskCandidateUser("kermit").list();‍If I run this commands from eclipse with contacting the h2 database from the activiti demo 5.9 on my computer i</description>
      <pubDate>Wed, 27 Jun 2012 12:51:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104495#M72985</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-27T12:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104496#M72986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not database-related, it's your JVM:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;java.lang.IllegalAccessException: Method [public int java.util.Collections$SingletonList.size()] cannot be accessed&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Strange, calling the size() on a singletonList should be possible. What JDK are you running?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 13:36:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104496#M72986</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-06-27T13:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104497#M72987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick answear. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think my problem has to do with the domino server 8 where I use to run the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I run the code from eclipse with java 1.6 (in the vm) the queries work fine. But on the domino server (uses java 1.6, too) it crahes with the shown exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;During the time I tested it with eclipse and the jvm folder of the domino server and it worked there ,too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thougt maybe domino could not handle singletonLists with Xpages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried to instanciate my own Collection.singletonList&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;CODE&gt;public List&amp;lt;List&amp;gt; testSingletonList()&lt;BR /&gt; { System.out.println("Erzeuge Singleton Liste()");&lt;BR /&gt;&amp;nbsp; List&amp;lt;String&amp;gt; str = Collections.singletonList("Listenelement1");&lt;BR /&gt;&amp;nbsp; System.out.println("Nach dem 1 Element ist die Size() "+str.size());&lt;BR /&gt;&amp;nbsp; return str;&lt;BR /&gt; }&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;And it worked fine with that. I could show the list element in my Xpage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea, why domino can not get the function taskCandidateGroup done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;two further questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is there another way to get the candidate tasks for a user or his groups?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Why is the singletonList used for the taskCandidateGroup and nowhere else?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 11:31:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104497#M72987</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-28T11:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104498#M72988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. This is the only way to get tasks for the user (including his/her groups).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Internally, we use a list of groups the query operates on. When you just use a single group (taskCandidateGroup("sales")), this is wrapped in such a list. Maybe a bit dirty, but if you can't get your environment sorted out, you can always replace the taskCandidateGroup("sales") by taskCandidateGroupIn(Arrays.asList("sales")) which is equivalent (if you know how the engine handles this inside).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 11:36:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104498#M72988</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-06-28T11:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104499#M72989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks again frederikheremans.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If somebody else run into the same error it would be great to read about here. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I go on searching. If i get to know why it would not work on domino I will post it here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 12:07:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104499#M72989</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-28T12:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104500#M72990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found out why I couldn't get the methods for taskCandidate work on domino.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it will help somebody else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It was defenitly a jvm permission problem. I'm not sure what permission is the correct one, but if I insert &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;permission java.security.AllPermission;&lt;/CODE&gt;&lt;SPAN&gt;into the &lt;/SPAN&gt;&lt;CODE&gt;[domino]/jvm/lib/security/java.policy&lt;/CODE&gt;&lt;SPAN&gt; it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I can go on testing and have to find out which permissions are needed for a Collections.singletonList.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks frederikheremans for help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2012 06:46:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104500#M72990</guid>
      <dc:creator>cweber</dc:creator>
      <dc:date>2012-06-29T06:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104501#M72991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;1. This is the only way to get tasks for the user (including his/her groups).&lt;BR /&gt;2. Internally, we use a list of groups the query operates on. When you just use a single group (taskCandidateGroup("sales")), this is wrapped in such a list. Maybe a bit dirty, but if you can't get your environment sorted out, you can always replace the taskCandidateGroup("sales") by taskCandidateGroupIn(Arrays.asList("sales")) which is equivalent (if you know how the engine handles this inside).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have encountered the same problem in Load test!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but taskCandidateGroupIn(Arrays.asList("sales"))&amp;nbsp; cannot resolve this problem, because Arrays.asList("sales") returns a Arrays$ArrayList instance which class is declared by "private" modifer, just like Collections$SingletonList.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use java.util.ArrayList can resolve this problem: &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;List candidateGroupList = new java.util.ArrayList(1);&lt;BR /&gt;candidateGroupList.add(candidateGroup);&lt;BR /&gt;taskService.createTaskQuery().taskCandidateGroupIn(candidateGroupList);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I advice modify TaskQueryImpl.getCandidateGroups() method as follow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;public List&amp;lt;String&amp;gt; getCandidateGroups() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (candidateGroup!=null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return Collections.singletonList(candidateGroup);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List candidateGroupList = new java.util.ArrayList(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; candidateGroupList.add(candidateGroup);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return candidateGroupList;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (candidateUser != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return getGroupsForCandidateUser(candidateUser);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if(candidateGroups != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return candidateGroups;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;BR /&gt;&amp;nbsp; }&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 09:01:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104501#M72991</guid>
      <dc:creator>long_187</dc:creator>
      <dc:date>2013-04-15T09:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with createTaskQuery().taskCandidateGroup and user</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104502#M72992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Done. See &lt;/SPAN&gt;&lt;A href="https://github.com/Activiti/Activiti/commit/2218222d83b13e112264ba31fc97f144e05f956d" rel="nofollow noopener noreferrer"&gt;https://github.com/Activiti/Activiti/commit/2218222d83b13e112264ba31fc97f144e05f956d&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 11:24:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problem-with-createtaskquery-taskcandidategroup-and-user/m-p/104502#M72992</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-04-16T11:24:33Z</dc:date>
    </item>
  </channel>
</rss>

