<?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 Dynamically modify Activiti Service Task Properties in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/dynamically-modify-activiti-service-task-properties/m-p/59595#M36690</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;We have been looking into Activiti for our BPM needs. Forgive my confusion in terminologies as I am very new to Activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have the following requirement&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Main work flow based on certain conditions will choose a certain sub-workflow to execute dynamically at runtime ( I have an Idea of how to establish this, I am thinking a custom task type for this )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Next is the second step and this is where I am stranded. I need to dynamically using API configure properties of Service Task in the sub-workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought I can get Activities within the ProcessDefinition and get Fields within that and modify values of attributes. To explain better&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the following example workflow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start - scm task type (custom) - hudson task type (custom) - end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;scm task type has a property of which SCM type and the SCM Server URL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to dynamically set this in the *workflow definition* and save it so that all future instances of the workflow will use the new property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was thinking about navigating to the required activity and set the property, but I was not able to retrieve the activities from the process definition. The following code always printing 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessDefinition def = repositoryService.createProcessDefinitionQuery().processDefinitionKey("MyProcess11111").list().get(0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessDefinitionEntity ent = (ProcessDefinitionEntity) def;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(ent.getActivities().size());&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I would highly appreciate some guidance on what is the best way to solve this problem and how do I get hold of the specific activity within a process definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Prasanna Rajaperumal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cisco Systems&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jun 2011 18:29:52 GMT</pubDate>
    <dc:creator>prasanna_bits</dc:creator>
    <dc:date>2011-06-08T18:29:52Z</dc:date>
    <item>
      <title>Dynamically modify Activiti Service Task Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/dynamically-modify-activiti-service-task-properties/m-p/59595#M36690</link>
      <description>Hi,We have been looking into Activiti for our BPM needs. Forgive my confusion in terminologies as I am very new to Activiti.We have the following requirement1. Main work flow based on certain conditions will choose a certain sub-workflow to execute dynamically at runtime ( I have an Idea of how to e</description>
      <pubDate>Wed, 08 Jun 2011 18:29:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/dynamically-modify-activiti-service-task-properties/m-p/59595#M36690</guid>
      <dc:creator>prasanna_bits</dc:creator>
      <dc:date>2011-06-08T18:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically modify Activiti Service Task Properties</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/dynamically-modify-activiti-service-task-properties/m-p/59596#M36691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you query for a process-definition, the activities are not initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;ReadOnlyProcessDefinition RepositoryService.getDeployedProcessDefinition(String);&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;That method is only available on the RepositoryServiceImpl, so you need to cast the repositoryService…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 06:14:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/dynamically-modify-activiti-service-task-properties/m-p/59596#M36691</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-06-09T06:14:24Z</dc:date>
    </item>
  </channel>
</rss>

