Workbench section PHP assignment
Where are you doing the call to workbench? Have you tried doing the call in the postprocess of the node creation. Maybe you don't have the proper database object yet when you do it?