Leading up to this point, you have been expanding the mapping in Studio and the generated and manual code in Visual Studio to include the Business Object Card and related items, such as Valuesets, Constants rules and Bags. You now have two brand new engines built, ready and rearing to go. The next step is to get them deployed and loaded in the runtime environment and setup the Director runtime so it gains knowledge of all the new stuff. 

In most real life production setups, the runtime environment includes a master server and one or more migration servers. The master server serves as a repository for common files as well as common master databases of the runtime environment. A migration server is a (normally quite powerful) server used to execute the actual migration. In addition the Studio and Visual Studio will be running on the individual Workstation of each team member.

This training setup is of course simpler - everything runs on the same machine. 

Deploy is done using the migFx extension in Visual Studio. The engine is built (compiled) and the resulting libraries are copied to a shared folder on on the master server  
Copy & Load
On the migration server, the runtime must be stopped and restarted, as the running instance has the old version of the engine libraries loaded.
  • When starting, the runtime copies the engine libraries from the shared location on the master server to a local location on the migration server itself
  • Once copied, the new engine libraries are loaded into the running runtime
Once the new engine libraries are loaded in the Runtime, the engine and the runtime must be synchronized.
  • Staging tables must be created/modified in the Staging database for Source System metadata structures, Valuesets and Views
  • Stored procedures in the Staging database to support the export of the Business Objects must be created/modified
  • New and obsolete Business Objects, Source System metadata structures, Valuesets, Views and Runtime Constants must be created/modified in the Migration database
Of course it is crucial that the runtime databases and the generated code in the engine correspond. But don't worry, the engine will always refuse to do anything at all if the two do not match up.

Apart from the first initial step of deploying the engines, you will now leave Visual Studio behind and proceed to the next component in migFx: The Director. The Director is the Windows application that you will use to control and manage ('direct') the execution of migration jobs in the Runtime running on the migration server.

A quick note before you start: From now on, we assume that the preceding exercises in Studio were completed correctly. If at any point you realize that you need to go back to a previous exercise to correct something in Studio, please remember the complete path any correction in Studio needs to go through in order to be operational in the Director.

  1. Studio
    1. Validate without any validation errors
    2. Publish to Generator
  2. Visual Studio
    1. Generate Engine
    2. Deploy Engine, verify that deployment succeeds
  3. Director
    1. Restart Track
    2. Run Setup of relevant Engine  
    3. Check that Setup job completes successfully 

You must go through these steps every time you have modified in Studio in order to test your changes in Director!


Deploy to build the engine and deploy it to the shared folder on the master server.

  • Right-click the class library project in Visual Studio and select MigFx: Deploy in the context menu (for the Source engine right-click the SourceEngineCustom project)

  • The migFx Visual Studio will use the Director to deploy the engine. The Director will show a dialog listing all the tracks where this engine is deployed and lets you optionally restart the track and run the setup after deployment. In this training setup, the engine is only deployed to one track there is only one.

    At this point, you can actually get the Director to restart the track to load the new engine and also to run the subsequent setup job. However, for this exercise you will do that a bit later on, so for now just uncheck the Start/Restart Track checkbox and click the Deploy button

  • The migFx extension will now build the engine and deploy it to the master server

  • Remember to Deploy both the Source- and the Target Engine

That's it, you have now deployed your two new engines to the Runtime environment. Now is the time to leave Visual Studio behind and jump to the Director to start using the engines.


The Director is available in the Windows notification area in the right-hand lower corner of your screen.

  • Click on the Director iconto open the Director context menu
    • Notice that the context menu contains a menu item for each of the 3 projects in the training setup. 
    • For each project the Director could have several so-called Tracks, exactly corresponding to the Destination in the Deploy step above. However, in this training setup there is only one track for each project.
  • Select Workshop -> Training (MigFx – Track 1) to open the Director for that track



Take a little moment to familiarize yourself with the Director interface. It is quite simple.

