cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to coexist two workflows in one DB???

mauwarrior
Champ in-the-making
Champ in-the-making
Is there a way to coexist two workflows in one DB?

Scenario: At first I deployed my workflow and it goes well. Deployment details had been recorded in act_re_deployment table. Users started using the webapp following the deployed Workflow.

Problem: Due to some changes in the approval, I need to update the design of my workflow. As far as my knowledge of the activiti, I need to deploy the updated workflow for changes to take effect. I tried to deploy the workflow along with the old workflow pointing to one database. Deployment will be successful as evident on the record shown on my act_re_deployment. Once deployment is successful, a clickable process will be created in my process list. It goes to say, that when I deploy a new workflow, it will also create an instance of the clickable process. Problem is, since the new deployment is only an update of the old workflow. There will be two instance of the process showing on my web page. when i try to start a process, i cannot start it anymore and throws an error on org.activiti.engine.impl.AbstractQuery.class
"Query returns 2 results instead of max 1".

Resolutions: Now I want to know if my new workflow will take effect and will perform the new functions. In order to do this, I created a new database to deploy my new workflow since deploying it on the old database along with the old workflow will throw the problem mentioned above. My workflow will be deployed and will behave as expected and no problem anymore with the logic flow.

Need help: Now what I want is; since some transactions had already been made using the old workflow and some of them are on pending status, I need to be able to run the old workflow functioning at the same time with the new workflow. New transactions will follow the new workflow and old transactions will follow old workflow… I cannot do this since there is a limitation if I want to coexist two workflows in one DB…

P.S. New workflow is an upgrade of the old workflow. Same bpmn but edited with the addition of approvals…

PLEASE HELP! This matter is urgent since transactions are made everyday and relies mostly on the workflow of the system…
If you're not still getting the picture, I am willing to give more details about the problem…
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
This is the third time I read this post in some form from the same author. I already answered on one of the other two.

mauwarrior
Champ in-the-making
Champ in-the-making
Thanks for answering all my posts. Sorry if the topics are correlating. With regards to my problem, I was able to deploy two bpmn files (the other bpmn file is an updated version of the old bpmn file). I figured out why it is having problems with the query. It is because I am deploying both bpmn file with the same ID which should not be the case. Although as you have said from the previous post that it is possible to query the latest bpmn file by using the latestversion() method. Currently, both my workflows are deployed and each of the workflows follows different process definitions, old workflow is working at normal operations but I cannot run through the processes of my new workflow. Does it mean, if I have to work on two workflows, I have to make a separate (controller, model, model config, validator, and a .jsp for the pages to load up? I am expecting that my new workflow can used the pages used by my old workflow since they are identical? It seems that every time I open my new workflow to perform the process, No page found is returned. There is no error logs, stacktrace that will give a hint on the error. All I can see on my page is "Error 404: Page Not Found!". Please help..!!Thank you!!!

jbarrez
Star Contributor
Star Contributor
" Does it mean, if I have to work on two workflows, I have to make a separate (controller, model, model config, validator, and a .jsp for the pages to load up?"

No, you do not. The Activiti API's are such that you can work generically with process definition ids, instance id,s etc. Check the Activiti Explorer app for an idea.

I can't really comment on the 'no page found' … that sounds like something from your custom app?