Subprocess and parent process not related. Subprocess not in persisted

Hello dear community
I use flowable with spring boot.
I have configured a hibernate datasource and all seems fine. Application starts and processes and tasks are created but…
As soon as a process starts a subprocess it does seem that the subprocess is not persisted in the database.Variables from the parent process that should be passed to the subprocess are not available inside the subprocess even if i check “inherit variables…”. Weirdly enough i can complete tasks of the subprocess and query them with the flowable API.
What could I have possibly configured incorrectly ?
Thank you for any tipps

Hi bitcasso,

How did you find that process <-> subProcess are not related? ( did you check process-> execution…)
Regards
Martin

Hello Martin, thank you for responding

I did several things to assure that process and subprocess are not related. I checked it via the flowable admin App. I checked the entries in the database table act_ru_execution with businesskey and i tried to find the subprocess with the parent process id in the table. I could not find the subprocess at all in the database. At first i was thinking about HibernateTransactionmanager or a faulty datasource configuration but everything else works. The parent process is persisted and starts the subprocess immedeately. I also thought of a tenant misconfiguration but that seems to be ok. Another possible misconfiguration could lead to flowable to store entities to the h2 mem database instead of my postgres database BUT i still find the parent process in the database which puzzles me a lot
Regards

The problem is to find process ↔ subprocess reference in the DB. Did you check SUPER_EXEC_ID_ (execution from the parent process) and ROOT_PROC_INST_ID_ ?

Regards
Martin

I checked the database and found the subprocess. Both processes are related but the runtimeservice won’t associate them. So there should not be a problem with my use of the process api since the flowable admin app won’t find it either

COuld you create simple jUnit test for your case?

Thank you for your help. I figured out what the problem was. The history level of the subprocess definition was set to NONE. After changing it to the same level as the parent process everything worked as expected.

1 Like

Hello,

I’m facing the same problem and I’m not fix it.

I have this process that includes a subprocess:
! [image | 620x257] (upload: //2fAi0VQRxmAD4fKHNqil8AnuM3z.png)

When I check Instances tab (in admin app), subprocess list is empty and I cannot view the diagram of the subprocess.

image

I have set the history level in process and subprocess like this:
<flowable: historyLevel xmlns: flowable = "http://flowable.org/bpmn"> <! [CDATA [audit]]> </ flowable: historyLevel>
I have also probed with “full” value but nothing works.

@bitcasso
Could you tell me how exatcly solved your problem?

Thanks!
Ana

Hello
Have you also enabled entity links ?
SpringProcessEngineConfiguration.setEnableEntityLinks(true)

Thanks for your response, @bitcasso

Yes, I do have entity links enable in SpringProcessEngineConfiguration bean.
I don’t know what I’m missing…

According to your bpmn diagram you dont have a call activity task. It seems to me you only have defined a mail task in an embedded sub process. This will not reference a sub process bc it is a embedded subprocess. check out the flowable documentation.
BPMN 2.0 Constructs · Flowable Open Source Documentation

1 Like

HI Ana, your diagram actually uses what is termed an “Embedded” Sub Process. This in fact isn’t a sub process at all and is really intended to compartmentalize a diagram for ease of comprehension.
In order for a true sub-process to be created you need to use a “Call Activity” step.
Hope this helps.

1 Like

Thanks for you answers!
I was misunderstanding concepts “subprocess” and “Call Activity”.
I will try using “Call Activity” element then.

Ana