Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camunda Testcase Issue: Mocking same call activity once with message boundary event and once without message boundary event #295

Open
mahantesh1983 opened this issue Feb 22, 2023 · 0 comments

Comments

@mahantesh1983
Copy link

Writing test case for my workflow, mocking same call activity once with message boundary event and once without message boundary event.

I have single main workflow which calls one same sub process in call activity 2 times with different scenario, once I need the call activity to wait till I receive the massage from boundary event and once no need to wait. I’m attaching my BPMN and test case for the reference. If I use:

ProcessExpressions.registerCallActivityMock(“CALL_SUB_PROCESS”)
.deploy(processEngineRule);

then it throws error for message correlation: Error while evaluating expression: ${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“READ_MESSAGE2”).processInstanceId(execution.getProcessInstanceId()).correlate()}. Cause: org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘READ_MESSAGE2’: No process definition or execution matches the parameters

If I use:

ProcessExpressions.registerCallActivityMock(“CALL_SUB_PROCESS”)
.onExecutionWaitForMessage(“READ_MESSAGE2”)
.deploy(processEngineRule);

it is throwing null pointer exception. Please help to resolve the issue

resources.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant