cancel
Showing results for 
Search instead for 
Did you mean: 

User Task is null after multi callactivity is done

edgarjoao
Champ in-the-making
Champ in-the-making
Hi all,
I have a User Task close to multi call Activity, once call Activity is done, the current flow should be on the User Task,  and this task is null when I try to get it via Task Query
I added a image with more information.

| Call Activity(multiple) |  —> | User Task |
                                                        |—–> This is null

Task userTask = taskService.createTaskQuery().taskName("Task Name").singleResult();

userTask is null Smiley Sad



Thanks,
Edgar
7 REPLIES 7

edgarjoao
Champ in-the-making
Champ in-the-making
Hi,
I have created a Unit Test, but I dont know what should be the correct process to create branch with my custom code.

Unit Test for, Trying to get User Task after Multi instance Call Activity is done.

Edgar

edgarjoao
Champ in-the-making
Champ in-the-making
I had to update cancel process

edgarjoao
Champ in-the-making
Champ in-the-making
A multi-instance activity ends when all instances are finished. However I'm not able to continue through the main process

edgarjoao
Champ in-the-making
Champ in-the-making
Debugging I found this
nrOfInstances=VariableInstanceEntity[id=14, name=nrOfInstances, type=integer, longValue=5, textValue=5],
nrOfActiveInstances=VariableInstanceEntity[id=16, name=nrOfActiveInstances, type=integer, longValue=5, textValue=5],
nrOfCompletedInstances=VariableInstanceEntity[id=15, name=nrOfCompletedInstances, type=integer, longValue=0, textValue=0]

nrOfCompletedInstances = 0, seems like any of the instances are finish correctly
am I missing something?

jbarrez
Star Contributor
Star Contributor
Your called process is not finished yet: it still is in the 'Esperar Cancelación' recive task, which is active (check your db at the end of the test and you'll see the process is there).

edgarjoao
Champ in-the-making
Champ in-the-making
If I call 'Esperar Cancelación' it would call cancel signal and then finalize the process instead of just complete the task, but if I change end event to terminateEventDefinition and seems to work, I'll double check.

edgarjoao
Champ in-the-making
Champ in-the-making
Thank you jbarrez, that was the issue, I forgot sent the signal in order to complete all receivetask's Smiley Happy