SET @entity_options := '{
  "progressCalculator": {
    "class": "PreBoardingWorkflowRequestProgressCalculator",
    "options": {
      "processes": {
        "Welcome New Hire to the Team": {
          "tasks": [
            {
              "name": "Send Welcome Email to the New Hire",
              "completedStates": ["Completed"],
              "completedStatesSelf": []
            }
          ]
        },
        "Self Introduction": {
          "tasks": [
            {
              "name": "Self Introduction Submission",
              "completedStates": [
                "Completed"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Completed"
              ]
            }
          ]
        },
        "New Hire''s Joining Announcement Email": {
          "tasks": [
            {
              "name": "Send New Hire''s Joining Announcement Email",
              "completedStates": ["Completed"],
              "completedStatesSelf": []
            }
          ]
        },
        "Personal Details": {
          "tasks": [
            {
              "name": "Personal Details",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Contact Details": {
          "tasks": [
            {
              "name": "Contact Details",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Emergency Contacts": {
          "tasks": [
            {
              "name": "Emergency Contacts",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Dependent Information": {
          "tasks": [
            {
              "name": "Dependent Information",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Immigration Information": {
          "tasks": [
            {
              "name": "Immigration Information",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Memberships": {
          "tasks": [
            {
              "name": "Memberships",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "References": {
          "tasks": [
            {
              "name": "Reference Details Submission",
              "completedStates": [
                "Approved",
                "Rejected"
              ],
              "completedStatesSelf": [
                "Pending Approval",
                "Pending Initiation",
                "Initiated",
                "Submitted",
                "Approved",
                "Rejected"
              ]
            }
          ]
        },
        "Forms and Attachments": {
          "tasks": [
            {
              "name": "Forms and Attachments",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        },
        "Qualifications": {
          "tasks": [
            {
              "name": "Work Experience",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            },
            {
              "name": "Educations",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            },
            {
              "name": "Skills",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            },
            {
              "name": "Languages",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            },
            {
              "name": "License",
              "completedStates": [
                "Approved"
              ],
              "completedStatesSelf": [
                "Submitted",
                "Approved"
              ]
            }
          ]
        }
      }
    }
  }
}';
UPDATE ohrm_advanced_workflow_entity SET options = @entity_options where name = 'Preboarding Employee';
