Take a look at the activiti-bpmn-model and activiti-bpmn-converter modules.
Create the complex process you need in the BPMN Model POJO's (using your intermediate language/model). Use the org.activiti.bpmn.converter.BpmnXMLConverter class to turn your BPMNModel into an XML-file…
Also, we have a simmilar approach (turning simple model into complex process-steps), maybe you can take a look there for inspiration: activiti-simple-workflow