old version cdt overwriting new data in the table

I have updated a cdt and added an extra column to it. There are few thousands of instances in the old version of the cdt where the extra field is not present. In the process instance as well the cdt is showing in cap sign which means it's referring to the old version. I have done a data migration to populate that extra field for the old instances. However, while writing the data to the table through the process, even though the new column is not present in the old cdt, the database column is getting overwritten by null value.

Is there any way how to avoid this scenario?

Parents
  • I fear there is not a very clean solution for this.  The one time I had to deal with something similar to this, luckily the particular CDT in question was always being written to DB in its own special subprocess which just contained the WTDS node -- in which case, i updated the WTDS subprocess to add a step right before the WTDS node to check whether the newly-added CDT field was empty, and if so, attempt to re-query the value of that column for that DB entry, before executing the update.  Unfortunately if your WTDS nodes are directly contained in your already-running instances, then that means you'd need to edit instances manually to handle this.

    Honestly I think your best bet at this point would be to keep a backup copy of what all the values should be, perhaps in a local file or perhaps in a separate database, and then each time a running instance finishes, either manually check it and revert the overwritten value, or create a special process to do this for you.  If you have a single specific subprocess that always runs right at the end of a given legacy instance, for example, this could be a good target for an automated cleanup option.

Reply
  • I fear there is not a very clean solution for this.  The one time I had to deal with something similar to this, luckily the particular CDT in question was always being written to DB in its own special subprocess which just contained the WTDS node -- in which case, i updated the WTDS subprocess to add a step right before the WTDS node to check whether the newly-added CDT field was empty, and if so, attempt to re-query the value of that column for that DB entry, before executing the update.  Unfortunately if your WTDS nodes are directly contained in your already-running instances, then that means you'd need to edit instances manually to handle this.

    Honestly I think your best bet at this point would be to keep a backup copy of what all the values should be, perhaps in a local file or perhaps in a separate database, and then each time a running instance finishes, either manually check it and revert the overwritten value, or create a special process to do this for you.  If you have a single specific subprocess that always runs right at the end of a given legacy instance, for example, this could be a good target for an automated cleanup option.

Children

 Discussion posts and replies are publicly visible