Workflow compiler and structure