Hi,
The important question here is whether the absence from duty for 2 years is approved one or absence without information?
As per Section 2A of the Act, it is clear that in the event the employee is absent from the duty due to sickness, accident, leave or absence from duty without leave, he/she would be entitled to the benefit of gratuity unless the employer has passed an order treating such absence without leave as a break in service in accordance with the Standing Orders of Employment applicable to the employee.
If the employee had absconded without information and if disciplinary action is initiated then said cannot be considered as continuous service.