@@ -3,7 +3,6 @@ package bpmn_engine
33import (
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
171172func Test_inclusive_gateway_with_expressions_selects_one_and_not_the_other (t * testing.T ) {
0 commit comments