cancel
Showing results for 
Search instead for 
Did you mean: 

How to get candidate groups or users from process definition before deployment?

doganmesut
Champ in-the-making
Champ in-the-making
Hi guyz,
We are trying to get candidate groups or users from process deifinition before deployment.
Because we want  to deploy processes by these given groups.
Is it possible to parse defintion or something like that just before deployment ?

P.S I dont want to get tasks candidate groups or users.
8 REPLIES 8

doganmesut
Champ in-the-making
Champ in-the-making
Any solution ?

jbarrez
Star Contributor
Star Contributor
use the BpmnModel to get the process definition info. Check repositoryService.getBpmnModel.

doganmesut
Champ in-the-making
Champ in-the-making
Process definition id is on the scene after deployment i think ? But I need candidate groups just before deployment . Because I need to deploy rocesses according to these values . If I am wrong please correct me.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

You have to parse bpmn2.xml and you will get candidate groups, users…. . I do not see added value in it, because user/groups are mostly evaluated in runtime in the expressions, and real assignment depends on the identity service status.

Regards
Martin

doganmesut
Champ in-the-making
Champ in-the-making
Hi Martin,
Do you mean parse it like a plain xml file ? Or is there another customized way which is provided by activiti to parse it  ?

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Activiti has parser too (you can use it if you want to)

regards
Martin

doganmesut
Champ in-the-making
Champ in-the-making
Could you please show me a simple example ? Because I could not find a way to do it . It is enough a couple of lines code which shows how to parse it . Thanks.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
Have a lok how is it done inside:
e.g. org.activiti.engine.impl.cfg.DefaultBpmnParseFactory

Regards
Martin