Skip to content

Commit

Permalink
Signal event is supported from 8.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlukas committed Feb 6, 2023
1 parent 626d79f commit 3377804
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static boolean canBeInternalScript(DomElementVisitorContext context) {
&& scriptFormat.trim().length() > 0
&& scriptFormat.equalsIgnoreCase("feel")
&& SemanticVersion._8_2_0.ordinal()
>= SemanticVersion.parse(context.getProperties().getPlatformVersion()).ordinal();
<= SemanticVersion.parse(context.getProperties().getPlatformVersion()).ordinal();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public String localName() {

@Override
protected SemanticVersion availableFrom(DomElementVisitorContext context) {
return null;
return SemanticVersion._8_2_0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ protected Convertible createConvertible(DomElementVisitorContext context) {

@Override
protected SemanticVersion availableFrom(DomElementVisitorContext context) {
return null;
return SemanticVersion._8_2_0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ zeebe-header.resource=resource
## Script format
zeebe-header.script-format=scriptFormat
# Zeebe Meta Information
zeebe-platform.version=8.1.0
zeebe-platform.version=8.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void testConditionalFlow() {
}

@Test
void testInternalScript() {
void testInternalScript_8_2() {
BpmnDiagramCheckResult result = loadAndCheckAgainstVersion("internal-script.bpmn", "8.2.0");
assertThat(result)
.isNotNull()
Expand All @@ -238,6 +238,28 @@ void testInternalScript() {
.isEqualTo("Script is transformed to Zeebe script.");
}

@Test
void testInternalScript_8_1() {
BpmnDiagramCheckResult result = loadAndCheckAgainstVersion("internal-script.bpmn", "8.1.0");
assertThat(result)
.isNotNull()
.extracting(r -> r.getResult("FeelScriptTask"))
.isNotNull()
.extracting(BpmnElementCheckResult::getMessages)
.asList()
.hasSize(4);
assertThat(result.getResult("FeelScriptTask").getMessages().get(0).getMessage())
.isEqualTo("Script format 'feel' was set to header 'scriptFormat'. Please review.");
assertThat(result.getResult("FeelScriptTask").getMessages().get(1).getMessage())
.isEqualTo(
"Element 'scriptTask' was transformed. Currently, script tasks are implemented like service tasks with job type 'script'. Please review your implementation.");
assertThat(result.getResult("FeelScriptTask").getMessages().get(2).getMessage())
.isEqualTo(
"Attribute 'resultVariable' on 'scriptTask' was mapped. Is now available as header 'resultVariable'.");
assertThat(result.getResult("FeelScriptTask").getMessages().get(3).getMessage())
.isEqualTo("Script was set to header 'script'. Please review.");
}

protected BpmnDiagramCheckResult loadAndCheck(String bpmnFile) {
ConverterProperties properties = ConverterPropertiesFactory.getInstance().get();
return loadAndCheckAgainstVersion(bpmnFile, properties.getPlatformVersion());
Expand Down

0 comments on commit 3377804

Please sign in to comment.