<?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: Custom email selector form property - having issues understanding default data in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126188#M88792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I have learned so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this code fragment:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;public Field getPropertyField(FormProperty formProperty)&amp;lt;/java&amp;gt; there is a FormProperty object. The form property object has the following information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isReadable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isRequired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isWriteable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;value&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you place a value in "default" it will be passed on to the value property. There is no property (that I can see) that passes some kind of a java collection with the information that you put in "Form Values". In other words, it looks like that gets ignored for custom form properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bottom line on question #1 above: if I want to have default values then I will need to place them into the "Default" as a string and use those in my logic. Possibly a better way to get names and email addresses would be to enter all those that I need as users and query the user database or use the database in some way to store names/email addresses. Another way might be to use Drools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question #2 above: It looks like the value of my "emails" field is available at any time in the process definition by using ${emails}. I still have not figured out how to pull this info in a script though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 May 2013 14:40:45 GMT</pubDate>
    <dc:creator>ericsnyder</dc:creator>
    <dc:date>2013-05-10T14:40:45Z</dc:date>
    <item>
      <title>Custom email selector form property - having issues understanding default data</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126187#M88791</link>
      <description>I am developing custom form property that is an email selector using a TwinColSelect. The heart of my issue is that I don't understand how to handle the data for the TwinColSelect. I need to prepopulate the property with some email addresses and then allow users to add their own as well. I will also</description>
      <pubDate>Thu, 09 May 2013 22:15:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126187#M88791</guid>
      <dc:creator>ericsnyder</dc:creator>
      <dc:date>2013-05-09T22:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom email selector form property - having issues understanding default data</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126188#M88792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what I have learned so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this code fragment:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;public Field getPropertyField(FormProperty formProperty)&amp;lt;/java&amp;gt; there is a FormProperty object. The form property object has the following information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;id&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isReadable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isRequired&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;isWriteable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;value&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you place a value in "default" it will be passed on to the value property. There is no property (that I can see) that passes some kind of a java collection with the information that you put in "Form Values". In other words, it looks like that gets ignored for custom form properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bottom line on question #1 above: if I want to have default values then I will need to place them into the "Default" as a string and use those in my logic. Possibly a better way to get names and email addresses would be to enter all those that I need as users and query the user database or use the database in some way to store names/email addresses. Another way might be to use Drools.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question #2 above: It looks like the value of my "emails" field is available at any time in the process definition by using ${emails}. I still have not figured out how to pull this info in a script though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 14:40:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126188#M88792</guid>
      <dc:creator>ericsnyder</dc:creator>
      <dc:date>2013-05-10T14:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom email selector form property - having issues understanding default data</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126189#M88793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;#1: I presume you have overridden the initFormTypes() method on processEngineConfiguration (or use the setFormTypes(…) method) with a custom implementation of org.activiti.engine.impl.form.FormTypes. If not, create such a class that creates a FormType subclass specifically for your emailCheckList type, passing the "values" that are defined in the XML to the actual Type pojo, so you can access them (see org.activiti.explorer.ui.form.EnumFormPropertyRenderer where the values are extracted):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; public AbstractFormType parseFormPropertyType(FormProperty formProperty) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("emailCheckList".equals(formProperty.getType()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;String, String&amp;gt; values = new LinkedHashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (FormValue formValue: formProperty.getFormValues()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.put(formValue.getId(), formValue.getName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; formType = new YourOwnFormType(values);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return super.parseFormPropertyType(…);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; } &lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;#2: You mean a SciptTask? You can use "var mails = execution.getVariable("emails");" (if you're using javascript). The execution-object is exposed as a root-object in all scripting engines you use.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 08:04:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-email-selector-form-property-having-issues-understanding/m-p/126189#M88793</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-05-14T08:04:00Z</dc:date>
    </item>
  </channel>
</rss>

