One of Onshape’s strengths is that the workspace is always available for editing. This enables rapid development, even when there are pending releases in the same document. 

While powerful, this freedom can confuse users outside of the engineering group. Users in other departments frequently only wish to see the latest release. It can be difficult when releases are distributed within a complex history. 

With workspace protection, you can ensure a branch is protected from direct editing. This facilitates a workflow where design changes are only merged into the protected branch (usually Main) when they are ready to release. 

LEARN MORE: Onshape’s Branching and Merging

Protecting and Updating a Workspace

To protect a workspace, right-click and select Workspace protections. Check Enable workspace protection and click Apply.

Workspace protection for Main

Protected workspaces have a lock icon in the Versions and history panel. With the workspace active, direct edits are restricted, but view-only tools are available.

Workspace protection enabled

Apart from drawing updates or metadata changes caused by a completed release, all changes to the protected workspace require users to merge from another branch. If the main branch has changed since the branched version, you may receive an error preventing the merge. 

Overall merge strategy

To repair this issue, merge the protected branch into the working branch first.

Release Workflow with a Protected Workspace

Workspace protection helps enforce workflows in which the Main branch is only for releases, and changes are completed in other branches. 

In the example below, a released version of the jackhammer is on the protected main branch. The engineering team is working on improving the vent design in the Working Branch. This team utilizes a single branch for edits that merges to and from the Main branch, but it is acceptable to have multiple branches for different changes. Because in-progress changes and versions are kept away from the Main branch, other team members can easily find and access the latest release. 

Release Workflow with a Protected Workspace

Tip: Users should still select the revision’s version to see the properly released components and drawings. The workspace may contain changes from pending/rejected release candidates, and drawings always display an in-progress revision when viewed from the workspace.

Once the design is ready for approval, the engineering team merges the changes into the main branch and creates a release. 

Main branch and the working branch

It is ideal to be sure of a change before merging into the Main branch. If you decide not to move forward with a change, it is recommended that you discontinue the working branch from which it came. Create a new branch with a restore action and merge it back into the protected branch.

Version history

It is not necessary to do this after all rejected release candidates, as you can merge again once the necessary changes are made on the working branch. Restoring is only required if the changes proposed by the release candidate are to be completely abandoned.

Tip: It is always recommended that the workspace be deleted on inactive branches.

This Tech Tip helped you learn more about protected workspaces and one way they can be incorporated into a release workflow. For more information, check out our free Branching and Merging course in the Onshape Learning Center.

The Onshape
Learning Center

Take self-paced courses, get technical briefings,
watch informational webinars, or sign up
for an instructor-led training session.