PW01-L03 · Logic change

Owner WorkArea property

Replace a project system variable with explicit hierarchy traversal.

ProjectWise-specific
Migration outcome

Understand why the new expression is longer but identifies the value source precisely.

ProjectWise context

Document Attributes

PW system variableLegacy ProjectWise configuration
$PROJECT#PROJECT_Code
CELProjectWise CEL
thisFolder.getOwnerWorkArea().properties.Code

What is different

CEL first finds the owner WorkArea for the current folder and then reads Code from its properties map.

  1. Hierarchy access is explicit in CEL.
  2. getOwnerWorkArea() can return null when no matching WorkArea exists.
  3. Since ProjectWise 25.0.3, WorkArea.properties values are represented as strings.

Migration goal

Read a project code from the WorkArea that owns the current document folder.

What changes

ProjectWise CEL models the hierarchy in steps: current folder, owner WorkArea, properties map, and the Code item. This is more than a token rename.

Why the CEL solution is clearer

The expression exposes where the value comes from and where hierarchy lookup can fail.

Before deployment

Test folders both with and without an owner WorkArea. If getOwnerWorkArea() can return null, add a guard before reading properties.

Sources

  • BENTLEY-PW-CEL-SYSVARS — official replacement for the project variable.
  • BENTLEY-PW-CEL-OBJECTS — WorkArea and its properties map.
  • BENTLEY-PW-CEL-NULLS — methods that return objects.