Skip to content

Commit

Permalink
[incubator-kie-issues#1209] Implemented scesim rules examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele-Cardosi committed May 16, 2024
1 parent 19022fb commit e3bb954
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

A simple rule service to validate `Hello` fact.
A simple rule service to validate `Hello` fact and testing it using Scenario Simulation.

An injectable KieRuntimeBuilder is generated, so you can create Drools v7 KieBase and KieSession out of it.

Expand Down Expand Up @@ -107,3 +107,11 @@ Example response:
```json
{"greeting":"bar","approved":false}
```
# SCESIM usage

Scesim+rules project created inside Business central should work, with the following requirements:
1. use the pom as defined in the current project

## Caveat
Requires org.drools:drools-xml-support dependency
For the moment being, "globals" are unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

A simple rule service to validate `Hello` fact.
A simple rule service to validate `Hello` fact and testing it using Scenario Simulation.

An injectable KieRuntimeBuilder is generated, so you can create Drools v7 KieBase and KieSession out of it.

Expand Down Expand Up @@ -78,3 +78,12 @@ Example response:
```json
{"greeting":"bar","approved":false}
```
# SCESIM usage

Scesim+rules project created inside Business central should work, with the following requirements:
1. use the pom as defined in the current project
2. set the `kogito.sources.keep` variable to true

## Caveat
Requires org.drools:drools-xml-support dependency
For the moment being, "globals" are unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<properties>
<version.org.kie.kogito>999-SNAPSHOT</version.org.kie.kogito>
<kogito.bom.version>999-SNAPSHOT</kogito.bom.version>
<kogito.sources.keep>true</kogito.sources.keep>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package org.kie.kogito.legacy;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.server.LocalServerPort;
Expand Down Expand Up @@ -55,7 +54,6 @@ public void setUp() {
"}";

@Test
@Disabled // temporary
public void testApproved() {
given()
.body(JSON_APPROVED_PAYLOAD)
Expand All @@ -68,7 +66,6 @@ public void testApproved() {
}

@Test
@Disabled // temporary
public void testDenied() {
given()
.body(JSON_DENIED_PAYLOAD)
Expand Down

0 comments on commit e3bb954

Please sign in to comment.