Skip to content

Commit

Permalink
Merge pull request #53 from rgdoliveira/sync_main
Browse files Browse the repository at this point in the history
Sync main branch with Apache main branch
  • Loading branch information
rgdoliveira authored Aug 7, 2024
2 parents dfd1f46 + 0c3ffde commit c93524b
Show file tree
Hide file tree
Showing 244 changed files with 5,308 additions and 3,970 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ modified, such other license.

## Issues

Kogito uses [JIRA to manage and report issues](https://issues.redhat.com/projects/KOGITO/).
Kogito uses [Issues](https://github.com/apache/incubator-kie-kogito-runtimes/issues).

If you believe you found a bug, please indicate a way to reproduce it, what you are seeing and what you would expect to see. Don't forget to indicate your Kogito, Java, Maven, Quarkus/Spring, GraalVM version.

Expand All @@ -50,18 +50,18 @@ If you are interested in having more details, refer to the [Build section](#buil

To contribute, use GitHub Pull Requests, from your **own** fork.

- PRs should be always related to an open JIRA issue. If there is none, you should create one.
- PRs should be always related to an open an [issue](https://github.com/apache/incubator-kie-kogito-runtimes/issues). If there is none, you should [create one](https://github.com/apache/incubator-kie-kogito-runtimes/issues/new) by describing what problem you see that we need to fix.
- Try to fix only one issue per PR.
- Make sure to create a new branch. Usually branches are named after the JIRA ticket they are addressing. E.g. for ticket "KOGITO-XYZ An example issue" your branch should be at least prefixed with `KOGITO-XYZ`. E.g.:
- Make sure to create a new branch. Usually branches are named after the github issue they are addressing. E.g. for ticket "Fix_#issue An example issue". E.g.:

git checkout -b KOGITO-XYZ
git checkout -b Fix_#XYZ
# or
git checkout -b KOGITO-XYZ-my-fix
git checkout -b Fix_#XYZ-my-fix

- When you submit your PR, make sure to include the ticket ID, and its title; e.g., "KOGITO-XYZ An example issue".
- The description of your PR should describe the code you wrote. The issue that is solved should be at least described properly in the corresponding JIRA ticket.
- When you submit your PR, make sure to include the ticket ID, and its title; e.g., "Fix_#XYZ An example issue".
- The description of your PR should describe the code you wrote. The issue that is solved should be at least described properly in the corresponding github issue.
- If your contribution spans across multiple repositories,
use the same branch name (e.g. `KOGITO-XYZ`) in each PR so that our CI (Jenkins) can build them all at once.
use the same branch name (e.g. `Fix_#XYZ`) in each PR so that our CI (Jenkins) can build them all at once.
- If your contribution spans across multiple repositories, make sure to list all the related PRs.

### Java Coding Guidelines
Expand Down
13 changes: 5 additions & 8 deletions addons/common/human-task-prediction/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>


Expand All @@ -80,21 +81,17 @@
<artifactId>drools-wiring-dynamic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependency>
</dependencies>

</project>
8 changes: 2 additions & 6 deletions addons/common/human-task-prediction/smile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,15 @@
<artifactId>drools-wiring-dynamic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
13 changes: 4 additions & 9 deletions addons/common/persistence/filesystem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>


<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -85,19 +84,15 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
27 changes: 11 additions & 16 deletions addons/common/persistence/infinispan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,22 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
</dependency>

<!--~~(No version provided)~~>--><dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
</dependency>

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand All @@ -84,11 +89,6 @@
<artifactId>kogito-drools</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-test-utils</artifactId>
Expand All @@ -99,11 +99,6 @@
<artifactId>mvel2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
26 changes: 10 additions & 16 deletions addons/common/persistence/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,21 @@
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-api</artifactId>
</dependency>

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
<version>${version.io.quarkus}</version>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -73,16 +77,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion addons/common/persistence/mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
Expand Down
24 changes: 10 additions & 14 deletions addons/common/persistence/postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,24 @@
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-api</artifactId>
</dependency>

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>
<!-- PostgreSQL -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-pg-client</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>

<!-- test dependencies -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
Expand Down Expand Up @@ -81,16 +87,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
8 changes: 5 additions & 3 deletions addons/common/persistence/rocksdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>process-serialization-protobuf</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.rocksdb</groupId>
Expand All @@ -67,9 +68,10 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<artifactId>jbpm-deps-group-bpmn2-compiler</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
3 changes: 2 additions & 1 deletion addons/common/process-management/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>

<!-- test dependencies -->
Expand Down
3 changes: 2 additions & 1 deletion addons/common/task-management/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jbpm-flow</artifactId>
<artifactId>jbpm-deps-group-engine</artifactId>
<type>pom</type>
</dependency>

<!-- test dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public interface HumanTaskService {
ExtendedDataContext get(LocalId id, MetaDataContext meta);

ExtendedDataContext create(LocalId taskId);
ExtendedDataContext create(LocalId taskId, DataContext dataContext);

ExtendedDataContext abort(LocalId taskId, MetaDataContext meta);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <T extends Model> ProcessInstance<T> createProcessInstance(Process<T> process, S

<T extends Model> Optional<List<WorkItem>> getTasks(Process<T> process, String id, SecurityPolicy policy);

<T extends Model> Optional<WorkItem> signalTask(Process<T> process, String id, String taskNodeName);
<T extends Model> Optional<WorkItem> signalTask(Process<T> process, String id, String taskNodeName, SecurityPolicy policy);

<T extends Model, R extends MapOutput> Optional<R> saveTask(Process<T> process,
String id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,13 @@ protected ForEachNode decorateMultiInstanceSpecification(NodeImpl nodeTarget, Mu
}
}
// this is just an expression
forEachNode.setCompletionConditionExpression(multiInstanceSpecification.getCompletionCondition());
ReturnValueEvaluator evaluator = null;
String completionConditionLang = multiInstanceSpecification.getCompletionConditionLang();
if ((completionConditionLang == null || completionConditionLang.isBlank() || completionConditionLang.toLowerCase().contains("mvel"))
&& multiInstanceSpecification.getCompletionCondition() != null) {
evaluator = new MVELInterpretedReturnValueEvaluator(multiInstanceSpecification.getCompletionCondition());
}
forEachNode.setCompletionConditionExpression(evaluator);
forEachNode.setMultiInstanceSpecification(multiInstanceSpecification);

// This variable is used for adding items computed by each subcontext.
Expand Down Expand Up @@ -825,6 +831,7 @@ protected MultiInstanceSpecification readMultiInstanceSpecification(Parser parse
String completion = completeCondition.getTextContent();
if (completion != null && !completion.isEmpty()) {
multiInstanceSpecification.setCompletionCondition(completion);
multiInstanceSpecification.setCompletionConditionLang(completeCondition.getAttribute("language"));
}
});
return multiInstanceSpecification;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

import org.jbpm.bpmn2.core.SequenceFlow;
import org.jbpm.compiler.xml.Parser;
import org.jbpm.compiler.xml.ProcessBuildData;
import org.jbpm.process.core.context.variable.VariableScope;
import org.jbpm.ruleflow.core.RuleFlowProcess;
import org.jbpm.workflow.core.Node;
import org.jbpm.workflow.core.node.DynamicNode;
import org.w3c.dom.Element;
Expand Down Expand Up @@ -87,8 +89,9 @@ protected Node handleNode(final Node node, final Element element, final String u
}
xmlNode = xmlNode.getNextSibling();
}
RuleFlowProcess process = (RuleFlowProcess) ((ProcessBuildData) parser.getData()).getMetaData(ProcessHandler.CURRENT_PROCESS);
List<SequenceFlow> connections = (List<SequenceFlow>) dynamicNode.getMetaData(ProcessHandler.CONNECTIONS);
ProcessHandler.linkConnections(dynamicNode, connections);
ProcessHandler.linkConnections(process, dynamicNode, connections);
ProcessHandler.linkBoundaryEvents(dynamicNode);

handleScript(dynamicNode, element, "onEntry");
Expand Down
Loading

0 comments on commit c93524b

Please sign in to comment.