Importing a Data/Services project into new workspace updates the version despite no changes

Importing a Data/Services project into new workspace updates the version despite no changes

book

Article ID: KB0076458

calendar_today

Updated On:

Products Versions
TIBCO Business Studio - BPM Edition 4.x

Description

When a Data/Services project is imported into a new workspace, Studio automatically updates the project version.
This causes DAAs of dependent projects to be built with reference to the new version, which causes deployment failures unless the Data/Services project is redeployed first.
 

Environment

TIBCO Business Studio (BPM) 4.x (All supported Operating Systems)

Resolution

Any of the below solutions will prevent deployment failure of dependent projects.
Solution 'A' is the recommended method, and has the additional benefit of improving import/build time of related projects

A: Enable Pre-compilation on any Data/Services projects in the original workspace before importing them into the new workspace.

  1. In the original workspace, right-click the Project in the Project Explorer view
  2. select Pre-Compile Project > Enable  (Studio will automatically build the project, placing generated code in hidden folders within the project folder)
  3. Optionally, export the project/s -- commit the project (including hidden files/folders) to source control, or via File > Export... then any suitable wizard, e.g. Studio Projects to Archive
  4. In the target workspace, import the project/s -- checkout from source control, or via File > Import... then the appropriate import wizard

Note: If importing directly from the original workspace (i.e. Existing Projects into Workspace or Existing Studio Projects into Workspace, ensure option Copy projects into workspace is enabled.


B:  Manually set the correct project version on the imported project.
If Data/Services projects have already been imported but not modified, you can enforce the correct the project version via the project's 'lastChange' property.
You need to edit a file which is hidden by default, so first enable Studio's "Navigator" view:

  • Window > Show View > Navigator -- If "Navigator" is not listed in the menu, choose Other... then General > Navigator
  • in Navigator view, expand the project folder, then ".settings"
  • open the file "com.tibco.xpd.bom.resources.prefs"
  • edit the value of property lastChange -- set this to the value seen in the equivalent file in the original workspace.  (Do not change checksum!)
  • save & close the file
  • close Navigator view

C: Rebuild & deploy DAA of the Data/Services projects in the new workspace, and deploy to the target runtime.
Note: This is not generally recommended, but may be adequate in specific circumstances.
Using this approach effectively moves the same problem into other workspace(s), where the Data/Service project version will now be out-of-sync with the runtime.

Issue/Introduction

Importing a Data/Services project into new workspace updates the version despite no changes