V3 Conversion Guide

V3 Conversion Guide

There are currently two methods to convert an existing V2 Workflow Schema to the new and improved V3 in your local workflow repository.

Method 1: FormBio CLI

If you do not already have the FormBio CLI installed your machine, check out this doc.

  1. cd into the root of the workflow repository you wish to work on
  2. Copy the relative path to the JSON file containing the Workflow Schema you’d like to convert
  3. Run formbio workflow build --env <env> --schema <relativePath>
    1. <env> should be either sbx, stg, or prd depending on which environment you’d like to be authenticated on
  4. If authentication is successful and the JSON is a valid V2 schema, you will see an output.zip file downloaded alongside your current JSON file. Simply unzip its contents to get your V3 version and rename it to replace the V2 file.

Method 2: workflow-schema Package Script

  1. If you have not already, git clone the workflow-schema package to your machine
  2. cd into the root of the workflow-schema repo
  3. If cloned prior to this, run git pull origin main to get the latest contents
  4. Copy the full path on your machine to the V2 schema JSON file you would like to convert
  5. Run ./scripts/V2ToV3.sh <fullPath>
    1. You may need to run chmod +x <fullPathTo ./scripts/V2ToV3.sh> to be able to execute the script
  6. If successful, the existing V2 JSON schema file will be overwritten with the V3 version