Rule not getting triggered

(Hnanchahal) #1

I have criteria defined for a rule invocation as:

        type: "endswith"
        #This has to match either enablestorestate or disablestorestate
        pattern: "storestate"
        type: "regex"
        #This has to match a numeric string
        pattern: "^[0-9]$"

I am trying to invoke the webhook with the payload:

“desiredstorestate”: “enablestorestate”,
“storenumber”: “123456”

when i used just the first criteria, everything worked as expected but as soon as i introduced the pattern, it does not triggers the workflow. Any ways to looks into the possible failure reason. Not able to see anything in the history.

(Lindsay Hill) #2

There’s a few ways to troubleshoot this:

1/ The triggers tab in the web UI is useful for looking at trigger instances, and seeing if they matched anything.

2/ Docs here on troubleshooting why a rule didn’t match

3/ Blog post on rules troubleshooting

But in this case I’d probably use to help with figuring out the correct regex. Your regex looks wrong if you want to match a number like 123456. Your regex will only match [0-9] and nothing else. That is, 1 and exactly 1 digit. Not multiple digits.

1 Like