cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the class name of Service task configured in bpmn file

abhilashs
Champ in-the-making
Champ in-the-making
Hi,

I want to get the class name configured for each service task from the bpmn file at runtime. How can this be done? Is there a way I can parse the file and get the class at runtime?

Thanks
Abhilash S
2 REPLIES 2

hari
Star Contributor
Star Contributor
Hi,

Do you want the class names of all service tasks at once or do you want the class name of the class when the control gets to that service task ?
If you want it when the control gets to that service task then you can use this.getClass().getName() to get it.

If you are looking for parsing the bpmn xml file to get the details then you may use the DOM parser.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Abhilash,

You can have a look on org.activiti.engine.impl.bpmn.parser.handler.ServiceTaskParseHandler to see how model is parsed and handled.

Regards
Martin