<?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 What is the correct place for custom Task &amp; Process Def attributes? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240042#M193172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to add few 'metadata' fields to my Process and Task Definitions.&amp;nbsp; Just wondering if ExtensionAttributes are where I'd do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are two examples:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. PermissionToStartProcess - we need to indicate a "Permission" to start the process (example: "Manage Special Events" permission).&amp;nbsp; It is a String that points to a valid "Permission" name in our own security realm.&amp;nbsp; If the User does not have the permission "configured" in the ProcessDefinition, they will be denied the ability to start the process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. AutoAssignOnCreate - we want to tag a UserTask as either AutoAssignOnCreate&amp;nbsp; = true/false.&amp;nbsp; If True, we have an AutoAssignTaskListener assign it immediately.&amp;nbsp; Otherwise, ignore and let the User belonging to the ProcessDefinition's candidate groups/users fight it out to get an assignee.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, should I be using an ExtensionAttribute in the XML (or BpmnModel Java class) to configure these?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or, do I need to build some kind of custom table to hold these configuration fields &amp;amp; look them up using the TaskDefinitionKey and ProcessDefinitionKeys?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2016 02:02:09 GMT</pubDate>
    <dc:creator>jwestra</dc:creator>
    <dc:date>2016-04-05T02:02:09Z</dc:date>
    <item>
      <title>What is the correct place for custom Task &amp; Process Def attributes?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240042#M193172</link>
      <description>I need to add few 'metadata' fields to my Process and Task Definitions.&amp;nbsp; Just wondering if ExtensionAttributes are where I'd do this?Here are two examples:1. PermissionToStartProcess - we need to indicate a "Permission" to start the process (example: "Manage Special Events" permission).&amp;nbsp; It is a Str</description>
      <pubDate>Tue, 05 Apr 2016 02:02:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240042#M193172</guid>
      <dc:creator>jwestra</dc:creator>
      <dc:date>2016-04-05T02:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct place for custom Task &amp; Process Def attributes?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240043#M193173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That would need to go into the extensionElements (or maybe extensionAttributes). That's what they are for in the BPMN specification.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You indeed will need to go via the BpmnModel to look these up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:02:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240043#M193173</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-07T10:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct place for custom Task &amp; Process Def attributes?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240044#M193174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK.&amp;nbsp; Here's the plan then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In task listeners that need access to my custom extensions (e.g. AutoAssignTaskListener), I will take the ProcessDefinition ID from the DelegateTask and query the RepositoryService to get the BpmnModel containing these extensions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BpmnModel model = RepositoryService.getBpmnModel(processDefinitionId)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// get Process from model&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// get FlowElement for the DelegateTask my task listener is handling&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// get ExtensionElements and/or ExtensionAttributes for the FlowElement&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// verify the value and run logic on it (e.g., isAutoAssignOnCreate == true)&amp;nbsp; then auto-assign it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My concern is that loading the BpmnModel each time my AutoAssignTaskListener.notify() is invoked will be costly.&amp;nbsp; Does Activiti have a "cache by ProcessDefinitionId" for the BpmnModels , which would eliminate call to the Repository DB tables constantly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 16:31:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240044#M193174</guid>
      <dc:creator>jwestra</dc:creator>
      <dc:date>2016-04-07T16:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is the correct place for custom Task &amp; Process Def attributes?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240045#M193175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, all process definitions are cached, so no database call will be made.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2016 09:18:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/what-is-the-correct-place-for-custom-task-process-def-attributes/m-p/240045#M193175</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-04-12T09:18:06Z</dc:date>
    </item>
  </channel>
</rss>

