Adding Services

MDWorkbench Server is an extensible platform in which you can create your own services, to execute data transformation or code generation on server side.

Creating an MDWorkbench Ruleset

Please refer to MDworkbench documentation to create an MDWorkbench Project:
MDWorkbench Documentation > Tasks > Developing Rules

Servlet Context Parameters are accessible within the rules by querying the EvaluationContext.getProperty(String) method, e.g.:
String workspaceLocation = (String) context.getProperty("mdw.server.workspace");

Declaring a Service Extension

A Service is the packaging of rulesets and scripts to be executed on server side.

Here are the steps to add a service:

  1. Edit the plug-in MANIFEST file of the created plug-in (in which is defined the MDWorkbench ruleset).
  2. In the Dependencies tab, add a dependency to the plug-in com.sodius.mdw.server
  3. Select the Extensions tab, click Add..., select the com.sodius.mdw.server.service extension point and click Finish.
  4. Select the com.sodius.mdw.server.service extension and right-click New > Service.
  5. Enter the qualified name of the Ruleset and the name of the rule in the Service declaration.
  6. Declare parameters in the Service declaration to reflect the arguments expected by the Ruleset and the rule.
  7. Save the MANIFEST file.

Testing the Service

You can then test the new Service using Jetty and verify you can execute it correctly using the integration page:

Related concepts

Related tasks
Creating Plug-Ins
Testing with Jetty
Declaring Service Parameters
Reporting Progress
Customizing the Launch Status
Adding a Custom Launch Page

Related reference
Service Extension Point