Menu

Schedule 2nd round interview issue

2010-09-20
2013-06-05
  • Arnold De Souza

    Arnold De Souza - 2010-09-20

    In the demo of orangeHRM we can schedule upto 2 interviews. but on installing stable version 2.6 in our system we can schedule only one interview therafter it moves to offer job. why is it so???

     
  • Mario

    Mario - 2012-01-26

    This is because of the standard workflow which is defined in: PluginWorkflowStateMachine.class.php
    See last line of code fragment below:

        const RECRUITMENT_APPLICATION_ACTION_ATTACH_VACANCY = 1;
        const RECRUITMENT_APPLICATION_ACTION_SHORTLIST = 2;
        const RECRUITMENT_APPLICATION_ACTION_REJECT = 3;
        const RECRUITMENT_APPLICATION_ACTION_SHEDULE_INTERVIEW = 4;
        const RECRUITMENT_APPLICATION_ACTION_MARK_INTERVIEW_PASSED = 5;
        const RECRUITMENT_APPLICATION_ACTION_MARK_INTERVIEW_FAILED = 6;
        const RECRUITMENT_APPLICATION_ACTION_OFFER_JOB = 7;
        const RECRUITMENT_APPLICATION_ACTION_DECLINE_OFFER = 8;
        const RECRUITMENT_APPLICATION_ACTION_HIRE = 9;
        const RECRUITMENT_APPLICATION_ACTION_SHEDULE_2ND_INTERVIEW = 10;

    This "const RECRUITMENT_APPLICATION_ACTION_SHEDULE_2ND_INTERVIEW = 10;" can be found tied in to the workflow in the fillowing source file:

    dbscript-2.sql

    In there all transitions between different Statuses are defined. And instead of linking back to "Schedule Interview" after scheduling an interview, the workflow links to "Schedule 2nd Interview" and from there then to pass/fail/reject. I hope you get my drift. By Changing the values in "dbscript-2.sql" you can customize your own workflow. If you need to add workflow items, you must declare them in "PluginWorkflowStateMachine.class.php" and add the display name of them too. E.g. if you add "const RECRUITMENT_APPLICATION_ACTION_WITHDRAWN = 11;" at the bottom of the list, you must define a display text for it (further down in the file) like so:

                case PluginWorkflowStateMachine::RECRUITMENT_APPLICATION_ACTION_WITHDRAWN:
                    $actionName = "Candidate Withdrew";
                    break;

    After that is done you must make the identical changes to the database table "ohrm_workflow_state_machine_files" as this holds the values and transitions. Here is an example:

    ('81','2','INTERVIEW SCHEDULED','ADMIN','11','WITHDRAWN'),
    ('82','2','INTERVIEW SCHEDULED','HIRING MANAGER','11','WITHDRAWN'),
    ('83','2','INTERVIEW SCHEDULED','INTERVIEWER','11','WITHDRAWN'),
    ('84','2','WITHDRAWN','ADMIN','4','INTERVIEW SCHEDULED'),
    ('85','2','WITHDRAWN','HIRING MANAGER','4','INTERVIEW SCHEDULED'),
    ('86','2','WITHDRAWN','INTERVIEWER','4','INTERVIEW SCHEDULED'),
    ('87','2','REJECTED','ADMIN','2','SHORTLISTED'),
    ('88','2','REJECTED','HIRING MANAGER','2','SHORTLISTED'),
    ('89','2','REJECTED','INTERVIEWER','2','SHORTLISTED'),

    Can you see what I did there? These 9 additional lines in "dbscript-2.sql" will create a transition from "scheduled" to "withdrawn" in case an interviewee cancels his or her appointment.
    The there is a transition from "withdrawn" to scheduled again.
    And lastly I added a transition from rejected back to shortlisted.

    Just don't forget to change one line a bit furter up in the code from:

    (80,'ohrm_workflow_state_machine', 'id'),

    To:

    (89,'ohrm_workflow_state_machine', 'id'),

    That is necessary to reflect the changes you made in the database.