Encapsulating job states