Skip to content

Commit

Permalink
fix(generator): disable feel for result variable (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
chillleader authored Sep 8, 2023
1 parent 63dff74 commit 83d3ef4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class CommonProperties {
.id("resultVariable")
.group("output")
.label("Result Variable")
.description("Name of variable to store the response in");
.description("Name of variable to store the response in")
.feel(FeelMode.disabled);

public static final PropertyBuilder ERROR_EXPRESSION =
TextProperty.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,33 @@ void elementTemplateAnnotation_providesCorrectDefaultValues() {
assertThat(template.documentationRef()).isNull();
assertThat(template.description()).isNull();
}

@Test
void resultVariableProperty() {
var template = generator.generate(MyConnectorFunction.MinimallyAnnotated.class);
var property = getPropertyByLabel("Result Variable", template);
assertThat(property.getType()).isEqualTo("String");
assertThat(property.getBinding().type()).isEqualTo("zeebe:taskHeader");
assertThat(property.getFeel()).isNull();
}

@Test
void resultExpressionProperty() {
var template = generator.generate(MyConnectorFunction.MinimallyAnnotated.class);
var property = getPropertyByLabel("Result Expression", template);
assertThat(property.getType()).isEqualTo("Text");
assertThat(property.getBinding().type()).isEqualTo("zeebe:taskHeader");
assertThat(property.getFeel()).isEqualTo(FeelMode.required);
}

@Test
void errorExpressionProperty() {
var template = generator.generate(MyConnectorFunction.MinimallyAnnotated.class);
var property = getPropertyByLabel("Error Expression", template);
assertThat(property.getType()).isEqualTo("Text");
assertThat(property.getBinding().type()).isEqualTo("zeebe:taskHeader");
assertThat(property.getFeel()).isEqualTo(FeelMode.required);
}
}

@Nested
Expand Down

0 comments on commit 83d3ef4

Please sign in to comment.