When we are dealing with Process Instance Migration & Historic Process Instance

We are using bpmn-js to display the Process Definition Model on the web page.

We use client function canvas.addMarker(item.activityId, ‘current-activity’) to highlight current activity on the diagram with the current activity id retrieved from server. It works great.

Then we just thought highlighting the current activity is not enough. User also needs to know the execution path of the process even some activities was finished. It would be very useful when user checks on the complicated process.

We use JAVA API historyService.createHistoricProcessInstanceQuery() to get all the historic data, including current activity data.

Finally, we can highlight the historic activities and current activity with different styles. All works good.

Until we are facing the Process Instance Migration, we just found the migration did NOT affect the finished activities. Fox example, we just changed the activity id, and it was a process instance’s finished activity. After migration, we still only get the history activity with old id. It will cause the bpmn-js error with mismatched activity id.

Based on this, we would prefer to:

  1. Displays the model diagram with Process Definition Id instead of key.
  2. Updates existing Process Definition and saves with new name, instead of replacing the existing one.
  3. With adding new Process Definition we might not need to involve the Process Instance Migration.

We like to know if we are doing the right thing. Any suggestion would be appreciated.