Move creation of resource into its own method
We can refer to workitem[] directly instead of through the 'fields' attr
Handle rollback on error or timeout