<?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 Historic service task name does not resolve EL expression in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/historic-service-task-name-does-not-resolve-el-expression/m-p/169974#M123307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can put EL expression into user task definition. When the task is created, the expression is resolved. It's a feature of activiti. And a good feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As it turns out User tasks are different from service tasks from the historic service's point of view (and implementation point of view). Historic user tasks are stored in ACT_HI_TASKINST, service tasks and all other activities are stored in ACT_HI_ACTINST table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The EL name of the User task is resolved fine in ACT_HI_TASKINST but the EL name of Service task and every other activities are not resolved in ACT_HI_ACTINST. I see that user tasks are unique from other activities from implementation point of view, but from a model perspective they are equivalent. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on what I see in org.activiti.engine.impl.bpmn.behavior.UserTaskActivitiyBehavior and ServiceTaskDelegate*ActivityBehavior&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I can have EL in the User Task name, why cannot I have EL in the name of a Service Task or let's say every other activities? I want the name of every activities to be presented nice and shiny not just the User task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can implement it and create a pull request. What I think we have to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the BpmnParseHandlers e.g. in &lt;/SPAN&gt;&lt;STRONG&gt;AbstractBpmnParseHandler.createActivitiyOnScope()&lt;/STRONG&gt;&lt;SPAN&gt; change the &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;activity.setProperty("name", flowElement.getName());&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ExpressionManager expressionManager = bpmnParse.getExpressionManager();&lt;BR /&gt;activity.setProperty("name", expressionManager.createExpression(flowElement.getName()));&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Change the &lt;/SPAN&gt;&lt;STRONG&gt;DefaultHistoryManager.recordActivityStart()&lt;/STRONG&gt;&lt;SPAN&gt; to resolve the el expression of the activity name similar to what is found in &lt;/SPAN&gt;&lt;STRONG&gt;UserTaskActivityBehavior&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;String name = (String)this.taskDefinition.getNameExpression().getValue(execution);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task.setName(name);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course there might be changes needed elsewhere in the code, but I think it's a good starting point. What do you think?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2014 08:33:29 GMT</pubDate>
    <dc:creator>pkonyves</dc:creator>
    <dc:date>2014-05-09T08:33:29Z</dc:date>
    <item>
      <title>Historic service task name does not resolve EL expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historic-service-task-name-does-not-resolve-el-expression/m-p/169974#M123307</link>
      <description>Hi,You can put EL expression into user task definition. When the task is created, the expression is resolved. It's a feature of activiti. And a good feature.As it turns out User tasks are different from service tasks from the historic service's point of view (and implementation point of view). Histo</description>
      <pubDate>Fri, 09 May 2014 08:33:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historic-service-task-name-does-not-resolve-el-expression/m-p/169974#M123307</guid>
      <dc:creator>pkonyves</dc:creator>
      <dc:date>2014-05-09T08:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Historic service task name does not resolve EL expression</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/historic-service-task-name-does-not-resolve-el-expression/m-p/169975#M123308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Very good point and I fully agree that we should provides this functionality across every activity type. If you can create a pull request that would be great. Please also add a couple of unit tests for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;User tasks are stored in ACT_HI_TASKINST because it needs some additional columns. However, for audit log purpose etc, the user task is also part of the ACT_HI_ACTINST table just like the other activity types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 07:17:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/historic-service-task-name-does-not-resolve-el-expression/m-p/169975#M123308</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-05-12T07:17:01Z</dc:date>
    </item>
  </channel>
</rss>

