Adapt Workflow API to match code