Using Your Plug-ins |
Previous
|
|
Next
|
Releasing the Plug-in |
|
Appendices |
Using Your Plug-ins
Using Plug-ins
Plug-ins designed with the Plug-in Architecture can be used as regular plug-ins.
See the
"Integration Process Design" chapter
"Semarchy Convergence for MDM Developer’s Guide" for more information.
Using the Plug-in Example in the Getting Started Environment
You can use the sample plug-in example created with this guide in the demonstration environment provided for the
"Semarchy Convergence for MDM Getting Started Guide", or in your own projects.
Note: Before using your plug-in in the demonstration environment, it is recommended that you first get comfortable with the Semarchy Workbench and the demonstration environment by running the entire Getting Started.
Setting up the Getting Started Environment
To set up a Getting Started environment for testing the plug-in:
- Follow the instructions in the
"Semarchy Convergence for MDM Getting Started Guide" until the
Create the Demo Model section. In this section, select
Full Setup instead of selecting
Partial Setup. This will create the entire model.
- Deploy the Plug-in to the platform as explained in the
Deploying the Plug-in section.
Using the Enricher in the Model.
Note: In this example, we will use the
International Phone Standardizer enricher to standardize the phone numbers from the
Phone1 attribute in the
Contact entity. Note that we set the
Nullify On Error parameter to false in order to preserve the original phone numbers that cannot be standardized.
To use the enricher in the model:
- Go to the
Overview perspective.
- Open the
CustomerAndFinancialMDM [0.0] model edition.
- Expand the
Entities > Contact > Enrichers node.
- Right-click the
Enrichers node and then select
Add Plug-in Enricher.
- In the
Create New Plug-in Enricher wizard, enter
StandardizePhone for the
Name field.
- In the
Plug-in ID, select
International Phone Standardizer.
- Click
Finish. The
Plug-in Enricher editor opens.
- In the
Plug-in Params section, click the
Value cell on the
Nullify on Error line, and enter in the cell
false
.
- In the
Plug-in Inputs section, click the
Value cell on the
InputPhone line, and enter in the cell
Phone1
.
- In the
Plug-in Outputs section, click the
Define Plug-in Output button in the upper-right corner. The
Define Output Bindings dialog appears. Double-click the
Phone1
attribute and then click
Finish.
- In the
Plug-in Inputs section, select the
Output Name cell on the
Phone1 line, and select
Standardized Phone in the selection list.
- Press
CTRL-S to save the editor.
Deploying the Updated Model
To deploy the updated model:
- Go back to the
Overview perspective, and open the data location into which the model is currently deployed.
- Expand the model edition that is deployed, right-click and select
Update Deployed Model Edition (Design-Time).
- In the
Update Model Edition wizard, un-check the
Update the Database Schema of the Data Location option and then click
Finish.
Note: In a development environment only, it is possible to update existing deployment without creating a version of the model edition. In addition, only the integration processes need to be updated, as the data structure is not modified by the addition of the enricher.
Running the Enricher
To run the enricher:
- In the menu, select
Help > Getting Started > Open Demo Application....
- Click the
Reset Sample Data button to restore the sample data to its original state.
- Click the
Publish Data to MDM... button in the editor toolbar.
- In the
Publish Data to MDM dialog, for Data Edition select
CustomerAndFinancialMDM [0.0].
- Click
Finish to start the loading process.
- A
Data Submit Succeeded dialog appears. Click
OK to close it.
- View the log and expand the
Contact task. You will now see your
StandardizePhone enricher task and the number of records processed.
- Review the
Contact golden records. Certain values of
Phone1 have been standardized and appear with a “+33” prefix.
Troubleshooting Plug-ins
When a plug-in fails to execute in an integration job, the job is suspended, and the error raised by the plug-in is displayed in the job’s execution log.
See the
Managing Execution chapter in the
Semarchy Convergence for MDM Administration Guide for more information about jobs and logs.
To troubleshoot with more details a plug-in behavior at run-time, it is possible activate a logger that traces plugin execution in the application server log files.
To activate this logger:
- Open the
Logging Configuration in the
Administration view (in the
Administration Console perspective).
- Add or modify the
log4j.logger.com.semarchy.platform.engine.PluginExecution
logger configuration and set it temporarily to
DEBUG
as needed (an example is given below).
- Press
CTRL-S to save the new configuration.
log4j.logger.com.semarchy.platform.engine.PluginExecution=DEBUG
Warning! The
DEBUG
mode is very verbose. Make sure to revert the configuration after the troubleshooting phase.