<?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 Query process instances and JPA entity in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/query-process-instances-and-jpa-entity/m-p/169678#M123039</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a process with a JPA entity "vacation". When I created the process instance, I also create an empty vacation record in the database. The vacation record also stores the associated process instance id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have a process instance search where i can do things like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;HistoricProcessInstance&amp;gt; processInstances = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; historyService.createNativeHistoricProcessInstanceQuery()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .sql("SELECT * FROM " + managementService.getTableName(HistoricProcessInstance.class) + &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " h, vacations v where h.proc_inst_id_ = v.processinstanceid and v.decision = 'Denied'")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I understand the createNativeHistoricProcessInstanceQuery method, it works with pure SQL.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would it be possible to make such queries with JPA or Hibernate? I use HibernatePersistence for my vacation objects. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oliver Brüning&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Feb 2014 11:29:13 GMT</pubDate>
    <dc:creator>ollib</dc:creator>
    <dc:date>2014-02-03T11:29:13Z</dc:date>
    <item>
      <title>Query process instances and JPA entity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-process-instances-and-jpa-entity/m-p/169678#M123039</link>
      <description>I have a process with a JPA entity "vacation". When I created the process instance, I also create an empty vacation record in the database. The vacation record also stores the associated process instance id.I also have a process instance search where i can do things like:List&amp;lt;HistoricProcessInsta</description>
      <pubDate>Mon, 03 Feb 2014 11:29:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-process-instances-and-jpa-entity/m-p/169678#M123039</guid>
      <dc:creator>ollib</dc:creator>
      <dc:date>2014-02-03T11:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Query process instances and JPA entity</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/query-process-instances-and-jpa-entity/m-p/169679#M123040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can access the EntityManagerSession object that provides an EntityManager. So you can use the EntityManager instance to execute any queries you would like to execute. You can get it from the ProcessEngineConfiguration getSessionfactories 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>Tue, 04 Feb 2014 13:18:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/query-process-instances-and-jpa-entity/m-p/169679#M123040</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-02-04T13:18:56Z</dc:date>
    </item>
  </channel>
</rss>

