<?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 ProcessInstanceQuery and runtime performance in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/processinstancequery-and-runtime-performance/m-p/64277#M40495</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 defined a process that performs different tasks. During the execution of the process it evaluates new variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to show a web page with the list of processes that satisfy a certain condition on one of the variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully run a ProcessInstanceQuery().list() method with a filter on that variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That method&amp;nbsp; returns a list of ProcessInstance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However the single element in the list contains only the id of the process instead I also need the value of a variable of the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to cast the ProcessInstance to ExecutionEntity&amp;nbsp; and use the method getVariabile("my var") but I get a "&lt;/SPAN&gt;&lt;EM&gt;lazy loading outside commandContext&lt;/EM&gt;&lt;SPAN&gt;" error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only alternative seems to loop on the list of results and execute a runtimeService.getVariable("my var") for each element.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Is there a better way to do this in a efficient way (not too many sql queries requests)?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;best regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2011 13:49:59 GMT</pubDate>
    <dc:creator>kermit</dc:creator>
    <dc:date>2011-10-20T13:49:59Z</dc:date>
    <item>
      <title>ProcessInstanceQuery and runtime performance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/processinstancequery-and-runtime-performance/m-p/64277#M40495</link>
      <description>Hi,I defined a process that performs different tasks. During the execution of the process it evaluates new variables.I have to show a web page with the list of processes that satisfy a certain condition on one of the variables.I have successfully run a ProcessInstanceQuery().list() method with a fil</description>
      <pubDate>Thu, 20 Oct 2011 13:49:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/processinstancequery-and-runtime-performance/m-p/64277#M40495</guid>
      <dc:creator>kermit</dc:creator>
      <dc:date>2011-10-20T13:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: ProcessInstanceQuery and runtime performance</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/processinstancequery-and-runtime-performance/m-p/64278#M40496</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;You can write your own database queries to overcome this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else you're stuck with the runtimeservice getVariable method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 17:13:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/processinstancequery-and-runtime-performance/m-p/64278#M40496</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2011-10-21T17:13:14Z</dc:date>
    </item>
  </channel>
</rss>

