Create Factory for Task

Change-Id: Iad24fc88cdd83977e63427c1908b160760fb2672