<?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: Serializing process variables in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145423#M101622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have just opened an issue &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1503" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1503&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Dec 2012 17:44:27 GMT</pubDate>
    <dc:creator>mariusz_cwikla</dc:creator>
    <dc:date>2012-12-23T17:44:27Z</dc:date>
    <item>
      <title>Serializing process variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145419#M101618</link>
      <description>Hi,I have a couple of questions regarding process variables storage, but the short one is: is there a way to create custom serializer for my process variables?Let me provide some background:- let's say that I use process variables as complex object, for example:class Person implements Serializable{&amp;nbsp;</description>
      <pubDate>Tue, 18 Dec 2012 15:14:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145419#M101618</guid>
      <dc:creator>mariusz_cwikla</dc:creator>
      <dc:date>2012-12-18T15:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Serializing process variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145420#M101619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;wow, that's a lot of text &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;1. Is there a way to create custom serializer for my process variables?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, check the VariableTypes and the VariableType classes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the way all variable serialization is implemented. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;2. How can I store complex process variables as XML documents?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you'd need a custom serializer, indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;3. If I use JPA will I have my process stored only in my tables instead of ACT_GE_BYTEARRAY as byte array?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;It will only store the primary key to your entity, nothing else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;4. Any other idea?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Nope &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;5. Can somebody provide me sample Blueprint configuration with JPA (regarding org.activiti.osgi.blueprint.ConfigurationFactory or some other classes).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, I'm no osgi user…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 17:04:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145420#M101619</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-12-18T17:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Serializing process variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145421#M101620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your answer. I'll check VariableTypes and VariableType classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also did a small research, and a quick test shows that ConfigurationFactory from activiti-osgi.jar does not work properly with JPA, but I found a workaround.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. In a book "Activiti in Action" there is following example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="configurationFactory" class="org.activiti.osgi.blueprint.ConfigurationFactory"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="dataSource" ref="dataSource" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="databaseSchemaUpdate" value="true" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;bean id="configuration" factory-ref="configurationFactory" factory-method="getConfiguration" /&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;ConfigurationFactory instantiates StandaloneProcessEngineConfiguration object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to add jpaPersistenceUnitName/jpaHandleTransaction/jpaCloseEntityManager properties, but only first one works (I didn't test it thorougly, I just can say that following Blueprint bean gets deployed):&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; &amp;lt;bean id="configurationFactory" class="com.asseco.ufe.prototyping.workflow.activiti.ConfigurationFactory"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="dataSource" ref="activitiDS" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="databaseSchemaUpdate" value="true" /&amp;gt;&lt;BR /&gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;bean id="configuration" factory-ref="configurationFactory" factory-method="getConfiguration"&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaPersistenceUnitName" value="prototypeJPA" /&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;When I added jpaHandleTransaction/jpaCloseEntityManager properties to configuration bean:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; &amp;lt;bean id="configuration" factory-ref="configurationFactory" factory-method="getConfiguration"&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaPersistenceUnitName" value="prototypeJPA" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaHandleTransaction" value="true"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaCloseEntityManager" value="true"/&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;then I got following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: No setter for jpaHandleTransaction property&lt;BR /&gt; at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:940)&lt;BR /&gt; at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:903) &lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;It's strange, since there is setJpaHandleTransaction method in base class. It might be a bug in Apache Aries (I use 1.0), but on the other hand it might be caused by StandaloneProcessEngineConfiguration hierarchy. "setJpaHandleTransaction" method is both in ProcessEngineConfigurationImpl and ProcessEngineConfiguration. Here is the hierarchy:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessEngineConfiguration &amp;lt;- contains setJpaHandleTransaction&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;BR /&gt;ProcessEngineConfigurationImpl &amp;lt;- contains setJpaHandleTransaction&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;BR /&gt;StandaloneProcessEngineConfiguration &amp;lt;- does not contain setJpaHandleTransaction&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;2 .So, anyway, my workaround for this problem is to create custom factory based on ConfigurationFactory from activiti-osgi like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; &amp;lt;bean id="configurationFactory" class="com.mc.activiti.MyConfigurationFactory"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="dataSource" ref="activitiDS" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="databaseSchemaUpdate" value="true"/&amp;gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;property name="jpaHandleTransaction" value="true"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaCloseEntityManager" value="true"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="jpaEntityManagerFactory" ref="myEntityManagerFactory"/&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;bean id="configuration" factory-ref="configurationFactory" factory-method="getConfiguration"&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;BR /&gt; &lt;BR /&gt; &amp;lt;reference id="myEntityManagerFactory"&lt;BR /&gt;&amp;nbsp; interface="javax.persistence.EntityManagerFactory" filter="osgi.unit.name=myJPA"/&amp;gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;SPAN&gt;and here's factory code &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;public class SecondConfigurationFactory {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DataSource dataSource;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String databaseSchemaUpdate;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private boolean jobExecutorActivate = true; &lt;BR /&gt; private boolean jpaHandleTransaction;&lt;BR /&gt; private boolean jpaCloseEntityManager;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private EntityManagerFactory jpaEntityManagerFactory;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public StandaloneProcessEngineConfiguration getConfiguration() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; StandaloneProcessEngineConfiguration conf =&lt;BR /&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; new StandaloneProcessEngineConfiguration();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setDataSource(dataSource);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setDatabaseSchemaUpdate(databaseSchemaUpdate);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setJobExecutorActivate(jobExecutorActivate);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setJpaEntityManagerFactory(jpaEntityManagerFactory);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setJpaHandleTransaction(jpaHandleTransaction);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conf.setJpaCloseEntityManager(jpaCloseEntityManager);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return conf;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;BR /&gt; //setters for all attributes&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently it works for me, but is this correct in long-term? And if it is, can I ask a request to add JPA support for Blueprint?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:24:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145421#M101620</guid>
      <dc:creator>mariusz_cwikla</dc:creator>
      <dc:date>2012-12-19T10:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Serializing process variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145422#M101621</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;Can you add a JIRA issue for this and add sample code to show this error?&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 Dec 2012 20:12:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145422#M101621</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-12-21T20:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Serializing process variables</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145423#M101622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have just opened an issue &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1503" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1503&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 17:44:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/serializing-process-variables/m-p/145423#M101622</guid>
      <dc:creator>mariusz_cwikla</dc:creator>
      <dc:date>2012-12-23T17:44:27Z</dc:date>
    </item>
  </channel>
</rss>