1 - Indicators
The indicators show whether the Service and the Track are running (green dot) or stopped (red dot)
  • The Service is (normally) a Windows Service running on the Migration Server. However, in your trainee setup the service is a console application dedicated to you and started when you sign on. The only thing the service does is to react to requests to start tracks. If the service is red (not running) you will not be able to start the track. In that case, try to sign off and on again. If the problem persists you will have to contact us to sort it out
  • The track is the migFx runtime as described in the introduction to this exercise. When it is running (green), it has loaded your engines and is ready to execute whatever you ask it to do
2 - Menu
The Director menu is presented as a tree view. Simply click any node in the tree view to select that menu item
3 - Selection area
The selection area will always show exactly what you have selected in the menu and are currently looking at
4 - Client area
The content of the client area changes with whatever you have selected in the menu. It is in the client area you get access to all the information and actions you need to execute the migration

Refresh is not automatic

In most of the panels in the Client Area of the Director, your will see a Refresh button in the lower, right corner. Using the Director, you are really working in a client application sending instructions to the Director Runtime running on a server. In this simplified training setup, the Runtime is executing on the same machine you are using. But in a real life scenario, the Runtime will typically execute on a different server.

The Director Client application is communicating with the Runtime via a web service, and due to this fact the panels in the Director application do not update automatically. You have to click the Refresh button yourself to get the latest news from the Runtime.

So, remember, if you again are scratching your head because some panel in the Director does not show what you expect: Click the Refresh button before you do anything else.

Start (or restart) the track

If the track is stopped (red dot) you need to start it and if it is already running (green dot), you need to restart it in order to copy and load your new engines.

  • Select Execution/Track in the menu 
  • Click the Start or Restart button

The track is now started, has loaded your new engines (provided of course, that you have deployed the engines in the previous step) and is idling, ready to execute your wishes!

Setup Engines

Next step is to run 2 setup jobs to setup the Source-and Target engines in order to synchronize the engines and the runtime

  • In the menu, select Administration/Manage
  • Check these radio buttons
    • Source Engine: Setup only
    • Target Engine: Setup
    • Leave all other on Skip
  • Click the Submit button

  • The Director will now show a dialog previewing the changes in the runtime. In this case the changes are 

    • for the Source engine

      • The new Source metadata structure Src.DebitCard

      • The new View CardStatus

      • The new Business Entity Card

    • for the DataServices

      • Valueset TranslateCardTypes from the Source engine

      • Valuesets CardTypes and CardStatus from the Target Engine

  • You need to click the Accept button on both the Source preview tab and the DataServices preview tab in order to enable the Ok button

  • Click Ok and the Director will submit two jobs, one for each engine

TIP: These last 2 steps of restarting the Track and running setup of the newly deployed engines can be launched directly when deploying the engine from Visual Studio. Just check the Start/Restart Track checkbox and the Run setup checkbox in the Deploy dialog

Possible issue

The preview for the Source Engine will fail, if the Source Engine was not deployed in the previous step. In this case you may see an error dialog like this:

If you experience this error, please go back to the previous step and ensure you have successfully deployed the Source engine. If not, you must deploy the Source Engine and restart the Track before trying to run the Setup of the Source Engine again.

Check jobs

In the Director job list you can follow the execution of the 2 jobs and check that they completed successfully

  • In the Director menu, select Execution/Jobs
  • The 2 newest jobs are at the top of the list
  • In the 2 panels to the right of the job list, you can see
    • The parameters for the job
    • The results of the job execution
  • Click the Instances button to see the job log. If a job fails, this is the place to look for an explanation
  • The job list does not refresh automatically. You must click the Refresh button

What happened here?

You have built and deployed the Source- and Target engines to the Director runtime environment. By restarting the track, you cause the track to load the new engines and finally by running the 2 setup jobs you have synchronized the engines and the runtime so the latter now knows about the new the new items you have added in Studio

If you look at the Business Objects to Export (select Source/Objects in the Director menu and click the Refresh button, you will se that the new Card Business Object is now present, but that nothing has been exported yet.

Card is marked red, because it is depending on data from the Source System for Src.DebitCard and also the view CardStatus, both of which have not been loaded yet. So it would not make any sense to export the Cards before loading these.

Luckily that's exactly what you are going to do in the next exercise.