How do I execute a call activity task in unit tests?

I have a model like this, there are 2 call activity elements and both calls another bpmn file

I can’t seem to find how to execute this and output a variable, something similar to external service tasks where I just call complete(externalTask(), withVariables(...))

I can see it’s stuck there because isWaitingAt("BPMN_1") returns true. I also have Asynchronous continuation set to true but execute(job()) does nothing because job is null.

Hi,

what happens in the called Subprocess at BPMN 1?

If you want to mock the called Process of the CallActivity, you can use camunda-platform-7-mockito for this. (There you can also configure which variables should be passed back by the mocked subprocess)

Cheers,
Patrick