API to generate custom workflow

is there API to generate BPMN XML from UI inputs to manage custom workflow.