External Model Resources

The Model Element Repository integration provides you with the possibility to refer to any external source for applications, services, data and business objects and process definitions.

This chapter guides you through the following two registry type examples:

Registry Type Extension Point

Stardust provides registry type extension points, e.g. for the Stardust Registry. Registry connections for a registry integration can be created for Stardust Process Models. You can connect to an arbitrary number of Stardust registries.

You have the option to implement your own repository connection extension points. Please refer to the chapter Implementing a Repository Connection Extension Point for detailed information.

Stardust Registry

Depending on the registry technology supported by your company, registry connections can be created for Stardust Process Models edited in your Eclipse environment. A registry connection presents the services contained in a service registry as already defined and allows the modeler to use these services seamlessly and immediately in the process model with a drag and drop mechanism.

Before you start, make sure you enabled your proxy settings:

Enable your Proxy Settings
Figure: Enable your Proxy Settings

Creating a Registry Connection

To create a registry connection:

  1. In the Outline view right-click External Model Information under your model node.
  2. All provided registry types will be listed.
  3. Choose Registry Connection.

Create a Registry Connection
Figure: Create a Registry Connection

Setting Connection Properties

Now the registry properties dialog pops up, where you can enter the registry login credentials. Select Stardust Connection Properties in the left pane and fill in the following properties:

Create a Registry Connection
Figure: Create a Registry Connection

Now the defined registry connection is created and a corresponding tree entry is displayed under the registry connection node.

A successful connecting to a registry will return the list of solutions and their solution type. You find the solutions listed under the registry connection in the Outline view.

Details

To get details for the solution right-click the solution and select Get Details:

Get Details
Figure: Get Registry Connection Details

Having retrieved the details of the selected solution, the solution can be expanded in the tree to display the list of elements.

Outline
Figure: Registry Connection Outline

Node Properties

To open the Stardust Node Properties dialog:

Registry Node Properties
Figure: Stardust Node Properties

Types Mapping

In the left pane of the properties dialog select Types Mapping. A table is displayed on the right side with Type Name and corresponding Stardust Name:

Types Mapping
Figure: Types Mapping

Stardust provides the following Names:

Select Scan to scan for all type names provided by the model information.

You can specify several Type Names, by entering a new Type Name and choosing one of the provided Stardust Names.

  1. Click in a new entry field for Type Name and enter a custom Type Name.
  2. Click the arrow appearing on the right side when clicking in the entry field for Stardust Name.
  3. Choose the Stardust Name for your custom type.

Types Mapping
Figure: Add a Custom Type Name.

Registry Filter

You can filter the registry by its solutions with appropriate settings in the Registry Filter dialog:

  1. In the Outline view right-click External Model Information.
  2. Choose Registry Filter.

Open Registry Filter
Figure: Open Registry Filter

In the Filter dialog choose a Filtertype for Solution Name and Solution Type:

Type in the values the solutions should be filtered by.

Choose Registry Filtering
Figure: Choose Registry Filtering

Referencing Registry Elements

All elements like services, applications, data and processes used from the registry are only referenced from the process model. An online registry connection is required to access these objects. Referenced elements can be explicitly imported into the model. With this step, its reference to the registry is lost and the model elements are considered to be local.

Importing a Referenced Element

To import a referenced element:

Import Registry Element
Figure: Import Registry Element

Model Deployment

During model deployment, the current state of all referenced registry elements is added to the deployed model.

Similarly, you can double-click on the connection and select the elements that you want to import.

Referencing Model Elements

When you import the elements by reference, the following model elements are available:

Note that these elements are only referred in the referencing model and by any way they do not get copied to the model. For more information, please refer to the section Usage of Elements Imported by Reference.

Creating a File Connection

To provide stability of model references against changing file locations, absolute as well as relative path is supported. The following syntax is used for relative path:

  1. For the file selected within an eclipse project, the syntax is: project:/models/file.xpdl
  2. If a file is selected in the workspace but not within a project, the syntax used is: workspace:/project/models/file.xpdl
  3. Relative file paths entered manually are considered relative to the workspace, that is: project/models/file.xpdl
  4. Absolute file paths are resolved relative to the machine file system root

To create a file connection:

  1. In the Outline view, right-click External Model Information.
  2. Select File Connection.
  3. In the File Connection Property Page, fill in ID and name of the file connection.
  4. The Import by Reference checkbox is selected by default. Make sure that it is selected to copy it by reference.
  5. Select the Browse button to browse to the source of the file to connect.

Note if the Import by Reference checkbox is selected then the usage of elements from the imported models is done by reference in the referencing model. If not selected, elements are copied by value. For more information, please refer to the section, Copying By Reference or By Value of the chapter Copying and Pasting Modeled Elements.

