<?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: Extending Activiti with Custom Properties in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206332#M159462</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;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Personally, I would go for Spring transaction management and jdbc / hibernate for your custom stuff to let the transactions behave properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"1) Can extension code invoke DbSqlSession.flush()? Should it in this case?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It could. You can get the current DbSqlSession, but I'm not sure if this would have consequences which you cannot see yet now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"2) Is there a way to hook the Custom MyBatis Mapper into flush lifecycle of DbSqlSession?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, you can, you can always do Context.getCurrentXXX to get to those things. But im not sure if it's a good idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"1) Are there any concerns with defining foreign key constraints between Activiti tables and custom Extension tables?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It can only go wrong if you don't delete your stuff before activiti stuff is deleted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"2) Is Option 3 the recommended path for implementing extensions that need referential integrity with Activiti tables? Due to the optimizations made in DbSqlSession which eliminates the need to execute statements that insert and delete a PersistentObject with the same id I don’t see another alternative for the reason stated earlier."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would for sure fit nicely, but it also does mean you are very dependent on Activiti internal code. Which in theory, will not change that much, but it could happen of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why the need for 'real' foreign keys? Isn't a 'soft' reference enough?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 12:31:05 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2014-11-05T12:31:05Z</dc:date>
    <item>
      <title>Extending Activiti with Custom Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206330#M159460</link>
      <description>We are migrating from a (non-bpmn) proprietary workflow system which support "attributes" on various workflow objects such as UserTask, SequenceFlow, and DataObject. The attributes are classified in to two types: mutable and immutable. Mutable attributes are key/value pairs that can be modified on a</description>
      <pubDate>Tue, 04 Nov 2014 14:08:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206330#M159460</guid>
      <dc:creator>rhafner</dc:creator>
      <dc:date>2014-11-04T14:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Activiti with Custom Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206331#M159461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Forgot code tag around bpmn snippet for item 1. Adding again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="usertask1" name="Task A"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&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;lt;xyz:attributes&amp;gt;&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;lt;xyz:attribute xyz:id="1" xyz:name="Attr1" xyz:value="1" /&amp;gt;&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;lt;xyz:attribute xyz:id="2" xyz:name="Attr2" xyz:value="2" /&amp;gt;&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;lt;/xyz:attributes&amp;gt;&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;lt;xyz:i18ln&amp;gt;&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;lt;xyz:labeledEntityIdForName xyz:entityID="6c7826fb-effd-45c2-8097-2bb59e7ba8b9" xyz:defaultlocale="en"&amp;gt;&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;lt;xyz:locale xyz:name="en"&amp;gt;leifn-1&amp;lt;/xyz:locale&amp;gt;&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;lt;xyz:locale xyz:name="it"&amp;gt;itleifn-1&amp;lt;/xyz:locale&amp;gt;&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;lt;/xyz:labeledEntityIdForName&amp;gt;&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;lt;xyz:labeledEntityIdForDescription xyz:entityID="f8a34a02-5d57-4a7d-90bb-1116f4304b97" xyz:defaultlocale="en"&amp;gt;&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;lt;xyz:locale xyz:name="en"&amp;gt;leifd-1&amp;lt;/xyz:locale&amp;gt;&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;lt;xyz:locale xyz:name="it"&amp;gt;itleifd-1&amp;lt;/xyz:locale&amp;gt;&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;lt;/xyz:labeledEntityIdForDescription&amp;gt;&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;lt;/xyz:i18ln&amp;gt;&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;lt;xyz:resourceBundleKeyForName&amp;gt;rbkfn-1&amp;lt;/xyz:resourceBundleKeyForName&amp;gt;&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;lt;xyz:resourceBundleKeyForDescription&amp;gt;rbkfd-1&amp;lt;/xyz:resourceBundleKeyForDescription&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 14:11:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206331#M159461</guid>
      <dc:creator>rhafner</dc:creator>
      <dc:date>2014-11-04T14:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Activiti with Custom Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206332#M159462</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;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Personally, I would go for Spring transaction management and jdbc / hibernate for your custom stuff to let the transactions behave properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"1) Can extension code invoke DbSqlSession.flush()? Should it in this case?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It could. You can get the current DbSqlSession, but I'm not sure if this would have consequences which you cannot see yet now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"2) Is there a way to hook the Custom MyBatis Mapper into flush lifecycle of DbSqlSession?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, you can, you can always do Context.getCurrentXXX to get to those things. But im not sure if it's a good idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"1) Are there any concerns with defining foreign key constraints between Activiti tables and custom Extension tables?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It can only go wrong if you don't delete your stuff before activiti stuff is deleted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"2) Is Option 3 the recommended path for implementing extensions that need referential integrity with Activiti tables? Due to the optimizations made in DbSqlSession which eliminates the need to execute statements that insert and delete a PersistentObject with the same id I don’t see another alternative for the reason stated earlier."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would for sure fit nicely, but it also does mean you are very dependent on Activiti internal code. Which in theory, will not change that much, but it could happen of course.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why the need for 'real' foreign keys? Isn't a 'soft' reference enough?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 12:31:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206332#M159462</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-11-05T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Activiti with Custom Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206333#M159463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick response! I wasn't expecting one so fast since the thread is quite lengthy &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This morning I tracked down the cause of the referential integrity issue I'm seeing with Option 3. For reference here is the behavior:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Start Process Instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Modeled DataObjects and our Extension Attributes are initialized. (put in DbSqlSession.insertedObjects but not flushed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Our Service Task runs and updates the value of one of the Modeled DataObjects but not its attributes. This results in a call to VariableScopeImpl.updateVariables() which performs a VariableInstanceEntity.touch() call on the updated VariableInstanceEntity. The touch call removes the existing VariableInstanceEntity from the insertedObjects list and appends it to the end of the list. This results in the VariableInstanceEntity being after our custom extension (VariableAttributeEntity) entry which results in the constraint violation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's unclear to me why the touch call reorders the updated VariableInstanceEntity in the insertedObjects list. Can you explain why the reordering occurs?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For now, I have been able to workaround this issue by calling touch on the attributes after the VariableInstanceEntity has been updated to correct the order.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see any choice but to be very dependent on the Activiti internal code due to the insert/delete optimizations that occur in the DbSqlSession flush method (assuming we choose to use referential integrity). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are still evaluating whether we want to use referential integrity at the moment. For now we are attempting to use it to ensure our extension attributes are cleaned up when the related activiti object no longer exists since we have run into cases where the attributes were not being cleaned up and our tests were still passing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 13:18:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206333#M159463</guid>
      <dc:creator>rhafner</dc:creator>
      <dc:date>2014-11-05T13:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Activiti with Custom Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206334#M159464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the reorder happens for exactly the problem you state: referential constraints, if a change was made to that object we put it at the end of the list so we are sure any dependent objects are inserted before.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 10:28:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-activiti-with-custom-properties/m-p/206334#M159464</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-11-10T10:28:16Z</dc:date>
    </item>
  </channel>
</rss>

