Example 15: Resources

This example teaches how to load resources using a Windchill extension.

You can find the code for the example in our GitHub repository.

Introduction

The resulting example extension, built from this code, will load resources (e.g. .rbInfo files) from the safe area or for customizations.

Note: a bounce of the servers will be required for the new RB to become effective.

Implementation

The implementation is triggered on the first install.

image-20221206220716711

The resources are delivered in the extension:

image-20221206220103022

This extension uses the wex-loadconfig-commons dependency:

<dependency>
    <groupId>com.wincomplm</groupId>
    <artifactId>wex-loadconfig-commons</artifactId>
    <version>1.0-${wex.wt}</version>
</dependency>

This provides the API to perform various functions, including the loading of the resource:

image-20221206221343214

The install will not be triggered again unless the internal version is changed. A lock file is used in wex\locks to prevent more than one server performing the build. The lock is deleted on undeploy.

image-20221207114648356