Implementing FIFO with Get Next Action

I want to imeplement getNextWork action and get the tasks in FIFO order based on creation date. How to implement?