<?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 get activiti:field name from a service Task in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33696#M14258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Inside the execute method you can try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// in version 5x you can get the repositoryService using&lt;/P&gt;&lt;P class=""&gt;// execution.getEngineServices().getRepositoryService(&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;BpmnModel model =&amp;nbsp;&lt;/SPAN&gt;repositoryService.getBpmnModel(&lt;SPAN class=""&gt;execution&lt;/SPAN&gt;.getProcessDefinitionId());&lt;/P&gt;&lt;P&gt;FlowElement flowElement = &lt;SPAN style="background-color: #f6f6f6;"&gt;model&lt;/SPAN&gt;.getFlowElement(execution.getCurrentActivityId());&lt;/P&gt;&lt;P&gt;List&amp;lt;FieldExtension&amp;gt; fieldExtensions = ((TaskWithFieldExtensions) flowElement).getFieldExtensions();&lt;/P&gt;&lt;P&gt;// loop through the list to get field extension with name you want fieldExtension.getFieldName()&lt;/P&gt;&lt;P&gt;// if only one extension field then should be the first element&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2018 13:40:21 GMT</pubDate>
    <dc:creator>bassam_al-saror</dc:creator>
    <dc:date>2018-08-01T13:40:21Z</dc:date>
    <item>
      <title>How to get activiti:field name from a service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33695#M14257</link>
      <description>Hello all,I would like your help whether there is a way to get from a java class the "activiti:field name" from a service Task and not only the value. For instance if we have this service task:&amp;lt;serviceTask id="servicetask1" name="Service Task" activiti:class="Test"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;extensionElements&amp;amp;</description>
      <pubDate>Thu, 26 Jul 2018 18:35:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33695#M14257</guid>
      <dc:creator>zaridak</dc:creator>
      <dc:date>2018-07-26T18:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get activiti:field name from a service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33696#M14258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Inside the execute method you can try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// in version 5x you can get the repositoryService using&lt;/P&gt;&lt;P class=""&gt;// execution.getEngineServices().getRepositoryService(&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;BpmnModel model =&amp;nbsp;&lt;/SPAN&gt;repositoryService.getBpmnModel(&lt;SPAN class=""&gt;execution&lt;/SPAN&gt;.getProcessDefinitionId());&lt;/P&gt;&lt;P&gt;FlowElement flowElement = &lt;SPAN style="background-color: #f6f6f6;"&gt;model&lt;/SPAN&gt;.getFlowElement(execution.getCurrentActivityId());&lt;/P&gt;&lt;P&gt;List&amp;lt;FieldExtension&amp;gt; fieldExtensions = ((TaskWithFieldExtensions) flowElement).getFieldExtensions();&lt;/P&gt;&lt;P&gt;// loop through the list to get field extension with name you want fieldExtension.getFieldName()&lt;/P&gt;&lt;P&gt;// if only one extension field then should be the first element&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 13:40:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33696#M14258</guid>
      <dc:creator>bassam_al-saror</dc:creator>
      <dc:date>2018-08-01T13:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get activiti:field name from a service Task</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33697#M14259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the replay and yes it was indeed helpful! Furthermore, in case that someone else need it, it also works outside the execute method and even in another class like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;FlowElement ServiceTaskName =&amp;nbsp; getServiceTask(); // custom method to get Service Tasks from the repositoryService and &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;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;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;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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Bpmn model&lt;/P&gt;&lt;P&gt;FlowElement flowElement = model.getFlowElement(ServiceTaskName.getId());&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;List&amp;lt;FieldExtension&amp;gt; fieldExtensions = ((TaskWithFieldExtensions) flowElement).getFieldExtensions();&lt;BR /&gt;System.out.println("Extension name:&amp;nbsp; "+fieldExtensions.get(0).getFieldName());//if only contains 1 element&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Alexander.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Aug 2018 18:10:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-activiti-field-name-from-a-service-task/m-p/33697#M14259</guid>
      <dc:creator>zaridak</dc:creator>
      <dc:date>2018-08-04T18:10:01Z</dc:date>
    </item>
  </channel>
</rss>

