I'd like to be able to programmatically generate process-id dynamically at runtime. You can't seem to use ${process_variables} to do this within .bpmn20.xml file – I got XML parse exception doing this. Is there any other way in XML / Java API that allows this before a Deployment is deployed?
My workaround is to parse .bpmn20.xml into String, replaced the Id myself, before converting it back into InputStream for Bpmn parsing, but I'm hoping to get better suggestion.
You can read the xml into a BpmnModel first, and change the id through the Java api. Afterwards, simply deploy that BpmnModel through the repositoryService.
Same goes for value of timeCycle tag. It doesn't take a ${process_variable}, and failed with XML parsing error. This contradicts with what the docs says:
You can use expressions for the timer event definitions, by doing so you can influence the timer definition based on process variables. The process variables must contain the ISO 8601 (or cron for cycle type) string for appropriate timer type.
The timeCycle tag works ok with the XML converter. I've added the tag to the UserTaskConverter test in the activiti-bpmn-converter module to show that. I see that you use timerCycle instead of timeCycle, that could be the issue.