<?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: Retrieve all variables for all processes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112353#M79034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By "state" I mean a business state, something that can be shown to the user (like "open", "processing", "closed", "waiting") and can be managed automatically by the engine - just as setting a process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As said, it is related to business and I imagine it might be handled/modeled with process variables but if there is a better way please point it to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is also related to the way to retrieve those variables for all process. I can see 2 ways:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-querying for process variables for each process: it would imply n+1 queries for n processes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(and also would hide ended processes which are not stored in RU_ tables)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-querying for historic detail for each historic process, again with at least n+1 queries. Furthermore, it would be a little harder to find the latest updated variable value in order to retrieve the final business state of a process, and, in any case, it would require some extra code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I wrong or missing anything here? Maybe there is a third way to go and get variables and process data altogether just in one query for all process instances ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2012 14:38:01 GMT</pubDate>
    <dc:creator>marfago</dc:creator>
    <dc:date>2012-06-06T14:38:01Z</dc:date>
    <item>
      <title>Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112351#M79032</link>
      <description>Hi,In my project I've recently introduced Activiti in order to manage some simple but customizable processes.Actully, what I'm trying to do is a simple page where all processes (still active and finished) will be shown with their state and some other info. Reading some other posts I realized that th</description>
      <pubDate>Mon, 04 Jun 2012 13:14:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112351#M79032</guid>
      <dc:creator>marfago</dc:creator>
      <dc:date>2012-06-04T13:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112352#M79033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What exactly do you mean by 'state'? I'm not sure if process variables are the way to go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, to answer your question: the simplest would be to just query the historic tables. Even if the process is not yet finished, the history already contains it. Querying on a specific variable in that historic table is done through the HistoricxxxQuery interfaces&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 13:50:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112352#M79033</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-06-06T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112353#M79034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By "state" I mean a business state, something that can be shown to the user (like "open", "processing", "closed", "waiting") and can be managed automatically by the engine - just as setting a process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As said, it is related to business and I imagine it might be handled/modeled with process variables but if there is a better way please point it to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is also related to the way to retrieve those variables for all process. I can see 2 ways:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-querying for process variables for each process: it would imply n+1 queries for n processes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(and also would hide ended processes which are not stored in RU_ tables)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-querying for historic detail for each historic process, again with at least n+1 queries. Furthermore, it would be a little harder to find the latest updated variable value in order to retrieve the final business state of a process, and, in any case, it would require some extra code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I wrong or missing anything here? Maybe there is a third way to go and get variables and process data altogether just in one query for all process instances ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 14:38:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112353#M79034</guid>
      <dc:creator>marfago</dc:creator>
      <dc:date>2012-06-06T14:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112354#M79035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By "state" I mean a business state, something that can be shown to the user (like "open", "processing", "closed", "waiting") and can be managed automatically by the engine - just as setting a process variable.&lt;BR /&gt;As said, it is related to business and I imagine it might be handled/modeled with process variables but if there is a better way please point it to me.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok I get it. Depending on how simple your processes are, you could use subprocesses to visually separate the different steps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Am I wrong or missing anything here? Maybe there is a third way to go and get variables and process data altogether just in one query for all process instances ?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Why would you need the state of the finished processes? Aren't they by definition 'ended'?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you only need the runtime processes, than you could use a variable query. If you want to query the variables + load a process instance, you'll probably need a custom SQL query to do that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:05:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112354#M79035</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-06-06T15:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112355#M79036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Am I wrong or missing anything here? Maybe there is a third way to go and get variables and process data altogether just in one query for all process instances ?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Why would you need the state of the finished processes? Aren't they by definition 'ended'?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;From my point of view a process might end in different business states ("resolved", "rejected", "not applicable").In any case, I think that managing business process data with Historic service interface might be not so direct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you only need the runtime processes, than you could use a variable query. If you want to query the variables + load a process instance, you'll probably need a custom SQL query to do that.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Is this the only way? No way through runtimeservice or historicservice interfaces?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 15:46:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112355#M79036</guid>
      <dc:creator>marfago</dc:creator>
      <dc:date>2012-06-06T15:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112356#M79037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;From my point of view a process might end in different business states ("resolved", "rejected", "not applicable").In any case, I think that managing business process data with Historic service interface might be not so direct.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If it is about the end states, you could simply give them another name. The name of the end state is saved directly in the historic process instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is this the only way? No way through runtimeservice or historicservice interfaces?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me clarify: if it is only the runtime processes which you would need, you can certainly do it through a ProcessInstanceQuery: see eg&amp;nbsp; 'ProcessInstanceQuery variableValueEquals(String name, Object value)'. But when you want to combine both historical and runtime in one query, then you would need to define a new custom SQL query in your own ibatis mapping.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 08:11:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112356#M79037</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-06-07T08:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve all variables for all processes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112357#M79038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;From my point of view a process might end in different business states ("resolved", "rejected", "not applicable").In any case, I think that managing business process data with Historic service interface might be not so direct.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;If it is about the end states, you could simply give them another name. The name of the end state is saved directly in the historic process instance.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I can. But why aren't they tracked/logged as activities in ACT_HI_ACTINST table? I can find "start" activities but not "end" ones. Even if they there were,&amp;nbsp; it would require some extra code to extract just the last activity for active processes: as far as I can see from the code, you can just query for all historic activities and then manually filter out the most recent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, this does not solve completely the question.Whatabout if you have to model a business state with more than one variable (maybe a state and a sub state) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As said, my concern is about the processes a related variables and number of queries to retrieve them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But when you want to combine both historical and runtime in one query, then you would need to define a new custom SQL query in your own ibatis mapping.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Can you suggest/point me to some examples? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;M@rco&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: After googling around, I've found a very interesting post about extending activiti's native interfaces.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://tomeklipski.posterous.com/hacking-activiti-bpm-engine-how-to-use-custom" rel="nofollow noopener noreferrer"&gt;http://tomeklipski.posterous.com/hacking-activiti-bpm-engine-how-to-use-custom&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 10:54:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-all-variables-for-all-processes/m-p/112357#M79038</guid>
      <dc:creator>marfago</dc:creator>
      <dc:date>2012-06-07T10:54:47Z</dc:date>
    </item>
  </channel>
</rss>

