<?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: Filling the form fields by values from external system. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113867#M80189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I managed my task listener to work, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said I'm rookie in all these java stuffs, I copied the Listener.jar to wrong directory. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2012 10:11:44 GMT</pubDate>
    <dc:creator>mutcha</dc:creator>
    <dc:date>2012-07-06T10:11:44Z</dc:date>
    <item>
      <title>Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113856#M80178</link>
      <description>Let's say I have prepared bpmn20.xml file with process, where one of tasks has defined simple form, so In the Eclipse designer in the properties of the task in "Form" section I added few textfields in the form. Then I upload this deployment to Activiti Explorer. Is it possible when the form for the</description>
      <pubDate>Thu, 05 Jul 2012 13:37:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113856#M80178</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-05T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113857#M80179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you mean that, every time the form is going to be shown, at that moment, a call is done to fill in the values? Than no.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you can do with the out-of-the-box explorer is have a task-listener on the task which does the webservice-call and fills in some variables on the task/process. Your formProperties can use the "variable" attribute to point the the variable, holding the value looked up in your web service. However, this is done ONLY ONCE, when the process flow reaches the user-task and waits there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The form-property mechanism is pluggable, so you could have a property of type "custom" that does the webservice-call. This will require somme plugging in your explorer-configuration but is quite simple. Alternatively, you can also alter the UI based on the special types, this is also pluggable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 13:45:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113857#M80179</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-05T13:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113858#M80180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know any example of task listener, how to implement it? some tutorial or maybe some project example which I could download?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 14:08:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113858#M80180</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-05T14:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113859#M80181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And also can I use the "variable" approach to fill the comboboxes with some many options ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 14:09:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113859#M80181</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-05T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113860#M80182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I found the example in the user guide.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 14:25:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113860#M80182</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-05T14:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113861#M80183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please consult userguide before asking questions. It contains tons of stuff &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#taskListeners" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#taskListeners&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want the combo-boxes populated with values that are not defined in the process, you'll have to plug in your own FormProperty:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example of this is in explorer itself:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - org.activiti.explorer.form.UserFormType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - UI for it: org.activiti.explorer.ui.form.UserFormPropertyRenderer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - Both classes plugged in into context-file&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 14:42:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113861#M80183</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-05T14:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113862#M80184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Uhhmm… Can't you have the expressions of form properties point to a cdi bean which when called does some logic, e.g. Retrieve info from a database?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 16:57:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113862#M80184</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-07-05T16:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113863#M80185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ronald, you can. However, this only works when the form-property is read-only. If that's not the case, when submitting the values, the expression will be used to "set" (which will fail).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;if (modelValue != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (variableName != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable(variableName, modelValue);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (variableExpression != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variableExpression.setValue(modelValue, execution);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable(id, modelValue);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 06:20:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113863#M80185</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-06T06:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113864#M80186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I am testing the approach with Task Listener at the creation of the task, but the class of task listener is not loaded in Activiti-Explorer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read some posts to handle it and I found that jar must be exported using normal Eclipse Export method but still I have a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I got following exception during starting of the process after deployment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cause: org.activiti.engine.ActivitiException: Exception while invoking TaskListener: couldn't instantiate class mhcc.app.incidentservice.app.internal.Listener&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how my Task definition looks like (just part of the xml file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;lt;userTask id="usertask1" name="Describe the accident" activiti:assignee="kermit"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;activiti:taskListener event="create" class="mhcc.app.incidentservice.app.internal.Listener" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/extensionElements&amp;gt;&lt;BR /&gt;&amp;lt;/userTask&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my class of listener:&lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;package mhcc.app.incidentservice.app.internal;&lt;BR /&gt;&lt;BR /&gt;import org.activiti.engine.delegate.DelegateTask;&lt;BR /&gt;import org.activiti.engine.delegate.TaskListener;&lt;BR /&gt;&lt;BR /&gt;/**&lt;BR /&gt; * Listener for Task&lt;BR /&gt; */&lt;BR /&gt;public class Listener implements TaskListener {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * @see org.activiti.engine.delegate.TaskListener#notify(org.activiti.engine.delegate.DelegateTask)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void notify( DelegateTask delegateTask ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delegateTask.setVariable( "Vehicle", "Funkerss" );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I copied this jar to directory in the Activiti-Explorer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;setup\build\webapps\activiti-explorer.war\WEB-INF\lib&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attachments I present the steps I made during export.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After I copied the Listener.jar I restarted Activiti-Explorer by:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ant demo.stop&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ant demo.start&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have someone idea what I'm doing wrong? I'm quite new in java, maybe I missed something obvious in the xport process of jar or restarting of activiti-explorer??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 08:18:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113864#M80186</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-06T08:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113865#M80187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ronald, you can. However, this only works when the form-property is read-only. If that's not the case, when submitting the values, the expression will be used to "set" (which will fail).&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;if (modelValue != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (variableName != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable(variableName, modelValue);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (variableExpression != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variableExpression.setValue(modelValue, execution);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariable(id, modelValue);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Why would calling a setter fail? If you have a getter and setter (and no 'actual' db work should not be done in the getter) and the setter stores things? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Still glad we do not use the formproperties for actual form stuff, more in a way of having 'task parameters' :-))&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 09:16:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113865#M80187</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2012-07-06T09:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113866#M80188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Calling a setter won't fail… but the same expression is used to get the value from the field and setting it. So you can only use it for read-only form-properties. Unless, off course, you have a bean like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public String getLookupField() …&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void setLookupField(String str) …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and using expression "myBean.lookupField".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 09:57:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113866#M80188</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-07-06T09:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113867#M80189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I managed my task listener to work, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said I'm rookie in all these java stuffs, I copied the Listener.jar to wrong directory. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 10:11:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113867#M80189</guid>
      <dc:creator>mutcha</dc:creator>
      <dc:date>2012-07-06T10:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filling the form fields by values from external system.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113868#M80190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Flow the user guide, we can use task listener to get values from external system.&amp;nbsp; but if start form needs the value, how to get it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; as i know&amp;nbsp; task listener don’t&amp;nbsp; work in the start form.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Feb 2016 03:35:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/filling-the-form-fields-by-values-from-external-system/m-p/113868#M80190</guid>
      <dc:creator>zhuxj</dc:creator>
      <dc:date>2016-02-24T03:35:07Z</dc:date>
    </item>
  </channel>
</rss>

