cancel
Showing results for 
Search instead for 
Did you mean: 

WorkflowService and deployDefinition()

kma
Champ in-the-making
Champ in-the-making
Hi,

On the WorkflowService there are a method called deployDefinition().
As far as I understand this method can be used to deploy a workflow
at runtime.  When the server is restarted I need to redeploy the previous
deployed workflow, how can that be done, is there a possibility to invoke
code during server start ?


Thanks,
KMa
2 REPLIES 2

seshu
Champ in-the-making
Champ in-the-making
You can definitely do that. In your context file that deploys workflows add this <prop key="redeploy">true</prop>

davidc
Star Contributor
Star Contributor
A workflow definition only needs to be deployed once.  When deployed, it remains deployed, even after shutdown and restart.

A workflow definition only needs to be redeployed when the workflow definition has changed.  Re-deploying a workflow definition creates a new version of it in Alfresco.  The previous definition remains for in-flight workflows depending on it.

If you change <redeploy> to true, this will re-deploy the workflow definition on every startup of Alfresco, even if the workflow definition has not changed.  It should only be done when testing, and not for production systems.  Remember, a new version is created on each redeploy.