When a call activity does not specify any version of the process to call, which version is actually called?

Hi,

When we define a call activity, we must specify the process to call:

  • Name [mandatory]
  • Version [optional]

According to the Studio tooltip:

If the expression is blank or return null the latest deployed version will be used.

However, how is the latest deployed version determined?

Please note that, regardless of the deployment date, we see the following behaviour for the various versions of the same sub-process:

  • 7.10.4 > 7.9.2
  • 7.10.4 > 0.8.10.4
  • 0.8.10.4 > 7.9.2
  • aaa.7.10.4 > 7.10.4

==> So it seems like some sort of String comparison is applied, although not a plain one (or else, how come  0.8.10.4 > 7.9.2 ???)
 

Could you please detail/explain/specify how the engine chooses the latest deployed version?

 

Thanks for your help,

   Unai

 

Well,

After some more thorough testing, I answer my own question here:

The choice seems to be made looking at the DEPLOYMENTDATE of the target process (sub-process) definition.

Please feel free to correct or mark this answer as invalid if I got it wrong.

Thanks,

   Unai

 

Yes indeed, it uses "getLastProcessDefinitionId" that get the one that is deployed the most recently.

https://github.com/bonitasoft/bonita-engine/blob/master/bpm/bonita-core/bonita-process-definition/src/main/java/org/bonitasoft/engine/core/process/definition/ProcessDefinitionServiceImpl.java#L515

Should this need to be specified in the documentation?

Thank you, Baptiste!

Indeed, it is a good thing this was now added in the documentation. :-)