cancel
Showing results for 
Search instead for 
Did you mean: 

Call activiti : call version from the same deployment, not the latest

erwan
Champ in-the-making
Champ in-the-making
Hi,

I have a BAR file containing :
Master.bpmn
Sub.bpmn

Master calls sub using "Call Activiti" task.

The BAR file is deployed, I get
Master v1
Sub v1

1. I launch Master v1 instance "X", start a process that runs for hours.
2. In the meantime, I deploy a new BAR and get:
Master V2
Sub V2
3. instance X finishes the long running task and proceeds to task "Call Activiti: Sub"

Expected:
Master V1 instance X calls Sub V1

Actual
Master V1 instance X calls Sub V2

I understand why it does that, but is there any way we could restrict the call to target the sub workflow version from the same BAR
(without knowing in advance the next id)


Thanks a lot to the devs for their work on Activiti

Erwan





2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Erwan,

yes it is possible. Change


    ProcessDefinitionEntity processDefinition = null;
    if (execution.getTenantId() == null || ProcessEngineConfiguration.NO_TENANT_ID.equals(execution.getTenantId())) {
     processDefinition = deploymentManager.findDeployedLatestProcessDefinitionByKey(processDefinitonKey);
    } else {
     processDefinition = deploymentManager.findDeployedLatestProcessDefinitionByKeyAndTenantId(processDefinitonKey, execution.getTenantId());
    }

To fetch your expected process definition version. (May be you could extend model too to have this switch - and create pull request)

Regards
Martin

erwan
Champ in-the-making
Champ in-the-making
Hi Martin,

It's been a while, but thanks for the answer Smiley Happy

I'll definitely look into it !

Regards,

Erwan