SET @candidate_entity_options := '{
  "progressCalculator": {
    "class": "PreboardingWorkflowRequestProgressCalculator",
    "options": {
      "processes": {
        "Offer Information": {
          "tasks": [
            {
              "name": "Fill-in Offer Information",
              "completedStates": [
                "Submitted"
              ],
              "completedStatesSelf": [
                "Submitted"
              ]
            }
          ]
        },
        "Initiate Onboarding": {
          "tasks": [
            {
              "name": "Initiate Onboarding",
              "completedStates": [
                "Completed"
              ],
              "completedStatesSelf": []
            }
          ]
        },
        "Welcome": {
          "tasks": [
            {
              "name": "Welcome Candidate",
              "completedStates": [],
              "completedStatesSelf": [
                "Completed"
              ]
            }
          ]
        },
        "Personal Information": {
          "tasks": [
            {
              "name": "Personal Information",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Contact Details": {
          "tasks": [
            {
              "name": "Contact Detail",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Emergency Contacts": {
          "tasks": [
            {
              "name": "Emergency Contacts",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "DBS Details": {
          "tasks": [
            {
              "name": "DBS Detail",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        }
      }
    }
  }
}';
UPDATE ohrm_advanced_workflow_entity SET options = @candidate_entity_options where name = 'Candidate';
