Introduction

UBIK® Plugins are loaded dynamically into the UBIK Kernel by the UBIK Injection Management based on the Microsoft Extensibility Framework (MEF).

Basic Prerequisites

Creating an own plugin requires to add references to:

UBIK Injection Management provides access to all the basic features used by the Kernel to identify and categorize the available plugins. This management is provided by a library called UBIK.Injection.

Interface: IUbikPlugin

The plugin must implement the UBIK.Injection.IUbikPlugin interface and has to be registered for MEF composition by defining the export contract via an attribute.

[Export(typeof(UBIK.Injection.IUbikPlugin))]
public class TestPlugin : UBIK.Injection.IUbikPlugin
{
}

Interface: IUbikInjectionMetaData

Managing plugins correctly presumes the following information, as defined by the interface UBIK.Injection.IUbikInjectionMetaData.

[ExportMetadata("ID", "C149402E-BC86-46D6-8D1B-63C86894EA77")]
[ExportMetadata("Type", typeof(TestPlugin))]
[ExportMetadata("Name", "TestPlugin")]
[ExportMetadata("Description", "Tests the injection management")]
[ExportMetadata("Version", 1)]
[ExportMetadata("Company", "Augmensys GmbH")]

Mandatory Information

Name Type Description
ID String Unique ID of the plugin
Type System.Type System type of the plugin; used for filtering the plugins during loading

Optional Information

Name Type Description
Name String Name of the plugin (for UI Presentation)
Description String Name of the plugin (for UI Presentation)
Version Integer Version of the plugin. As there are more plugins with the same ID, only the plugin with the highest Version is available.
TargetApplication PluginTargetApplication Possibility to limit the plugin for a single type of application.
MinimumKernelVersion String Minimum required Kernel version. Format: x.x.x.x
MinimumDatabaseVersion String Minimum required Database version. Format: x.x.x.x
Company String Information about the Company (for UI Presentation)
Copyright String Copyright Information (for UI Presentation)

Example

[Export(typeof(UBIK.Injection.IUbikPlugin))]
[ExportMetadata("ID", "C149402E-BC86-46D6-8D1B-63C86894EA77")]
[ExportMetadata("Type", typeof(TestPlugin))]
[ExportMetadata("Name", "TestPlugin")]
[ExportMetadata("Description", "Tests the injection management")]
[ExportMetadata("Version", 1)]
[ExportMetadata("MinimumKernelVersion", "2.4.0.0")]
[ExportMetadata("MinimumDatabaseVersion", "2.4.0.0")]
[ExportMetadata("Company", "Augmensys GmbH")]
[ExportMetadata("Copyright", "2014, Augmensys GmbH")]
public class TestPlugin : UBIK.Injection.IUbikPlugin
{
}

Plugin Design

The UBIK® Plugin Design** feature allows users to create a UBIK Plugin C# solution, including system definitions, purely through customization in UBIK Studio.

Overview

Relevant Use Cases

Getting a customization from one UBIK® database into another can be challenging. Common use cases include:

Benefits of UBIK Plugins

Plugins provide several advantages:

Manual Configuration, Automatic Generation

Developing a UBIK® Plugin from scratch is an expert-level task.

The UBIK® Plugin Design feature allows users to configure a customization in UBIK® Studio as usual and then generate a plugin directly from that configuration.


Usage

Setup

The UBIK Plugin Design feature-set is contained in a UBIK Plugin itself. It's called UBIK.Module.PluginDesign and can be downloaded from the

The plugin can be downloaded from the Release Portal.

To install it:

  1. Copy UBIK.Module.PluginDesign.dll into the Injection folder of your UBIK® Studio installation.
  2. Connect to a UBIK® Environment (database).
  3. An upgrade dialog appears and allows installation of the plugin.

Creation of a New Plugin Design Configuration

The feature is available through the following MetaClass:

System.PluginDesign.PLUGIN_DESIGN_CONFIGURATION

Create a new Plugin Design Configuration instance in the Bulk Editor to define a custom plugin context.

Adding MetaClasses to the Configuration

Custom MetaClasses can be added through the relation:

SYSREL_PLUGINDESIGNCONFIG_METACLASS

Use the Relation Editor to create these relationships.

Adding Other Objects to the Configuration

In the initial version, MetaClasses are treated as the center of the customization model. All supported dependent objects are detected automatically.

For example:

The Plugin Design feature is under active development.

Exporting a C# Solution for the Plugin

A C# solution can be generated through a context menu action in the Class Browser.

Steps

  1. Open the Class Browser in Content View style.
  2. Right-click the Plugin Configuration instance.
  3. Select Start Action → Create a C# solution for a custom UBIK plugin

This action will:

Next Steps

The generated solution can be opened in Visual Studio.

Typical workflow:

  1. Build the generated C# project.
  2. Deploy the resulting plugin DLL to the target system's Injection folders.

Optional next steps:

The generated plugin should never be deployed back into the same UBIK® Environment from which it was generated. The generated system definitions would conflict with the original customization model.

Likewise, the Plugin Design plugin is not required on the target system.


Supported Capabilities and Roadmap

Feature Version State
Generation of a basic plugin project including Module and SystemDefinitions stub 5.0 Initial Release
Incremental versioning for upgrades in target environments 5.0 Initial Release
MetaClasses 5.0 Initial Release
MetaProperties 5.0 Initial Release
Custom Class Code 5.0 Initial Release
Custom Code Library 5.0 Initial Release
Classifications 5.0 Initial Release
Relations 5.0 Initial Release
Selective Lists and Selective Items 5.0 Initial Release
References 5.0 Initial Release
MetaProxies and MetaProxyProperties 5.0 Initial Release
Units and Unit Items 5.0 Initial Release
MetaProperty Assignment Properties (RelationData) 5.1 Initial Release
Multi-language translations for References, Relations, Units, and Unit Items 5.1 Initial Release
Language Definitions 5.1 Service Pack
LOCALIZATION instances for MetaClasses, MetaProperties, SelectiveLists, and SelectiveItems 5.1 Service Pack
App, Context, View 5.3 Implemented (release pending)
Queries 5.3 Concept
Scopes 5.3 Concept
View Items 5.3 Concept

See Also