<?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: How to save CustomProperty with complex value to XML? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86785#M58712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm sorry, I see how that's confusing. It's been such a long time we touched this, that I'd forgotten it myself. To use the DataGrid or any other ComplexDataType, you need to write your own ExportMarshaller. Since you're the only person who probably knows what you want to get from the grid, you're the only person who can write a sensible export for it. That was the thinking back then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, at the moment, with the 5.9 releases, ExportMarshallers are not invoked on save. There are plans to re-implement this, but at the moment there's little else to be done than adding your logic by hand. For instance, starting at the point in code that you found already. If you take the marshaller from there, you can write custom XML.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 17:43:54 GMT</pubDate>
    <dc:creator>tiesebarrell</dc:creator>
    <dc:date>2012-07-16T17:43:54Z</dc:date>
    <item>
      <title>How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86782#M58709</link>
      <description>I have a "little" problem here in my code…I have to save more complex value than String as custom property to process XML. So I found out that there is something like ComplexDataType, but it's only totally empty interface. So I implemented my version of it and I'm calling saving then. CustomProperty</description>
      <pubDate>Thu, 12 Jul 2012 07:31:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86782#M58709</guid>
      <dc:creator>ajuszkiewicz</dc:creator>
      <dc:date>2012-07-12T07:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86783#M58710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To do this, you'll need to tell Activiti Designer how to marshall / unmarshall your ComplexDataType - that also means modifying Designer. Take a look at how the DataGrid type is handled. It's broken at the moment, but the gist of it is in there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2012 10:11:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86783#M58710</guid>
      <dc:creator>tiesebarrell</dc:creator>
      <dc:date>2012-07-14T10:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86784#M58711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;To do this, you'll need to tell Activiti Designer how to marshall / unmarshall your ComplexDataType - that also means modifying Designer. Take a look at how the DataGrid type is handled. It's broken at the moment, but the gist of it is in there.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sorry but could you be more specific? I analyzed the code and didn't find ANY usage of DataGrid apart from 1 in CloneUtil… (I am looking in Activiti Designer 5.9.1). I also found something interesting. In class ServiceTaskExport (which is meant to marshall service task to XML if I', right), interesting stuff happens in lines 81-83:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;if (customProperty.getSimpleValue() == null || customProperty.getSimpleValue().length() == 0) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;This means that even if I have complex value set in custom property, it's always ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What can I do with this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 10:40:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86784#M58711</guid>
      <dc:creator>ajuszkiewicz</dc:creator>
      <dc:date>2012-07-16T10:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86785#M58712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm sorry, I see how that's confusing. It's been such a long time we touched this, that I'd forgotten it myself. To use the DataGrid or any other ComplexDataType, you need to write your own ExportMarshaller. Since you're the only person who probably knows what you want to get from the grid, you're the only person who can write a sensible export for it. That was the thinking back then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, at the moment, with the 5.9 releases, ExportMarshallers are not invoked on save. There are plans to re-implement this, but at the moment there's little else to be done than adding your logic by hand. For instance, starting at the point in code that you found already. If you take the marshaller from there, you can write custom XML.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 17:43:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86785#M58712</guid>
      <dc:creator>tiesebarrell</dc:creator>
      <dc:date>2012-07-16T17:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86786#M58713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I hope that it will be fixed in one of next releases and described in user guide (how to write your own ExportMarshaller and where to register it to work) &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;For now I 'invented' very dirty workaround - I use my complex object in section but when it comes to saving, I marshal it to String and save value as simple value. Then, when I want to read value from CustomProperty, I have to call unmarshalling manually to get complex object again. It is very ugly, but it works for now…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 07:03:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86786#M58713</guid>
      <dc:creator>ajuszkiewicz</dc:creator>
      <dc:date>2012-07-17T07:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86787#M58714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How to write your own ExportMarshaller is in part described in the userguide here &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#N125AD" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#N125AD&lt;/A&gt;&lt;SPAN&gt; but it will need to be updated because the API for ExportMarshallers will change. This is unfortunate, but is the only way that makes sense due to changes in the fundamental setup of Designer's model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You workaround is actually not that far from the only way we could implement this in a generic sense. I think we should add a marshall() / unmarshall() method group to the ComplexDataType interface, so you can marshall and unmarshall to and and from a string format. The string would then be added to a CDATA element in the BPMN. If you need to do any custom processing for output, you should write your own ExportMarshaller anyway, but at least you would be able to get the data in a consistent manner.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 07:23:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86787#M58714</guid>
      <dc:creator>tiesebarrell</dc:creator>
      <dc:date>2012-07-17T07:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to save CustomProperty with complex value to XML?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86788#M58715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;BTW, this is the issue you can watch to follow along when stuff gets implemented. &lt;/SPAN&gt;&lt;A href="http://jira.codehaus.org/browse/ACT-1261" rel="nofollow noopener noreferrer"&gt;http://jira.codehaus.org/browse/ACT-1261&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 07:25:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-save-customproperty-with-complex-value-to-xml/m-p/86788#M58715</guid>
      <dc:creator>tiesebarrell</dc:creator>
      <dc:date>2012-07-17T07:25:36Z</dc:date>
    </item>
  </channel>
</rss>

