Release Management is a powerful feature in Onshape that automates the process of managing revisions for parts, assemblies, drawings, and imported files. Whether you are a Professional or Enterprise user, you can benefit from the default release and obsoletion workflows. 

However, Enterprise users have an additional advantage – they can customize workflows beyond the company-wide release settings.

Release Workflows

What Can Be Customized?

In a workflow, several aspects can be tailored to match your organization’s specific needs:

  1. States and transitions: You can add or modify states and transitions in the workflow. These define a release candidate’s different stages, such as In Progress, Pending, or Released.

  2. Release Candidate dialog customization: Customize the dialog that appears when creating a release candidate. This includes specifying properties like approvers and observers. However, it can also include other release candidate-only properties that specify to the release committee what to do with the items in the release candidate, like how to disposition the current inventory of previously released items.

  3. Custom properties: Update custom properties associated with the release process. These are for the official Custom properties associated with parts, assemblies, drawings, and other files in Onshape. FeatureScript, the native Onshape programming language for Part Studios, is also available to help evaluate and incorporate property information. For example, if the release candidate name is ECO-34330A, a FeatureScript function can be created to push the property of the release candidate name to all the release candidate parts. 

  4. Override Enterprise release settings: As an Enterprise user, you have the flexibility to override the default company-wide release settings for specific workflows. This is how you set a revision scheme that is different from the Enterprise default for a particular workflow. Below is an example of a custom workflow with an options section highlighted, calling for a revision scheme ID that’s not the Enterprise-wide default scheme:

    FeatureScript for Custom Workflows
    The hexadecimal code is the Revision Scheme ID found in the Release management properties of the Administration panel:

Revision Scheme ID

Understanding the Default Workflow Structure

Before you dive into customization, here are the basic ideas of the Onshape Workflow system:

  1. Work in Progress: When opening a document to a workspace, Onshape defaults to a Work In Progress state (This is how most people get into an Onshape document, from the Documents page). When you create a release candidate, it creates a special version of the document that is not geometrically editable.

  2. Workflows are forward-facing: Onshape release workflows always follow time’s arrow. They move forward and don’t loop back to previous states. 

  3. Version control and branching: The Onshape workflow is just another Onshape document. That means sharing, live co-editing with branching, and versions all work. Creating an Onshape document with all the workflows your company requires in one Onshape document is highly recommended.

  4. JSON structure: All workflows are structured using JavaScript Object Notation (JSON). The JSON file contains three primary sections:

    • Properties: These are inputs displayed in the Create Release Candidate dialog. For the default workflow, inputs include Approvers and Observers.

    • Transitions: These define the transitions between states. Parameters include name, type, required properties, source, target state, and actions.

    • States: These specify state parameters such as name, editable properties, approver and notifier, entry actions, and exit actions.

    • Every workflow includes a Setup state, which applies when the release candidate is first created.

Implementing Prototype and Production Revision Schemes

To implement different revision schemes for prototypes and production, follow these steps:

  1. Define states and transitions: Create distinct states for prototype and production workflows, such as Prototype In Progress, Prototype Pending, Prototype Released, and corresponding production states.

  2. Customize the Create Release Candidate dialog: Adjust the dialog to capture specific properties relevant only to prototype and production releases. Include fields for information on how to treat the release and any other relevant information. Below is an image of an obsolete release, showing how to disposition inventory held for the obsolete items.

Obsolete dialog

  1. Set Custom properties: Use FeatureScript to manage properties related to the revision schemes. For example, a script could assign a custom property to a series of parts called out by a release candidate. See more on Administering Custom Release Management Workflows in Onshape Enterprise

  2. Override Enterprise release settings: For each workflow, override the default release settings to apply the appropriate revision scheme. Ensure that the numeric scheme is applied to the prototype workflow and the alphabetical scheme to the production workflow.

Example JSON Structure for Custom Workflow

This section features an example of a JSON structure for custom workflows. One workflow uses numerical schemes for the prototype phase, and the other uses alphabetical revision schemes for the production phase. Create a new Onshape document in your Enterprise, save the JSON formatted data below in any text editor, name it as a .JSON extension, and add it to the document. 

Below is a video showing the whole process from an end-user point of view. A prototype revision starts at Rev 001 and is self-approved, followed by a larger approval cycle involving multiple pre-defined teams with a revision scheme calling for Rev A.

Sample JSON formatted workflows

Any propertyId for users or teams, or revSchemeId, must be changed to the proper hexadecimal code in your company settings. For more information on creating and deploying custom workflows, go to the Learning Center’s Administering Custom Release Management Workflows in Onshape Enterprise.

