concept job in category liferay

This is an excerpt from Manning's book Liferay in Action: The Official Guide to Liferay Portal Development.
Notice that you didn’t set these workflow status fields when you added the entity; instead, you set them as part of the workflow call (which happens anyway when you add the entity, because you call startWorkflowInstance() during the add). You could just as easily have set them in the WorkflowHandler’s updateStatus() method, but it’s better to delegate to the service layer. Why? Because of something I found out the hard way when I was learning: workflow won’t re-persist your entity—you have to do it. And where does persistence code get called? In the service layer. Here is where you update all the fields in your entity that have to do with workflow; then you save it. Note that you also update the visibility of the asset, so anything that’s not approved is invisible to Asset Publisher. Otherwise, your tag queries in that portlet would show all the slogans, regardless of whether they had been approved, and you certainly don’t want that. If Inkwell’s management got sued because of objectionable material on the site, the prospect of holding on to a job there would be rather dim.
Now that you know about the message bus, using the scheduler will be a piece of cake, because it uses the message bus to get the jobs done. The jobs are MessageListener classes, just like the ones you’d write to receive a message sent across the message bus. All the scheduler does is kick off one of those MessageListener classes on the schedule you define.