Skip to content

Commit bf154b2

Browse files
committed
use latest FEEL lib
1 parent 1d12c10 commit bf154b2

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/bwmarrin/snowflake v0.3.0
77
github.com/corbym/gocrest v1.0.5
88
github.com/hazelcast/hazelcast-go-client v1.4.2
9-
github.com/pbinitiative/feel v0.1.3
9+
github.com/pbinitiative/feel v0.1.5
1010
github.com/senseyeio/duration v0.0.0-20180430131211-7c2a214ada46
1111
google.golang.org/protobuf v1.36.6
1212
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ
1919
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
2020
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
2121
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
22-
github.com/pbinitiative/feel v0.1.3 h1:FjG2HdKzq8CBZQNdvD/REFoFaRp4sccKjnWmf8sxfgQ=
23-
github.com/pbinitiative/feel v0.1.3/go.mod h1:WKzWgOhVnU23Fr04W1iJjcyJOjisYP11gFXXS9r0RMo=
22+
github.com/pbinitiative/feel v0.1.5 h1:MftRaNUHu57zGKU4QDVzzy9y933zG1kkKDpPb/2FiTc=
23+
github.com/pbinitiative/feel v0.1.5/go.mod h1:WKzWgOhVnU23Fr04W1iJjcyJOjisYP11gFXXS9r0RMo=
2424
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2525
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2626
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=

pkg/bpmn_engine/conditions_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package bpmn_engine
33
import (
44
"testing"
55

6-
"github.com/corbym/gocrest/has"
76
"github.com/corbym/gocrest/is"
87
"github.com/corbym/gocrest/then"
98
)
@@ -151,21 +150,23 @@ func Test_mathematical_expression_evaluates(t *testing.T) {
151150
then.AssertThat(t, result, is.True())
152151
}
153152

154-
func Test_evaluation_error_percolates_up(t *testing.T) {
153+
func Test_missing_variables_dont_create_error_but_eval_to_null(t *testing.T) {
155154
// setup
156155
bpmnEngine := New()
156+
cp := CallPath{}
157157

158158
// given
159159
process, _ := bpmnEngine.LoadFromFile("../../test-cases/exclusive-gateway-with-condition.bpmn")
160+
bpmnEngine.NewTaskHandler().Id("task-a").Handler(cp.TaskHandler)
161+
bpmnEngine.NewTaskHandler().Id("task-b").Handler(cp.TaskHandler)
160162

161163
// when
162164
// don't provide variables, for execution to get an evaluation error
163165
instance, err := bpmnEngine.CreateAndRunInstance(process.ProcessKey, nil)
164166

165167
// then
166-
then.AssertThat(t, instance.ActivityState, is.EqualTo(Failed))
167-
then.AssertThat(t, err, is.Not(is.Nil()))
168-
then.AssertThat(t, err.Error(), has.Prefix("Error evaluating expression in flow element id="))
168+
then.AssertThat(t, instance.ActivityState, is.EqualTo(Completed))
169+
then.AssertThat(t, err, is.Nil())
169170
}
170171

171172
func Test_inclusive_gateway_with_expressions_selects_one_and_not_the_other(t *testing.T) {

0 commit comments

Comments
 (0)