<?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: Update Process Design on Runtime in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145433#M101628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The resources in a deployment in activiti are read-only, so they can't be altered using the API. What you COULD do, is deploy a new version of the process-definition, and run the SetProcessDefinitionVersionCmd on all the existing process-definitions, to force them using the update version:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/**&lt;BR /&gt; * {@link Command} that changes the process definition version of an existing&lt;BR /&gt; * process instance.&lt;BR /&gt; * &lt;BR /&gt; * Warning: This command will NOT perform any migration magic and simply set the&lt;BR /&gt; * process definition version in the database, assuming that the user knows,&lt;BR /&gt; * what he or she is doing.&lt;BR /&gt; * &lt;BR /&gt; * This is only useful for simple migrations. The new process definition MUST&lt;BR /&gt; * have the exact same activity id to make it still run.&lt;BR /&gt; * &lt;BR /&gt; * Furthermore, activities referenced by sub-executions and jobs that belong to&lt;BR /&gt; * the process instance MUST exist in the new process definition version.&lt;BR /&gt; * &lt;BR /&gt; * The command will fail, if there is already a {@link ProcessInstance} or&lt;BR /&gt; * {@link HistoricProcessInstance} using the new process definition version and&lt;BR /&gt; * the same business key as the {@link ProcessInstance} that is to be migrated.&lt;BR /&gt; * &lt;BR /&gt; * If the process instance is not currently waiting but actively running, then&lt;BR /&gt; * this would be a case for optimistic locking, meaning either the version&lt;BR /&gt; * update or the "real work" wins, i.e., this is a race condition.&lt;BR /&gt; * &lt;BR /&gt; * @see &lt;A href="http://forums.activiti.org/en/viewtopic.php?t=2918" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?t=2918&lt;/A&gt;&lt;BR /&gt; * @author Falko Menge&lt;BR /&gt; */&lt;BR /&gt;public class SetProcessDefinitionVersionCmd implements Command&amp;lt;Void&amp;gt;, Serializable {&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2013 15:09:20 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-01-16T15:09:20Z</dc:date>
    <item>
      <title>Update Process Design on Runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145432#M101627</link>
      <description>Hello..We designed a process and deployed to activiti.. The process has many recieve tasks and timer boundary events..We started many porcess instance. We found a bug in process design and we ant to change it. We change the pocess design and deploy new process diagram to activiti again.. We update a</description>
      <pubDate>Wed, 16 Jan 2013 12:55:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145432#M101627</guid>
      <dc:creator>erensimsek</dc:creator>
      <dc:date>2013-01-16T12:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update Process Design on Runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145433#M101628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The resources in a deployment in activiti are read-only, so they can't be altered using the API. What you COULD do, is deploy a new version of the process-definition, and run the SetProcessDefinitionVersionCmd on all the existing process-definitions, to force them using the update version:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;/**&lt;BR /&gt; * {@link Command} that changes the process definition version of an existing&lt;BR /&gt; * process instance.&lt;BR /&gt; * &lt;BR /&gt; * Warning: This command will NOT perform any migration magic and simply set the&lt;BR /&gt; * process definition version in the database, assuming that the user knows,&lt;BR /&gt; * what he or she is doing.&lt;BR /&gt; * &lt;BR /&gt; * This is only useful for simple migrations. The new process definition MUST&lt;BR /&gt; * have the exact same activity id to make it still run.&lt;BR /&gt; * &lt;BR /&gt; * Furthermore, activities referenced by sub-executions and jobs that belong to&lt;BR /&gt; * the process instance MUST exist in the new process definition version.&lt;BR /&gt; * &lt;BR /&gt; * The command will fail, if there is already a {@link ProcessInstance} or&lt;BR /&gt; * {@link HistoricProcessInstance} using the new process definition version and&lt;BR /&gt; * the same business key as the {@link ProcessInstance} that is to be migrated.&lt;BR /&gt; * &lt;BR /&gt; * If the process instance is not currently waiting but actively running, then&lt;BR /&gt; * this would be a case for optimistic locking, meaning either the version&lt;BR /&gt; * update or the "real work" wins, i.e., this is a race condition.&lt;BR /&gt; * &lt;BR /&gt; * @see &lt;A href="http://forums.activiti.org/en/viewtopic.php?t=2918" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/en/viewtopic.php?t=2918&lt;/A&gt;&lt;BR /&gt; * @author Falko Menge&lt;BR /&gt; */&lt;BR /&gt;public class SetProcessDefinitionVersionCmd implements Command&amp;lt;Void&amp;gt;, Serializable {&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 15:09:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145433#M101628</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-16T15:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update Process Design on Runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145434#M101629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont want to change proc_def_id. I want to change only the all design of process..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I solved this problem with this code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public void clearDeploymentCache() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; DeploymentCache deploymentCache = ((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getDeploymentCache();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Map&amp;lt;String, ProcessDefinitionEntity&amp;gt; map = deploymentCache.getProcessDefinitionCache();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; map.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; mapKn = deploymentCache.getKnowledgeBaseCache();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; mapKn.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for eveything.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 07:32:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145434#M101629</guid>
      <dc:creator>erensimsek</dc:creator>
      <dc:date>2013-01-23T07:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update Process Design on Runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145435#M101630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; updating processes is possible and it works just fine for minor fixes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Here is how to do it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1: Execute SQL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;– UPDATE ACT_GE_BYTEARRAY &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;– SET &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BYTES_ = {put your bytes here}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;– WHERE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACT_GE_BYTEARRAY.DEPLOYMENT_ID_ IN (SELECT &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEPLOYMENT_ID_&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACT_RE_PROCDEF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KEY_ = '{add process key here}')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND ACT_GE_BYTEARRAY.NAME_ NOT LIKE '%.png%';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This will save the process content. You might want to update the sql a bit if you do not want to update all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are adding programatic support you can if you want to reset cache to avoid restarting the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; DeploymentManager deploymentManager = ((ProcessEngineImpl)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processEngine).getProcessEngineConfiguration().getDeploymentManager();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; deploymentManager.getKnowledgeBaseCache().clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; deploymentManager.getKnowledgeBaseCache().clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AlfrescoBlog.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 12:46:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145435#M101630</guid>
      <dc:creator>savic_prvoslav</dc:creator>
      <dc:date>2016-07-26T12:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update Process Design on Runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145436#M101631</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;use &lt;/SPAN&gt;&lt;CODE&gt;org.activiti.engine.impl.cmd.SetProcessDefinitionVersionCmd&lt;/CODE&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2016 15:04:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/update-process-design-on-runtime/m-p/145436#M101631</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-08-17T15:04:45Z</dc:date>
    </item>
  </channel>
</rss>

