Skip to content

Commit

Permalink
Merge pull request #88 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 Dec 17, 2024
2 parents 744cd48 + 6a3c526 commit 00448d1
Show file tree
Hide file tree
Showing 12 changed files with 841 additions and 788 deletions.
7 changes: 6 additions & 1 deletion addons/common/persistence/postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ongres.scram</groupId>
<artifactId>client</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -142,4 +147,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
# under the License.
#

org.jbpm.weaver.BPMN2WeaverService
org.jbpm.weaver.DRFWeaverService
org.jbpm.weaver.BPMN2WeaverService
36 changes: 23 additions & 13 deletions jbpm/jbpm-tests/src/test/java/org/jbpm/bpmn2/ActivityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
import org.jbpm.bpmn2.subprocess.CallActivityWithBoundaryEventProcess;
import org.jbpm.bpmn2.subprocess.CallActivityWithIOexpressionModel;
import org.jbpm.bpmn2.subprocess.CallActivityWithIOexpressionProcess;
import org.jbpm.bpmn2.subprocess.ErrorsBetweenProcessModel;
import org.jbpm.bpmn2.subprocess.ErrorsBetweenProcessProcess;
import org.jbpm.bpmn2.subprocess.ErrorsBetweenSubProcessProcess;
import org.jbpm.bpmn2.subprocess.InputMappingUsingValueModel;
import org.jbpm.bpmn2.subprocess.InputMappingUsingValueProcess;
import org.jbpm.bpmn2.subprocess.MainGroupAssignmentModel;
Expand Down Expand Up @@ -176,6 +179,7 @@
import org.kie.api.definition.process.NodeContainer;
import org.kie.api.definition.process.Process;
import org.kie.api.definition.process.WorkflowElementIdentifier;
import org.kie.api.event.process.ProcessCompletedEvent;
import org.kie.api.event.process.ProcessNodeEvent;
import org.kie.api.event.process.ProcessNodeTriggeredEvent;
import org.kie.api.event.process.ProcessStartedEvent;
Expand Down Expand Up @@ -1497,20 +1501,26 @@ public void testServiceTaskWithMvelJaxbTransformation() throws Exception {
}

@Test
public void testErrorBetweenProcessesProcess() throws Exception {
kruntime = createKogitoProcessRuntime("org/jbpm/bpmn2/subprocess/BPMN2-ErrorsBetweenProcess.bpmn2",
"org/jbpm/bpmn2/subprocess/BPMN2-ErrorsBetweenSubProcess.bpmn2");

Map<String, Object> variables = new HashMap<>();

variables.put("tipoEvento", "error");
variables.put("pasoVariable", 3);
KogitoProcessInstance processInstance = kruntime.startProcess("ErrorsBetweenProcess", variables);

assertProcessInstanceCompleted(processInstance.getStringId(), kruntime);
assertProcessInstanceAborted(processInstance.getStringId() + 1, kruntime);
public void testErrorBetweenProcessesProcess() {
Application app = ProcessTestHelper.newApplication();
ProcessTestHelper.registerProcessEventListener(app, new DefaultKogitoProcessEventListener() {
@Override
public void afterProcessCompleted(ProcessCompletedEvent event) {
if ("ErrorsBetweenSubProcess".equals(event.getProcessInstance().getProcessId())) {
assertThat(event.getProcessInstance().getState()).isEqualTo(ProcessInstance.STATE_ABORTED);
}
}
});
ErrorsBetweenSubProcessProcess.newProcess(app);
org.kie.kogito.process.Process<ErrorsBetweenProcessModel> process = ErrorsBetweenProcessProcess.newProcess(app);
ErrorsBetweenProcessModel model = process.createModel();
model.setTipoEvento("error");
model.setPasoVariable(3);
ProcessInstance<ErrorsBetweenProcessModel> processInstance = process.createInstance(model);
processInstance.start();
assertThat(processInstance.status()).isEqualTo(ProcessInstance.STATE_COMPLETED);

assertProcessVarValue(processInstance, "event", "error desde Subproceso");
assertThat(processInstance.variables().getEvent()).isEqualTo("error desde Subproceso");
}

@Test
Expand Down
Loading

0 comments on commit 00448d1

Please sign in to comment.