diff --git a/api/kogito-api/pom.xml b/api/kogito-api/pom.xml
index cec9ac55aab..abb006d4e5a 100755
--- a/api/kogito-api/pom.xml
+++ b/api/kogito-api/pom.xml
@@ -61,14 +61,13 @@
jakarta.xml.bindjakarta.xml.bind-apiprovided
- 4.0.1
- org.kie
- kie-api
+ org.kie.kogito
+ jbpm-flow-api
-
+
com.fasterxml.jackson.corejackson-annotations
diff --git a/jbpm/jbpm-bpmn2/pom.xml b/jbpm/jbpm-bpmn2/pom.xml
index a801e38ba57..fe7b5da76f9 100755
--- a/jbpm/jbpm-bpmn2/pom.xml
+++ b/jbpm/jbpm-bpmn2/pom.xml
@@ -77,7 +77,6 @@
jakarta.xml.bindjakarta.xml.bind-apiprovided
- 4.0.1com.sun.xml.bind
@@ -88,7 +87,6 @@
org.glassfish.jaxbjaxb-runtimeprovided
- 4.0.4org.eclipse.angus
diff --git a/jbpm/jbpm-flow-api/pom.xml b/jbpm/jbpm-flow-api/pom.xml
new file mode 100644
index 00000000000..43c6c3a053b
--- /dev/null
+++ b/jbpm/jbpm-flow-api/pom.xml
@@ -0,0 +1,41 @@
+
+
+ 4.0.0
+
+ jbpm
+ org.kie.kogito
+ 999-SNAPSHOT
+
+
+ jbpm-flow-api
+
+ Kogito :: jBPM :: API
+ jBPM Flow API
+
+
+ UTF-8
+ org.kie.kogito.jbpm.flow.api
+
+
+
+
+ org.kie
+ kie-api
+
+
+
+
+
+
+ org.kie.kogito
+ kogito-kie-bom
+ ${project.version}
+ pom
+ import
+
+
+
+
+
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Attachment.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Attachment.java
new file mode 100644
index 00000000000..ded0ce0df24
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Attachment.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+import java.net.URI;
+import java.util.Date;
+
+public interface Attachment {
+
+ String getAttachmentId();
+
+ String getAttachmentName();
+
+ URI getAttachmentURI();
+
+ String getUpdatedBy();
+
+ Date getUpdatedAt();
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Comment.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Comment.java
new file mode 100644
index 00000000000..c361bccdd5a
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/Comment.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+import java.util.Date;
+
+public interface Comment {
+
+ String getCommentId();
+
+ String getCommentContent();
+
+ String getUpdatedBy();
+
+ Date getUpdatedAt();
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java
new file mode 100644
index 00000000000..01d460e0ddb
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAssignmentEvent.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+public interface UserTaskAssignmentEvent extends UserTaskEvent {
+
+ String getAssignmentType();
+
+ String[] getNewUsersId();
+
+ String[] getOldUsersId();
+
+}
diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/KogitoProcessInstanceIdCommand.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
similarity index 82%
rename from jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/KogitoProcessInstanceIdCommand.java
rename to jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
index eca0dedd8cc..9f82c73605e 100644
--- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/KogitoProcessInstanceIdCommand.java
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskAttachmentEvent.java
@@ -16,11 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.jbpm.process.instance.command;
-public interface KogitoProcessInstanceIdCommand {
+package org.kie.api.event.usertask;
- void setProcessInstanceId(String procInstId);
+public interface UserTaskAttachmentEvent extends UserTaskEvent {
+
+ Attachment getOldAttachment();
+
+ Attachment getNewAttachment();
- String getProcessInstanceId();
}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java
new file mode 100644
index 00000000000..cae307a17f1
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskCommentEvent.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+public interface UserTaskCommentEvent extends UserTaskEvent {
+
+ Comment getOldComment();
+
+ Comment getNewComment();
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java
new file mode 100644
index 00000000000..c1c46b7a1d0
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskDeadlineEvent.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+import java.util.Map;
+
+import org.kie.api.runtime.process.WorkItem;
+
+/**
+ * An event when a dealine for task has expired
+ */
+public interface UserTaskDeadlineEvent extends UserTaskEvent {
+
+ enum DeadlineType {
+ Started,
+ Completed
+ }
+
+ /**
+ * Returns work item which timeout expires
+ *
+ * @return work item
+ */
+ WorkItem getWorkItem();
+
+ /**
+ * Returns notification data
+ *
+ * @return key-value pair list
+ */
+ Map getNotification();
+
+ /**
+ * Returns dealine type
+ *
+ * @return not started or not completed
+ */
+ DeadlineType getType();
+}
\ No newline at end of file
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java
new file mode 100644
index 00000000000..3c8a8dcacb2
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskEvent.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+import java.util.Date;
+
+import org.kie.api.event.KieRuntimeEvent;
+import org.kie.api.runtime.process.NodeInstance;
+import org.kie.api.runtime.process.ProcessInstance;
+import org.kie.api.runtime.process.WorkItem;
+
+/**
+ * A runtime event related to the execution of process instances.
+ */
+public interface UserTaskEvent
+ extends
+ KieRuntimeEvent {
+
+ /**
+ * The ProcessInstance this event relates to.
+ *
+ * @return the process instance
+ */
+ ProcessInstance getProcessInstance();
+
+ NodeInstance getNodeInstance();
+
+ WorkItem getWorkItem();
+
+ String getUserTaskId();
+
+ String getUserTaskDefinitionId();
+
+ /**
+ * Returns exact date when the event was created
+ *
+ * @return time when event was created
+ */
+ Date getEventDate();
+
+ /**
+ * @return associated identity that performed the event
+ */
+ String getEventUser();
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java
new file mode 100644
index 00000000000..b87d76b6583
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskStateEvent.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.kie.api.event.usertask;
+
+public interface UserTaskStateEvent extends UserTaskEvent {
+
+ String getNewStatus();
+
+ String getOldStatus();
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java
new file mode 100644
index 00000000000..06ed3f67bbc
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/event/usertask/UserTaskVariableEvent.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.event.usertask;
+
+public interface UserTaskVariableEvent extends UserTaskEvent {
+
+ enum VariableEventType {
+ INPUT,
+ OUTPUT
+ }
+
+ String getVariableName();
+
+ Object getOldValue();
+
+ Object getNewValue();
+
+ VariableEventType getVariableType();
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/ActionNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/ActionNodeBuilder.java
new file mode 100644
index 00000000000..f233f1fe51c
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/ActionNodeBuilder.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface ActionNodeBuilder> extends NodeBuilder, T> {
+
+ ActionNodeBuilder action(Dialect dialect, String code);
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/BoundaryEventNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/BoundaryEventNodeBuilder.java
new file mode 100644
index 00000000000..3ff3f2fbbb2
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/BoundaryEventNodeBuilder.java
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface BoundaryEventNodeBuilder> extends EventNodeOperations, T>, NodeBuilder, T> {
+
+ BoundaryEventNodeBuilder attachedTo(long attachedToId);
+
+ BoundaryEventNodeBuilder eventType(String prefix, String Suffix);
+
+ BoundaryEventNodeBuilder timeCycle(String timeCycle);
+
+ BoundaryEventNodeBuilder timeCycle(String timeCycle, Dialect dialect);
+
+ BoundaryEventNodeBuilder timeDuration(String timeDuration);
+
+ BoundaryEventNodeBuilder cancelActivity(boolean cancelActivity);
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeBuilder.java
new file mode 100644
index 00000000000..71ac1db37d6
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeBuilder.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface CompositeNodeBuilder> extends NodeContainerBuilder, T>, CompositeNodeOperations, T> {
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeOperations.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeOperations.java
new file mode 100644
index 00000000000..40ab9a38380
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/CompositeNodeOperations.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface CompositeNodeOperations, P extends NodeContainerBuilder
> {
+
+ T linkIncomingConnections(long nodeId);
+
+ T linkOutgoingConnections(long nodeId);
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/Dialect.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/Dialect.java
new file mode 100644
index 00000000000..558c66f1871
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/Dialect.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+/**
+ * Supported programming languages for action scripts
+ */
+public enum Dialect {
+ JAVA,
+ JAVASCRIPT,
+ XPATH,
+ MVEL,
+ FEEL
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/DynamicNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/DynamicNodeBuilder.java
new file mode 100644
index 00000000000..1e9716e6d18
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/DynamicNodeBuilder.java
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface DynamicNodeBuilder> extends NodeContainerBuilder, T>, CompositeNodeOperations, T> {
+
+ DynamicNodeBuilder autoComplete(boolean autoComplete);
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EndNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EndNodeBuilder.java
new file mode 100644
index 00000000000..afddc8ba39c
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EndNodeBuilder.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface EndNodeBuilder> extends NodeBuilder, T> {
+
+ EndNodeBuilder terminate(boolean terminate);
+
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeBuilder.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeBuilder.java
new file mode 100644
index 00000000000..3e4baebdb96
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeBuilder.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+public interface EventNodeBuilder> extends NodeBuilder, T>, EventNodeOperations, T> {
+}
diff --git a/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeOperations.java b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeOperations.java
new file mode 100644
index 00000000000..2b074816ce5
--- /dev/null
+++ b/jbpm/jbpm-flow-api/src/main/java/org/kie/api/fluent/EventNodeOperations.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.api.fluent;
+
+import java.util.function.UnaryOperator;
+
+interface EventNodeOperations, P extends NodeContainerBuilder
> {
+
+ T eventType(String eventType);
+
+ T eventTransformer(UnaryOperator
+
+ org.kie.kogito
+ kogito-bom
+ ${project.version}
+ pom
+ import
+
+
+ org.kie.kogito
+ jbpm-flow-api
+ org.kie.kogitokogito-api
diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/GetProcessInstanceVariableCommand.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/GetProcessInstanceVariableCommand.java
deleted file mode 100755
index 9db510c92f9..00000000000
--- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/command/GetProcessInstanceVariableCommand.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jbpm.process.instance.command;
-
-import org.kie.api.command.ExecutableCommand;
-import org.kie.api.runtime.Context;
-import org.kie.api.runtime.KieSession;
-import org.kie.internal.command.RegistryContext;
-import org.kie.kogito.internal.process.runtime.KogitoProcessInstance;
-import org.kie.kogito.internal.process.runtime.KogitoProcessRuntime;
-import org.kie.kogito.internal.process.runtime.KogitoWorkflowProcessInstance;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlAttribute;
-import jakarta.xml.bind.annotation.XmlSchemaType;
-
-@XmlAccessorType(XmlAccessType.NONE)
-public class GetProcessInstanceVariableCommand implements ExecutableCommand
+
+ org.kie.kogito
+ jbpm-flow-api
+ ${project.version}
+ org.kie.kogitojbpm-flow-migration