An AddIn for PowerDesigner to synchronize OData metadata with a PDM model
In order to use the plugin, execute the MSI installer which can be downloaded from the asserts list from the latest stable release.
Make sure to restart PowerDesigner after the installation. Then open Tools > General Options > Add-Ins and enable the 'OData' Add-In (by ticking the tick box before it).
In the following sections the usage of the Add In is explained.
In order to reverse engineer an OData service follow the following steps:
-
In the main menu of PowerDesigner click on
File
>Reverse Engineer
>OData...
. -
A model dialog will popup to ask for the new model name, the metadata URI and the authentication type. The new model name will be the name of the new Physical Data Model containing the structure of the OData service.
-
If you have selected an authentication type other then
None
another model dialog will popup where you can pass the username and password.
After the previous steps are completed a new PDM model will be created in the active workspace and will be populated with tables (with columns) based on the metadata of the OData service.
Next to the tables there will also be a file named 'OData Metadata', which is a reference to the OData Metadata URI used to generate the PDM.
Note The authentication information is not stored in the model. The authentication information will be asked for every time you update the model.
For any physical data model which contains a file with the code 'OData_Metadata' the menu option Update model from OData metadata
will be available.
By clicking this menu option a new model will be generated using the OData metadata URI and a model merge window will popup which shows the difference between the existing OData physical data model and the metadata retrieved from the OData service.
If the authentication type is not None
, a dialog will popup where the authentication information is requested during the update process.
When you want to update an existing model which was not reverse engineered using the Reverse Engineer menu option, you can manually add the OData Metadata file. Follow the steps below to do so:
- Right-click on the model, choose
New
>File
. - Given the new file the
Name
'OData Metadata' and theCode
'OData_Metadata'. - Set the
Location type
to 'URL'. - Set the
Location
to the URL to the $metadata location of the OData metadata service. - Set the
Comment
value either to 'None' or 'Basic', depending on the required authentication method. - Untick the
Generate
option. - Click
OK
.
Once you have completed the above steps the update menu option will be available as explained in Updating existing reverse engineered OData model.
To debug the plugin:
-
Open the solution in Visual Studio which is running as Administator (so it can register new DLLs)
-
Build the project in Debug (this will also register the Add-In in the Windows Registry for PowerDesigner).
-
Enable debug mode in PowerDesigner for the OData Add-In by creating a variable named 'ODATA_DEBUG_MODE' and give it the value 'True'.
Now you can enable the Add-In in PowerDesigner in Tools > General Options > Add-Ins. The name of the Add-In is 'OData'. If the OData add-in is disabled in PowerDesigner (checkbox is grayed out) it might be needed to run PowerDesigner as Administrator.
- Modeling with PowerDesigner
- Customizing and Extending PowerDesigner