Skip to content

Fail After 1.17.0 #787

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
fadisamara opened this issue May 8, 2025 · 0 comments
Open

Fail After 1.17.0 #787

fadisamara opened this issue May 8, 2025 · 0 comments

Comments

@fadisamara
Copy link

fadisamara commented May 8, 2025

After upgrading from 1.16.9 to 1.17.2 this is not working any more:

...{
"name": "Validated",
"description": "No change for this state",
"condition": "wfr.Builder.Validated",
"steps": [...

with this error:

.../go/src/workflow/expr.go:13: type builder.Builder has no field Validated (1:13)
| wfr.Builder.Validated
| ............^

type Builder struct {
Builder builder.Builder
}

type Builder interface {
DB() string
}

type Invoice struct {
ID int64 db:"id" json:",string"
Serial int64 db:"serial"
Date time.Time db:"date"
Validated bool db:"validated"

func (*Invoice) DB() string {
return "his_invoice"
}

if I change to {
"name": "Validated",
"description": "No change for this state",
"condition": "wfr.Builder",
"steps": [.....

I got:
panic: interface conversion: interface {} is *invoice.Invoice, not bool

the
type Builder struct {
Builder builder.Builder
}
is implementing the wfr interface

env := map[string]any{
"wfr": wfr,
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant