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

Event Based Gateway error #84

Closed
NeoBlackHy opened this issue Apr 28, 2022 · 3 comments · Fixed by #85
Closed

Event Based Gateway error #84

NeoBlackHy opened this issue Apr 28, 2022 · 3 comments · Fixed by #85
Assignees
Labels
bug Something isn't working as intended

Comments

@NeoBlackHy
Copy link

If an event based gateway is part of a selected test, the generation fails with the following error " Unexpected error occurred: 'asyncAfter' is not supported for 'Event Based Gateway' ".
Here is a part of the stack trace :

Caused by: java.lang.UnsupportedOperationException: 'asyncAfter' is not supported for 'Event Based Gateway' at org.camunda.bpm.model.bpmn.impl.instance.EventBasedGatewayImpl.isCamundaAsyncAfter (EventBasedGatewayImpl.java:90) at org.camunda.community.bpmndt.TestCaseActivity.isAsyncAfter (TestCaseActivity.java:124) at org.camunda.community.bpmndt.cmd.GenerateJUnit4TestCase.addHandlerFields (GenerateJUnit4TestCase.java:96) at org.camunda.community.bpmndt.cmd.GenerateJUnit4TestCase.accept (GenerateJUnit4TestCase.java:53) at org.camunda.community.bpmndt.cmd.GenerateJUnit4TestCase.accept (GenerateJUnit4TestCase.java:32) at org.camunda.community.bpmndt.Generator.generateTestCases (Generator.java:159) at org.camunda.community.bpmndt.Generator.generate (Generator.java:68)

The isAsyncAfter() method of TestCaseActivity which calls flowNode.isCamundaAsyncAfter() throws an UnsupportedOperationException due to EventBasedGatewayImpl.isCamundaAsyncAfter() implementation :

image

@gclaussn gclaussn self-assigned this Apr 28, 2022
@gclaussn gclaussn added the bug Something isn't working as intended label Apr 28, 2022
@gclaussn
Copy link
Collaborator

gclaussn commented Apr 28, 2022

I have fixed the bug by adding a special handling for event based gateways - please see 602ccf7. If you want to try it out/test it with your process definition and test cases:

  • checkout the bugfix/event-based-gateway-error branch
  • change directory to maven-plugin/
  • install it using mvn clean install -DskipTests
  • set the version of the bpmn-driven-testing-maven-plugin in your pom.xml to 0.5.0-SNAPSHOT
  • regenerate the test code

Until now I had no tests, which included an event based gateway. Moreover I used the extension only for pretty simple processes so far - sorry for the issue. But thanks for reporting the bug!

I plan to release version 0.5.0 of the bpmn-driven-testing extension in the next days (probably mid of next week), the bugfix will be included then.

@gclaussn
Copy link
Collaborator

gclaussn commented May 1, 2022

fyi: the bugfix has been merged to master - if you still want to try it out.

@NeoBlackHy
Copy link
Author

Just tested it on the bug fix branch and it works perfectly fine. Thank you for the fast reply and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants