<?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 Modifing userTask's formKey using Activit API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150907#M105719</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;I'm trying to modify the form key for a userTask using Activiti API. &amp;lt;!–break–&amp;gt;I've seen no method in FormService to achieve this, so, my first approach is to get the XML of the currently deployed process, add or modify the userTask "activiti:formKey" attribute, and redeploy it with the same name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lokks like it is correctly working, however, when it is done more than once, activiti engine seems to hang. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've deployed an Activiti Explorer pointing to the same database, and I can see my deployment corerctly modify, but when I try to delete that deployment through Activiti Explorer, I have to reload the page myself to get it refreshed. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code used for deploying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;DeploymentBuilder deploymentBuilder = new DeploymentBuilderImpl((RepositoryServiceImpl)this.processEngine.getRepositoryService());&lt;BR /&gt;deploymentBuilder.addInputStream(bpmnResourceName, new ByteArrayInputStream(getStringFromDocument(processDocument).getBytes()));&lt;BR /&gt;deploymentBuilder.name(processDefinition.getDiagramResourceName().substring(0,processDefinition.getDiagramResourceName().indexOf(".process.png")));&lt;BR /&gt;deploymentBuilder.deploy();&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where getStringFromDocument(processDocument).getBytes()) returns the modified process XML. I've checked it out and it is returning exactly the same&amp;nbsp; as the original ".bpmn20.xml" file, but with the corresponding "activiti:formKey" added .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"bpmnResourceName" is the same name as original deployment; for example, "MyProcess.bpmn20.xml".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"processDefinition" is the processDefinition I'm trying to modify.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Been searching around the forum but haven't found any related topic..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it the correct approach? Is there any other approach to modify a task's formkey using Activiti API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Apr 2014 18:48:22 GMT</pubDate>
    <dc:creator>aigloss</dc:creator>
    <dc:date>2014-04-12T18:48:22Z</dc:date>
    <item>
      <title>Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150907#M105719</link>
      <description>Hi, I'm trying to modify the form key for a userTask using Activiti API. &amp;lt;!–break–&amp;gt;I've seen no method in FormService to achieve this, so, my first approach is to get the XML of the currently deployed process, add or modify the userTask "activiti:formKey" attribute, and redeploy it with the sa</description>
      <pubDate>Sat, 12 Apr 2014 18:48:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150907#M105719</guid>
      <dc:creator>aigloss</dc:creator>
      <dc:date>2014-04-12T18:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150908#M105720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What do you mean with "seems to hang"? Are you using the Activiti Explorer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding a new version of the process definition like this is fine.&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, 14 Apr 2014 07:40:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150908#M105720</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-04-14T07:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150909#M105721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your quick response. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently using Spring to access the Process Engine. By "seems to hang" I mean I can keep using my app as long as what I try to use is not related to ProcesEngine. For example, if I try to query the database for current deployed processes, it is not responding, but I can navigate anywhere in my app that does nothing to do with ProcessEngine. Besides, when stopping Tomcat, it shows an error related to n query made by ProcessEngine to Process Definitions tables (have to kill the process since my app is not undeployed). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After doing a bunch of testing, I've find out that, when debugging the server, the problem is gone, so it looks like some kind of concurrency problem; so I'm refactoring my app to try get rid of it. (if you want, I can try to rollback my changes to get that error back and show it in this thread)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, is there any other way to change a task formkey than redeploying the whole process definition?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 08:11:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150909#M105721</guid>
      <dc:creator>aigloss</dc:creator>
      <dc:date>2014-04-14T08:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150910#M105722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The error in the log that "hangs" my app is back:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;em&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error may exist in org/activiti/db/mapping/entity/ProcessDefinition.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error may involve org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity.selectProcessDefinitionsByQueryCriteria&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### The error occurred while executing a query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;### SQL: select * from ( select a.*, ROWNUM rnum from (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select RES.*&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; from ACT_RE_PROCDEF RES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&amp;nbsp; RES.VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = RES.KEY_)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by RES.ID_ asc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) a where ROWNUM &amp;lt; ?) where rnum&amp;nbsp; &amp;gt;= ?]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/em&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is thrown in catalina.out when trying to redeploy my app. Any help would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 19:49:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150910#M105722</guid>
      <dc:creator>aigloss</dc:creator>
      <dc:date>2014-04-14T19:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150911#M105723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using an in-memory H2 database?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 14:26:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150911#M105723</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-04-16T14:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150912#M105724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No. I'm currently using Oracle 11.2.0.2.0 and Activiti 5.14. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The datasource is defined at server level and is used by some other apps, but none of them is having any problem with the database. &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 15:55:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150912#M105724</guid>
      <dc:creator>aigloss</dc:creator>
      <dc:date>2014-04-16T15:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Modifing userTask's formKey using Activit API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150913#M105725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only way you can change the form-key is by deploying the process-definition again (effectively creating a new version of the process-definition, will not be applied for running versions) or manually update the database process-definition XML with the correct values (at own risk).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 10:22:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/modifing-usertask-s-formkey-using-activit-api/m-p/150913#M105725</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-04-22T10:22:27Z</dc:date>
    </item>
  </channel>
</rss>

