Fixing workflows controller to fill 'spec' property based on definition

Change-Id: I9ef6125c9844ad6d768629c0ec0fe332b415c55e