-
Notifications
You must be signed in to change notification settings - Fork 205
flow-to-all and short-circuit flow conditions can't be used at the same time #574
Comments
@dignati I think you can evade this problem by adding Does that make sense? Happy to keep kicking this one around. |
I don't think that works. That would allow all segments to flow to the error task when I only want segments that threw an exception or are matched by a custom predicate. |
When trying the following flow conditions:
I can start the job but the first segments throws:
It seems that |
Okay, this definitely requires a code change. Thanks for checking that out. I'll keep you posted on this one! |
It turns out that none of my examples made sense for my use case. All of them implied that every segment would always flow to the error-task when I only wanted ones that threw a exception or didn't match a predicate. I'm not sure if there is some other legitimate use case that would require a code change.
(defn only-relevant-branches [flow-conditions workflow task]
(filter #(or (= (:flow/from %) task)
(and (= (:flow/from %) :all)
(or (= (:flow/to %) :all)
(subset? (into #{} (:flow/to %))
(into #{} (egress-tasks workflow task))))))
flow-conditions)) but i"m not sure. |
Okay. I'll have to look at it closer, if you want to open a PR with that change I can look it over and bring it in. |
Fixed in #617 |
This:
throws
ExceptionInfo :flow/short-circuit entries must proceed all entries that aren't :flow/short-circuit clojure.core/ex-info (core.clj:4617)
and this:
throws
ExceptionInfo :flow/to mapped to :all value must appear first flow ordering clojure.core/ex-info (core.clj:4617)
The text was updated successfully, but these errors were encountered: