cancel
Showing results for 
Search instead for 
Did you mean: 

Changes to a custom workflow are not applied

lw7415
Champ in-the-making
Champ in-the-making
I have a custom workflow that is deployed in Alfresco Community Edition 5.0.c as part of a larger package of mods. The workflow is deployed in a repository AMP and a Share AMP. In addition to the AMPs there are three email templates that are placed in a folder under /Data Dictionary/Email Templates.

Our tester discovered a minor bug in the workflow. I made the requested change, recompiled the AMPs, applied the AMPs and restarted the Alfresco instance, but the changes to the workflow did not take. Even though the code has been updated and applied, the workflow is still using the old (pre-bugfix) code. I even deleted all existing workflow instances but to no avail – somehow Alfresco remembered the old code and refused to acknowledge the existence of the newer code. The only way I was able to make the workflow code changes apply was to destroy and re-install the Alfresco instance.

This behavior is most disturbing. Is there something that needs to be done to tell Alfresco that a custom workflow definition has changed?

Thanks in advance for the help.
3 REPLIES 3

douglascrp
World-Class Innovator
World-Class Innovator
In that case, you have 2 options.

Using the workflow console, you can run the commands bellow:

undeploy definition name activiti$customWorkflow
deploy activiti alfresco/extension/workflow/customWorkflow.bpmn

But as you are working on 5.0.c, you wont be able to run those commands, because workflow console was removed together with Alfresco Explorer.

The second option you have is to define your workflow register context file to redeploy your workflow on restart.
You can find a sample for this option here https://github.com/jpotts/alfresco-developer-series/blob/master/workflow/workflow-tutorial-repo/src/...

Search for the tag <prop key="redeploy">false</prop>

If you set its value to true, it will redeploy your workflow definition on each restart.

Let me know if you need help to solve this issue.

lw7415
Champ in-the-making
Champ in-the-making

<prop key="redeploy">true</prop>


fixed the issue. Thank you for the help!

Lw

douglascrp
World-Class Innovator
World-Class Innovator
Don't let that option set on production server, or you will have a new workflow definition version every single time you restart Alfresco.
Once you finished your development, set redeploy to false.