cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow state change upgrade

Shwe
Champ in-the-making
Champ in-the-making

I have existing workflow with 4 user tasks: DRAFT, PENDING_REVIEW_A,  PENDING_REVIEW_B,  and PENDING_APPROVAL.

Sequence Flows are: 

  • DRAFT to PENDING_REVIEW_A (operation = SUBMIT_A), 
  • DRAFT to PENDING_REVIEW_B (operation = SUBMIT_B), 
  • PENDING_REVIEW_A TO PENDING_APPROVAL (operation = REVIEWED_A), 
  • PENDING_REVIEW_B TO PENDING_APPROVAL (operation = REVIEWED_B)

Let's say the existing flow has been used in production for quite sometime and now below changes are to be done:

Changes to user task:

  • Remove PENDING_REVIEW_A,  PENDING_REVIEW_B
  • Add new task PENDING_REVIEW
  • Add sequence flow from RAFT to PENDING_REVIEW (operation = SUBMIT)
  • Add Sequence flow from PENDING_REVIEW to PENDING_APPROVAL (operation = REVIEWED)

The problem I am facing is how to upgrade existing production transactions to new workflow.

  1. How can existing DRAFT and PENDING_APPROVAL tasks can be upgraded to new workflow version?
  2. How can existing PENDING_REVIEW_A and PENDING_REVIEW_B tasks can be upgraded to PENDING_REVIEW task?

Basically it's existing transactional data handling problem in ACT_* tables.

Thanks so much in advance.

4 REPLIES 4

abbask01
Star Collaborator
Star Collaborator

You might wanna reconsider on migrating existing processes to a newer version. may be let the old processes finish by themselves, anyway activiti will use latest version for new process instance

https://stackoverflow.com/questions/34205814/migrating-activiti-tasks-from-old-process-to-new-proces...

while there IS a way to achieve it, requires coding and is not reliable. (might lead to more issues)

https://hub.alfresco.com/t5/bpm-archive/process-instances-migration/m-p/236329

Hope it helps.

Regards,
Abbas

Shwe
Champ in-the-making
Champ in-the-making

Thanks for the reply and links. 

  1. Since the states are changed (obviously business logic tagging along with those will change as well), allowing in flight cases to continue become a maintenance nightmare.
  2. There will be hardcoding to check what workflow version for in flight cases, correct?
    Can I have advise on the best way and how to do it?

  3. The frontend and business logic will get changed due to workflow changes.
    Does this mean there is a need to hardcode the frontend based on the workflow version too? 

  4. It seems like the system will be stuck with codes to handle old things and then continue for new things even if handled as above points.
    This is not scalable and not to mention future proof. Correct?

  5. Maybe the best way is to end all pending cases so that the system can start with new workflow?
    If yes, possible to share what is the best practice way to do it?

Thanks in advance.

Shwe
Champ in-the-making
Champ in-the-making

It whould be great if someone can help me with above please. Thanks so much in advance.

Shwe
Champ in-the-making
Champ in-the-making

Is there any experienced guru who has gone through before and can help me on this same situation please?

Being enterprise BPM solution, this should be quite common case where long running production in-progress transcational data are to be changed as the workflow have new state or have standardized state changes.

There must be best practice approach of this kind of changes.

Thank you so much.