Added a way to have a setup task.

Sometimes we want to do some task once before starting the activity.
This is now doable.