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

Serverless workflow with custom events does not work in Kogito 10.0.0 #3820

Open
shootsoft opened this issue Dec 30, 2024 · 0 comments
Open

Comments

@shootsoft
Copy link
Contributor

Describe the bug

In Kogito's 1.44.0.Final, I have some custom events defined in workflow

events:
- name: myCallbackEvent
  source: ""
  type: myCallbackEvent
...
states:
- name: OnCallbackEvent
  type: event
  onEvents:
  - eventRefs:
    - myCallbackEvent
    actions:
    - functionRef:
        ...
  transition: checkMyCallbackEvent

These events are not start form the "start" point, but triggered through java code

var app = new StaticWorkflowApplication();
var process = app.process(workflow);
var model = new JsonNodeModel(...);
var instance = process.createInstance(model);
instance.start();
instance.send(Sig.of(channel, eventData));

Now, when I tried to upgarde to Kogito 10.0.0, my application started to fail at this line

var process = app.process(workflow);

With error

java.lang.IllegalStateException: Process could not be validated ![Process 'MyWorkflow' [MyWorkflow]: Node 'OnCallbackEvent' [58] Embedded subprocess does not have incoming connection....

	at org.jbpm.ruleflow.core.RuleFlowProcessFactory.validate(RuleFlowProcessFactory.java:244)
	at org.kie.kogito.serverless.workflow.parser.ServerlessWorkflowParser.parseProcess(ServerlessWorkflowParser.java:173)
	at org.kie.kogito.serverless.workflow.parser.ServerlessWorkflowParser.getProcessInfo(ServerlessWorkflowParser.java:184)
	at org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication.createProcess(StaticWorkflowApplication.java:330)
	at org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication.process(StaticWorkflowApplication.java:283)

How can I skip this validation with embedded mode in Kogito 10.0.0?

Expected behavior

No failures with Kogito 10.0.0 because they work well in 1.44.0

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

17

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

10.0.0

Build tool (ie. output of mvnw --version or gradlew --version)

maven

Additional information

No response

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