[Refactor] Move Entity is Deprecated in Platform OS11
Forge component by Francisco Menezes

Hi All,

We tried to use the Refactor component for the first time, to move some entities from an espace to another espace. We considered trying this component (in a "sandbox environment" - DEV) as experience because we have other cases to migrate. And we decided to start with a small and legacy application, which in recent times has been updated a few times but needed architectural changes to improve the overall environment, to be more compliant with best practices too.

We followed step by step:

  1. Creating the new data model, Copying & Pasting the Entities from the <Source eSpace> to the <Target eSpace>
  2. Setting the eSpace Action Entity_Move to be called inside the action OnPublish, in the right place (as described in the instructions)
  3. Publishing a solution with the <Source eSpace> and <Target eSpace>, with full compilation option checked
  4. Removing the original entities and republishing the <Source eSpace>;
  5. Updating the consumers of the entities that were migrated.

The result was: The data from <Source eSpace> wasn't reconnected with the <Target eSpace>. So, for that reason... the refactor failed.

We looked at this post on the OutSystems component forum (specifically Gonçalo Martins answer was posted on 2016-03-08), and we decided to do the same: rebuild the action Entity_Move to change the ss_keys between the Source and Target eSpace. After that, every time that we published the old eSpace (Source), the OutSystems platform duplicated all the eSpace entities in the DB, with new entries in OSSYS_ENTITY too.

We only managed to solve the problem when we published a solution with the original eSpaces (Source) from the QA environment.

We looked at the database and we noticed that there is now a new system table called OSSYS_ENTITY_CONFIG. This table was created in our environment after we migrated from OS10 to OS11. This table contains fields that we suspect that OutSystems is preparing to soon provide a new feature to do the entity and data migration between modules/apps. But we believe that this development is running since we upgraded our environment from OS10 to OS11. So, because of this, I guess that this component can be considered as "deprecated".

Opinions are welcome ;-)


Breno Nico


Myself and my team did substantial testing today.

1. If it kept reverting OSSYS_ENTITY, it's because you did not use a Solution and publish with "Compile with Full Compilations" checked.

2. It worked fine in P11, with no changes needed.

3. The OSSYS_ENTITY_CONFIG gets updated by the publish system, it does not drive the publish system.

I have asked to join the Refactor team so that I can update the component to P11, and then from there from some improvements in usage. I would much prefer to see this driven by a configuration file of some sort then to have developers writing and deploying code to make things work.


Maybe you can persuade OutSystems to make you co-developer here as Fransisco doens't seem to support this tool anymore :-( 



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.