Is there any way to convert XML file full of bpmn tasks into tasks in JSON format to feed in for making element templates?
The .bpmn file I have, has many such tasks in it:
<bpmn:callActivity id=“proposalUnderwriting_P1” name=“Underwriting (LT)” calledElement=“ProposalUnderwritingTask_DemoP1”>
bpmn:extensionElements
<camunda:in variables=“all” />
<camunda:out variables=“all” />
<camunda:in businessKey=“#{proposalId}” />
</bpmn:extensionElements>
</bpmn:callActivity>
when I convert it into .json format for feeding in as element template it looks something similar (not exactly) to this:
{
"$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json",
"name": "Underwriting (LT)",
"id": "proposalUnderwriting_P1",
"version": 1,
"description": "Underwriting (LT) call activity",
"category": {
"id": "distribution",
"name": "Distribution"
},
"appliesTo": ["bpmn:CallActivity"],
"properties": [
{
"label": "Business Key",
"type": "String",
"binding": {
"type": "camunda:in",
"businessKey": "${proposalId}"
}
},
{
"label": "Input all",
"type": "Hidden",
"binding": {
"type": "camunda:in",
"variables": "all"
}
},
{
"label": "Output all",
"type": "Hidden",
"binding": {
"type": "camunda:out",
"variables": "all"
}
}
]
}
Is there any way to programmatically convert a task in .bpmn format into a task in .json format for feeding as element template.
I came across some posts around converting XML to JSON but they were obsolete, so I thought to ask this again. May be they were asked in a different context than element templates.