cancel
Showing results for 
Search instead for 
Did you mean: 

how to parse an bpmn file?

rsoika
Champ in-the-making
Champ in-the-making
Hi,

I have created a BPMN file with the eclipse bpmn2 plugin and also one with signavio modeling tool.
How can I use the Activiti engine to parse this file?

The org.activiti.engine.impl.bpmn.parser.BpmnParser seems to be the right class. But I could not find an example how to parse a xml resource file with the activit engine.
Can anybody help me?

===
Ralph
9 REPLIES 9

frederikherema1
Star Contributor
Star Contributor
What do you mean by "parsing"… The class you are referring to parses the BPMN and converts it to a process-definition activiti can understand. So the model isn't really reusable, it's parsed to be used in Activiti, so you can just run the process in activiti.

rsoika
Champ in-the-making
Champ in-the-making
Hi,
thanks for your reply.
what I am searching for is a simple BPMN parser. We created BPMN 2.0 files based on the BPMN 2.0 schema definition. But our customer want to implement his own process engine. So we thinking about to parse the BPMN file with a custom sax or dom XML Parser.
But if the activiti project provides a way to parse a BPMN 2.0 file this would be great!

====
Ralph

frederikherema1
Star Contributor
Star Contributor
Rather than writing your own process-engine, use activiti Smiley Wink

If you're not going to use activiti, I'm afraid you won't be able to take a lot of the code in the BPMNParser, because it's tailored to the activiti-model and extensions. However, the source-code can be a good reference for common process-engine constructs/solutiuons.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
But our customer want to implement his own process engine

Who is this customer? Nasa? IBM? JBoss?

rsoika
Champ in-the-making
Champ in-the-making
But our customer want to implement his own process engine

Who is this customer? Nasa? IBM? JBoss?

yes - something like that - automotive.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Smiley Very Happy an automitive company is not anything like Nasa, nor is it an it company like IBM and/or JBoss. What I meant to say was that only those companies have a valid reason to develop their own BPMN2 engine (even Nasa should not)

But if you can/are allowed to elaborate, I'd be very curious to why they would want to develop it themselves.

rsoika
Champ in-the-making
Champ in-the-making
Hi Ronald,
you guessed it 😉 I am responsible for the imixs workflow project (http://www.imixs.org). But this it not the topic here.
The project where I work for, is from a munich automobile company. And the project has a size at which nothing is good enough…. neither Activiti still Imixs Worklfow.
You're right that there is no reason to develop something like this themselves in a project.
But frameworks like Activiti or Imixs access very deep into the business logic of a software system. I think some it managers are afraid to relinquish control of there own software architecture.
This is really strange ….

===
Ralph

frederikherema1
Star Contributor
Star Contributor
Too bad some companies think this way…
Anyway, I wish you the best of luck in your quest for the holy grail Smiley Wink