"Dynamically" determined Call Activity Process Definition?

962 views
Skip to first unread message

Martin Schimak

unread,
Oct 22, 2013, 8:51:10 AM10/22/13
to camunda-...@googlegroups.com
Hi all,

In the docs (http://docs.camunda.org/latest/api-references/bpmn20/#subprocesses-call-activity) I read that "the process definition of the subprocess is resolved at runtime". But does that also include that the called process may be configured in a dynamic way, resolving to different process definitions based on some logic executed at runtime?

In other words: is it possible to use UEL in the calledElement attribute of a callActivity?

<callActivity id="callSomeProcess" name="Execute some process" calledElement="#{someService.determineProcessDef()}" />

Or is there another possibility to achieve the same?

Thank you,
Martin.

PS: (No time to try it myself right now, cause at a customer's site, so I thought I ask here). Thank you!

Bernd Rücker (camunda)

unread,
Oct 22, 2013, 8:55:33 AM10/22/13
to camunda-...@googlegroups.com

Yes – that is possible (should actually be mentioned in the docs – I make a note that we can improve docs here).

--
You received this message because you are subscribed to the Google Groups "camunda BPM users & process application developers" 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/1B930AF5062A4F51BAC06C13AECE3F7B%40plexiti.com.
For more options, visit https://groups.google.com/groups/opt_out.

Martin Schimak

unread,
Oct 22, 2013, 11:29:57 AM10/22/13
to camunda-...@googlegroups.com
Hi all,

Interestingly enough, when I checked that now it turned out that 1 doesn't work for me whereas 2 works…

1. <callActivity id="callProcess" name="Execute some process" calledElement="#{processDefinition}" />
2. <callActivity id="callProcess" name="Execute some process" calledElement="${processDefinition}" />

In case of 1 the expression is not resolved anymore. I get the error message: 

no processes deployed with key '#{processDefinition}'
Line | Method
69 | findDeployedLatestProcessDefinitionByKey in org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache

So, when reading in the docs that the "process definition of the subprocess is resolved at runtime" I figure now that this means that it is actually just resolved at process instantiation time and not resolved "deferred" when actually running into the callActivity? 

(Expected behaviour?)

Many greetings,
Martin.

Bernd Rücker (camunda)

unread,
Oct 23, 2013, 4:04:31 AM10/23/13
to camunda-...@googlegroups.com

Hi Martin.

 

> " I figure now that this means that it is actually just resolved at process instantiation time and not resolved "deferred" when actually running into the callActivity? 

 

Why do you think so? With the default binding (late, see http://docs.camunda.org/latest/api-references/bpmn20/#subprocesses-call-activity-calledelement-binding) it is resolved when running into the callActivity – you should see that in the stacktrace – or no?

 

With “#”/”$” difference: I would consider this a bug –feel free to open an issue for it!

 

Cheers

Bernd

Martin Schimak

unread,
Nov 9, 2013, 10:06:01 AM11/9/13
to camunda-...@googlegroups.com
Opened https://app.camunda.com/jira/browse/CAM-1490 - and many thx for your answer. 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.
Reply all
Reply to author
Forward
0 new messages