cancel
Showing results for 
Search instead for 
Did you mean: 

Get processDefinition tasks , start event, end event using Java, without creating a process instance

mansi
Champ in-the-making
Champ in-the-making
Hi,
My requirement is to get the details about deployed processDefinition, like Tasks in it, its StartEvent, EndEvent.
But I want to have these without creating a process instance.
Is there a way to achieve this?
I have been looking into activiti user guide as well as javadocs, but couldn't find a way.
Any help will be appreciated. Thanks.
30 REPLIES 30

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mansi,

have a look on the following jUnit test in the activiti source:
org.activiti.engine.test.bpmn.event.end.TerminateEndEventTest#testParseTerminateEndEventDefinitionWithExtensions

Regards
Martin

mansi
Champ in-the-making
Champ in-the-making
Hey, Thanks a lot, I looked into that test and was able to proceed with my task.

I also want to know if there is some way to update a processDefinition after creating it once.
Thanks.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mansi,

I do not know about such a possibility in activiti5 (it could be supported in the activiti6).

Regards
Martin

mansi
Champ in-the-making
Champ in-the-making
Okay thanks again.

I have one more question:
Is there a way to create a process definition without specifying configuration in an xml file, instead specifying it programatically?

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

You can deploy process definition with org.activiti.engine.RepositoryService#createDeployment and deploy the deployment afterwards.

Regards
Martin

mansi
Champ in-the-making
Champ in-the-making
So ultimately it will need the xml file right? when we will deploy it?

jbarrez
Star Contributor
Star Contributor
BPMN 2.0 is an XML standard, so yes.
The alternative is creating it in java (see the BpmnModel approach in the class that Martin mentions above).

mansi
Champ in-the-making
Champ in-the-making
Hey, Thanks a lot will look into it.

mansi
Champ in-the-making
Champ in-the-making
Hello, I found that after creating a process using BpmnModel, it has to be converted to xml for deployment, is that correct? Or is there any other way of doing it?