{
  "osWorkflowVersion": "1.5",
  "properties": [
    {
      "name": "Approvers",
      "propertyId": "59403fa4040fc83120937a90",
      "valueType": "USER"
    },
    {
      "name": "Observers",
      "propertyId": "59496726040fc85d2b4181bd",
      "valueType": "USER"
    }
  ],
  "options": {
    "revisionSchemeId": "5851740138fa98150a8f953f",
    "autoObsolete": 1
  },
  "transitions": [
    {
      "name": "SUBMIT",
      "displayName": "Submit",
      "type": "SUBMIT",
      "uiHint": "primary",
      "sourceState": "IN_PROGRESS",
      "targetState": "PENDING",
      "actions": [
        {
          "name": "sendEmailNotifications"
        },
        {
          "name": "sendUserNotifications"
        }
      ],
      "guards": []
    },
    {
      "name": "CREATE_AND_RELEASE",
      "displayName": "Release",
      "type": "SUBMIT",
      "uiHint": "success",
      "sourceState": "IN_PROGRESS",
      "targetState": "RELEASED",
      "actions": [
        {
          "name": "sendEmailNotifications"
        },
        {
          "name": "sendUserNotifications"
        }
      ],
      "guards": []
    },
    {
      "name": "RELEASE",
      "displayName": "Release",
      "type": "APPROVE",
      "uiHint": "success",
      "sourceState": "PENDING",
      "targetState": "RELEASED",
      "actions": [
        {
          "name": "sendEmailNotifications"
        },
        {
          "name": "sendUserNotifications"
        }
      ],
      "guards": []
    },
    {
      "name": "REJECT",
      "displayName": "Reject",
      "type": "REJECT",
      "uiHint": "danger",
      "sourceState": "PENDING",
      "targetState": "REJECTED",
      "actions": [
        {
          "name": "sendEmailNotifications"
        },
        {
          "name": "sendUserNotifications"
        }
      ],
      "guards": []
    }
  ],
  "states": [
    {
      "name": "IN_PROGRESS",
      "displayName": "Setup",
      "notifierSourceProperty": "59496726040fc85d2b4181bd",
      "entryActions": [],
      "exitActions": []
    },
    {
      "name": "PENDING",
      "displayName": "Pending",
      "approverSourceProperty": "59403fa4040fc83120937a90",
      "notifierSourceProperty": "59496726040fc85d2b4181bd",
      "entryActions": [
        {
          "name": "markItemsPending"
        }
      ],
      "exitActions": []
    },
    {
      "name": "RELEASED",
      "displayName": "Released",
      "entryActions": [
        {
          "name": "releaseItems"
        }
      ],
      "exitActions": []
    },
    {
      "name": "REJECTED",
      "displayName": "Rejected",
      "entryActions": [
        {
          "name": "markItemsRejected"
        }
      ],
      "exitActions": []
    }
  ]
}

{
  "osWorkflowVersion": "1.4",
  "properties": [
    {
      "name": "Tier 1 approvers",
      "propertyId": "approvers1",
      "valueType": "USER",
      "defaultValue": [
        "5d094075c8847716c525ec27"
      ]
    },
    {
      "name": "Tier 1 notifiers",
      "propertyId": "notifiers1",
      "valueType": "USER"
    },
    {
      "name": "Tier 2 approvers",
      "propertyId": "approvers2",
      "valueType": "USER",
      "defaultValue": [
        "5d094075c8847716c525ec27"
      ]
    },
    {
      "name": "Tier 2 notifiers",
      "propertyId": "notifiers2",
      "valueType": "USER"
    }
  ],
  "transitions": [
    {
      "name": "SUBMIT",
      "displayName": "Submit",
      "type": "SUBMIT",
      "uiHint": "primary",
      "sourceState": "IN_PROGRESS",
      "targetState": "TIER1",
      "requiredProperties": [],
      "actions": [
        {
          "name": "sendNotifications"
        }
      ]
    },
    {
      "name": "ADVANCE",
      "displayName": "Advance",
      "type": "APPROVE",
      "uiHint": "success",
      "sourceState": "TIER1",
      "targetState": "TIER2",
      "actions": [
        {
          "name": "sendNotifications"
        }
      ]
    },
    {
      "name": "RELEASE",
      "displayName": "Release",
      "type": "APPROVE",
      "uiHint": "success",
      "sourceState": "TIER2",
      "targetState": "RELEASED",
      "actions": [
        {
          "name": "sendNotifications"
        }
      ]
    },
    {
      "name": "REJECT_FROM_TIER1",
      "displayName": "Reject",
      "type": "REJECT",
      "uiHint": "danger",
      "sourceState": "TIER1",
      "targetState": "REJECTED",
      "actions": [
        {
          "name": "sendNotifications"
        }
      ]
    },
    {
      "name": "REJECT_FROM_TIER2",
      "displayName": "Reject",
      "type": "REJECT",
      "uiHint": "danger",
      "sourceState": "TIER2",
      "targetState": "REJECTED",
      "actions": [
        {
          "name": "sendNotifications"
        }
      ]
    }
  ],
  "states": [
    {
      "name": "IN_PROGRESS",
      "displayName": "In Progress",
      "editableProperties": [
        "notifiers1",
        "notifiers2"
      ],
      "isInitial": true,
      "entryActions": [],
      "exitActions": []
    },
    {
      "name": "TIER1",
      "displayName": "Approval tier 1",
      "approverSourceProperty": "approvers1",
      "notifierSourceProperty": "notifiers1",
      "editableProperties": [
        "notifiers1",
        "notifiers2"
      ],
      "entryActions": [
        {
          "name": "markItemsPending"
        }
      ],
      "exitActions": []
    },
    {
      "name": "TIER2",
      "displayName": "Approval tier 2",
      "approverSourceProperty": "approvers2",
      "notifierSourceProperty": "notifiers2",
      "editableProperties": [
        "notifiers2"
      ],
      "entryActions": [],
      "exitActions": []
    },
    {
      "name": "RELEASED",
      "displayName": "Released",
      "entryActions": [
        {
          "name": "releaseItems"
        }
      ],
      "exitActions": []
    },
    {
      "name": "REJECTED",
      "displayName": "Rejected",
      "entryActions": [
        {
          "name": "markItemsRejected"
        }
      ],
      "exitActions": []
    }
  ]
}

Every Tuesday is a new Onshape Tech Tip. Follow us on Facebook, Instagram, Twitter, and LinkedIn, and subscribe to YouTube for the latest on CAD modeling techniques.

Onshape on YouTube

Subscribe to our channel to stay up-to-date on new product releases, Onshape Tech Tips, and more!