Getting process name from DelegateExecution????

558 views
Skip to first unread message

Tina

unread,
Oct 22, 2014, 4:58:21 PM10/22/14
to camunda-...@googlegroups.com
Hi all, 

I noticed there is no API for getting the process name from DelegateExecution, so is there a diff way to get that info at runtime?

Tnx, 
Tina

Martin Schimak

unread,
Oct 22, 2014, 5:08:25 PM10/22/14
to camunda-...@googlegroups.com
Hi Tina,

I recently retrieved it in groovy like...

execution.bpmnModelInstance.definitions.rootElements.find {it.getAttributeValue("isExecutable") == "true"}.getAttributeValue("name")

Many greetings,
Martin.
--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/f2f967fc-2772-4ea3-b5d4-b92b2f9b22ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Menski

unread,
Oct 23, 2014, 3:56:54 AM10/23/14
to camunda-...@googlegroups.com
Hi Tina,

you could also use the repository service:

RepositoryService repositoryService = execution.getProcessEngineServices().getRepositoryService();
String processName = repositoryService.createProcessDefinitionQuery()
 
.processDefinitionId(execution.getProcessDefinitionId())
 
.singleResult()
 
.getName();

Cheers,
Sebastian
Reply all
Reply to author
Forward
0 new messages