Posted: 5 Oct 2017 11:52 EDT Last activity: 16 Oct 2018 12:03 EDT
How to Change Classgroup of a workclass while the system is in production
Currently we have two classes Work-AB and Work-AB-CD and there two classes are mapped to two different class groups. the cases data is getting sitting in two different tables like Work_AB and Work_AB_CD and the system is in production.
As per the enhancement request, we are planning to change the class "Work-AB-CD" to belong to a class group which is "Work-AB". if we do this, user cant access the old data of "Work-AB-CD" class.
Any solution will be very helpful in this situation.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Well, of course whatever you try should be carefully tested in dev before putting it in production.
My understanding of the mechanism is that when you ask for a list of work associated with class Work-AB-CD, the system looks in the class ruleform to see what the class group is, so if the class group is Work-AB-CD, then it uses the db table associated with Work-AB-CD to look up the work, so if that db table is called WORK_AB_CD, that's where it will seek the records.
Now, if you CHANGE the class group to Work-AB on the class ruleform for Work-AB-CD, then the next time you ask for a list of work associated with Work-AB-CD, the system will look on the class ruleform and see that the class group is Work-AB, and it will use the db table associated with Work-AB to look up the work, so it is not going to find the work that is still sitting in db table WORK_AB_CD.
This is where it becomes important to test carefully on dev. Since the contents of the work records for class Work-AB-CD already declare their pxObjClass and pzInsKey to be Work-AB-CD, it may be possible to move the records from the WORK_AB_CD db table to the WORK_AB db table at the time you change the class group, without having to change the contents of those work objects, such as pxObjClass and pzInsKey. But test that carefully!
As long as both tables have all of the columns you need, you should be able to move the blob too. Clearly the Data-Admin-DB-Table record for your class will have to point to the new table so that your new items write there and methods like Obj-Open-By-Handle know which table to look in to get access to the old items. I can't think of any tools to move data from one table to another out of the box. You might be able to get away with using the purge/archive wizard to archive the items before you change the classgroup and then re-import them after and it might work, though I've never done it so there are probably challenges that I'm not thinking of.