Create a File Connection
Figure: Create a File Connection

Refresh

To refresh the file connection:

Refresh
Figure: Refresh File Connection

If elements are changed in the provider model, the refresh operation reflects the change in consumer model.

Add External Model References

You can also add a new external model reference using the Add External Model Reference option. This is just another way to add references under the External Model References node. For more information, please refer to the section Managing References to Other Models. Note that if the external model reference already exists then Add External Model References context menu is not available.


Figure: File Connection - Add External Model References

Delete Element

To delete the file connection:

Delete Element
Figure: Delete Element

The confirmation dialog box is displayed. If you click OK the file connection to provider model gets deleted.

Confirmation Dialog
Figure: Delete Element - Confirmation Dialog

Search

To use the search functionality on a file connection:

Search
Figure: Search on a File Connection

This will invoke the Search dialog. Enter a search string and select Search. Note that no wildcards are supported here.

Search Dialog
Figure: Enter a Search Text.

All elements containing the search text in their name are displayed in the Search Result tree.

The Search Result List
Figure: The Search Result List.

Properties

The Properties menu displays the same dialog box in which you can edit and view the file connection properties.

File Connection Errors

In case a connection pointing to a referenced model has been removed or renamed, a validation error occurs, indicating that the connection to the referenced model could not be established.

Whenever a new file connection is created, a validation check is performed to detect whether the new model references would create circular reference between the set of models in the same workspace. A Circular Dependency Detected warning is displayed.

Dangling references may result, in case, file to be referenced is not found. Inconsistency error is displayed at the time of the deployment.

Usage of Elements Imported by Reference

Only after establishing the file connection with referenced model and selecting Imported by Reference check box the elements can be referenced. These elements cannot be used as local elements. Although they behave as local elements. So if any changes are performed in the referenced model, the file connection should be refreshed.

Dragging and Dropping the Referenced Elements

To use the element imported by reference in the referencing model, you need to perform the drag-and-drop operation.

  1. Drag the element from the Outline view > File Connection to the diagram canvas

    Drag Referenced Element
    Figure: Drag Referenced Element

  2. Once the element is dragged to the diagram canvas, it becomes part of the referencing model element.

Each element of referenced model has following semantics in the referencing model:

For more information, please refer to the Outline View chapter.

Not Accessible Referenced Model Elements

Note that in case a referenced model element is not accessible due to rename or deletion, a validation error, indicating that the model element is not present in the referenced model is displayed in the Problems view.

Also note that reference cannot be established to a model element of a referenced model if any reference to a model element of another version of the referenced model has already been created. In this case, you cannot drag and drop model element of a referenced model and the warning is displayed in the Problems view.

Dangling references may result in case referenced model elements are not displayed. Inconsistency error is displayed at the time of the deployment.

Managing References to Other Models

You can view the references to other models using External Model References node. An External Model References is a library which keeps track of the referenced models. For each provider model used from the current model, it contains a sub-node with the name of the referenced model. Note that a file connection must exist prior to manage references action.

External Model References
Figure: External Model References

If the reference is not added from File Connection menu context then you can add a new external model reference using this option. Right-click on External Model References node and select Add External Model Reference from the context menu. However note that references also get added when you drag and drop any referenced element into the consumer model. In that case, you do not need to explicitly add the reference using this option.

Add External Model References
Figure: Add External Model References

List of available file connections are displayed. Select file connection as the source to add new external model reference.

File Connection
Figure: File Connection

If the reference already exists in the model then the "Reference Exists" message is displayed and Add External Model Reference operation is canceled. Else the reference of the provider model gets added under the External Model Reference node.

Reference Exists
Figure: Reference Exists

You can perform following operations on each external reference node:

Delete

Deletes all usages of the provider model from the consumer model.

Delete External Model Reference
Figure: Delete External Model Reference

If you select the Delete option, the following warning is displayed.

Delete External Model Reference - Warning
Figure: Delete External Model Reference - Warning

Rename

Select this option to rename the external model reference.

Rename External Model Reference
Figure: Rename External Model Reference

Reference

Displays a list of all usages of model elements from the provider model in the Search Results view.


Figure: References

Properties

To view the properties, select Properties from the context menu.


Figure: Properties

Following properties of the selected external model reference get displayed.

  1. File Connection - Displays the ID of the file connection corresponding to the reference.
  2. Model File ID - A field that contains the Id of the model file that the corresponding file connection points to.


Figure: Properties of External Model Reference

Not Accessible Referenced Models

Note that in case a referenced model is not accessible due to deletion from file system or moved to another location or renamed, a validation error, indicating that the model is not present is displayed in the Problems view.

Dangling references may result, in case referenced models are not found. An error of inconsistent model version is displayed at the time of the deployment.