Create a Deployment Package
In this section, you are going to create the deployment package that is to contain
the deployment extension you are to create in the next section.
-
From the Compass, open the Data Model Customization
app.
-
From the sidebar of the Data Model Customization
app,
select Administrate Data Model.
-
From the List of Deployment Packages, click New
.
The Create New Package panel opens.
-
In the Name field, enter a name for your package:
DeploymentPackage for this tutorial.
Note:
Names can only contain alphanumeric characters and the underscore
character.
-
In the field next to Enter New Prefix, enter a prefix:
TST for this tutorial.
-
Click Done to close the panel.
Result: The new deployment package is created and appears in the List of Deployment
Packages.
Create a Deployment Extension
In this section, you are going to create a deployment extension to extend the
VPMReference type.
-
From the List of Deployment Packages, click the package you
created in the previous step, that is, DeploymentPackage.
-
From the Extensions tab, click New
.
The Create New Admin Extension panel opens.
-
Define the extension as follows:
-
In the Name field, enter a name for your deployment
extension: MyDeploymentExtension for this tutorial.
Note:
Names can only contain alphanumeric characters and the underscore
character.
-
Next to the Types field, click ....
The Types List window opens. This list shows the
types that you can extend with your deployment
extension. The types that you select are also called the scope of the deployment
extension.
-
Expand the PRODUCTCFG package and select the check box of
VPMReference for this tutorial.
-
Click Submit.
-
In the Create New Admin Extension, click
Done.
The deployment extension is created and appears in the Deployment
Extensions List.
Add an Attribute to Your Deployment Extension
In this section, you are going to create an attribute for your deployment
extension.
-
Click the deployment extension that you created, that is,
MyDeploymentExtension.
The line corresponding to the selected extension turns pink.
-
In the Attributes List tab, click New
Simple
.
The Create New Attribute panel opens.
-
Define the new attribute.
-
In the Name field, enter its name:
Myattribute01 for this tutorial.
Note:
Names can only contain alphanumeric characters and the underscore
character.
The Package prefix is automatically added to the name
when you deploy the package.
-
From the Type section, select
String for this tutorial.
-
In the Default Value field, enter its default value,
Supplier for this tutorial.
-
Click Done.
Result: The attribute is created.
Deploy the Deployment Package
-
From the DeploymentPackage page, select .

-
Click OK to deploy your package and update the vault.
A message appears indicating that your package was deployed.
Create a Business Rule
In this section, you are going to create a business rule to use your deployment
package in the end-user apps.
-
From the Compass, open the Quality Rules Capture
app.
-
From the tree, expand the Business Logic for object typing node, then
right-click Deployment Extension Choice
(INFRADeploymentExtensionComputation) and select Create
Business Rule.

The Business Rule dialog box opens.
-
In the Title field, rename the business rule to
MyBusinessRule for this tutorial, and click
OK.
The Business Rule editor opens.
-
Double-click the <Unset> cell, and select
VPMReference.
-
In the editor, enter the following code:
Parameters.SetAttributeString("DeploymentExtensionName", "TSTMyDeploymentExtension")
-
Click OK.
The business rule is created and appears in the tree below the Deployment Extension Choice
(INFRADeploymentExtensionComputation) node. Note:
You can also create
business rules in the Data Setup
app.
-
In the top bar, select .
Associate the Business Rule to a Resource Table
-
From the Compass, open the Data Setup
app.
-
In the Resource Tables tab, right-click Business
Logic for object typing and select Create a new Resource
Table.
The Resource Set dialog box appears.
-
In the Title field, rename the resource set name to
My Resource Set for this tutorial, and click
OK.
The window for the Resource set you selected
opens.
-
Right-click the resource cell corresponding to the Deployment extension
choice cell, and select Choose the assigned
resource.

The Select a Business Rule dialog box appears and shows
the business rule that you created. If not, click ... to search
for the business rule.
-
Select the business rule and click OK twice.
The business rule is associated to the resource table and appears in the
Business Logic for object typing node.
-
In the top bar, select .
Associate the Resource Table to a Collaborative Space
-
In the Data Setup
app,
drop the My Resource Set to the collaborative space in which you
want to extend the VPMReference type with your deployment extension.
-
In the top bar, select .
-
Right-click the resource set in the Resource Tables tab and
select Deploy the Server Business Rules.
Result: Your deployment extension is available for the VPMReference
type in the end-user apps, for
example in the Physical Product dialog box that appears when selecting :

Note:
To see your attribute in the dialog box, restart your desktop client
and make sure that you are in the same collaborative space as the collaborative space you
dropped your resource set to.
Define the NLS Names
You can define the names that appear on the user interfaces of the end-user apps for your
deployment package and its attribute, and add translations.
-
Edit your .properties files as follows:
-
Access the emxFrameworkStringResource.properties file on
your application server.
-
Edit it to add the following lines for this tutorial:

-
Save your file and restart your server.
-
From the sidebar of the Data Model Customization
app,
select .
The List of Supported NLS Languages opens and displays
the available languages.
-
For this tutorial, select English.
-
Click Download
.
The zip file containing the CATNls files is downloaded.
-
Save the file in the directory referenced by the CATMsgCatalogPath
variable of your runtime view.
-
Unzip your files and restart your server.
The localized types and attributes are displayed in the end-user apps.
Result: Congratulations! You successfully completed this
tutorial.
|