Hi,
Am new to camunda as well as java.
My requirement is, I want to get all attributes value from all node of every task, event, Gateway… etc through java and transfer to excel file in seperate sheet.
I have tried to code using Read a model document, but cant get exact output.
public class Main {
public static void main (String[] args) {
File file = new File("My file path/My_model.bpmn");
BpmnModelInstance modelInstance = Bpmn.readModelFromFile(file);
// find all elements of the type task
ModelElementType taskType = modelInstance.getModel().getType(Task.class);
Collection<ModelElementInstance> taskInstances = modelInstance.getModelElementsByType(taskType);
System.out.println(taskType.getByName());
}
}
I know it contain nothing much.
Please guide my from the scratch, that how can i achieve my code.