<?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 How to build a UserTask Form programmatically in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-build-a-usertask-form-programmatically/m-p/33048#M13984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community.&lt;/P&gt;&lt;P&gt;In my Activiti BPM process i have a Service Task to retrieve the information that i would use to build the Enum Form property in the next User Task activity as depicted in the image below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/17008_myfilename-20171012131535777.png" style="width: 620px; height: 112px;" /&gt;&lt;/P&gt;&lt;P&gt;Then in the Java class bound to the "Retrieve the Type of Device..." Service Task i need to retrieve the types of device and build the enum property to present to the user through Activiti Explorer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to use the &lt;EM&gt;org.activiti.engine.FormService&lt;/EM&gt; and &lt;EM&gt;org.activiti.engine.form.TaskFormData&lt;/EM&gt; classes as listed in the code below but when i complete the "Start User Task" i receive the following error: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/17010_error.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I think the error is throwed because the User Task with id "showSignalTask" doesn't exist yet. I have the doubt about the possibility to build programmatically a standard activiti form in this way:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void execute(DelegateExecution execution) throws Exception {&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FormService formService = execution.getEngineServices().getFormService();&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&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;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;TaskFormData taskFormData = formService.getTaskFormData("showSignalTask");&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;List&amp;lt;FormProperty&amp;gt; formProperties = taskFormData.getFormProperties();&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Map&amp;lt;String, String&amp;gt; values = new HashMap&amp;lt;String, String&amp;gt;();&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ArrayList&amp;lt;String&amp;gt; deviceTypes = WebServiceClient.retrieveTypes();&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for(String deviceType: deviceTypes){&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;values.put(deviceType, deviceType);&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;FormProperty fpro = (FormProperty) new EnumFormType(values);&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;formProperties.add(fpro);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any suggestion will be appreciated&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Oct 2017 13:38:46 GMT</pubDate>
    <dc:creator>leostra</dc:creator>
    <dc:date>2017-10-12T13:38:46Z</dc:date>
    <item>
      <title>How to build a UserTask Form programmatically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-build-a-usertask-form-programmatically/m-p/33048#M13984</link>
      <description>Hi Community.In my Activiti BPM process i have a Service Task to retrieve the information that i would use to build the Enum Form property in the next User Task activity as depicted in the image below.Then in the Java class bound to the "Retrieve the Type of Device..." Service Task i need to retriev</description>
      <pubDate>Thu, 12 Oct 2017 13:38:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-build-a-usertask-form-programmatically/m-p/33048#M13984</guid>
      <dc:creator>leostra</dc:creator>
      <dc:date>2017-10-12T13:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a UserTask Form programmatically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-build-a-usertask-form-programmatically/m-p/33049#M13985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning Community.&lt;/P&gt;&lt;P&gt;Sorry for the remind...are there any suggestion about my request? Otherwhise i need to evaluate an alternative solution with the instrument/construts&amp;nbsp; available in Activiti. &lt;BR /&gt;&lt;BR /&gt;Thanks in advance and apologize for my new message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Leo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 07:40:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-build-a-usertask-form-programmatically/m-p/33049#M13985</guid>
      <dc:creator>leostra</dc:creator>
      <dc:date>2017-10-20T07:40:56Z</dc:date>
    </item>
  </channel>
</rss>

