Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
15 replies
Subscribers
7 subscribers
Views
3196 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We'd like to handle exceptions based on two criteria, a deadline and a boole
Richard
over 10 years ago
We'd like to handle exceptions based on two criteria, a deadline and a boolean field. I've set up an expression based exception that looks like this: and(pv!TaskBundle.Result.Deadline<=now(),pv!EscalationsOn).
What I'm hoping to achieve is that when pv!TaskBundle.Result.Deadline (Date and Time) passes, and pv!EscalationsOn is true, we'll execute our exception, but it's not working.
I'm going to assume that I'm doing something really obviously stupid.
...
OriginalPostID-102460
OriginalPostID-102460
Discussion posts and replies are publicly visible
0
Patty Isecke
Appian Employee
over 10 years ago
When you say passes, are you checking if the deadline is greater than today?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 10 years ago
I've tried the comparison three ways, greater than, equal, less than. What I desire is to set a date and time, and have the exception fire when we reach that date and time. I'm not picky about seconds, but minutes count. I also would like the opportunity to turn that off under some circumstances, so I'd like to be able to use that Boolean in conjunction with the deadline. Does that make sense?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 10 years ago
I just tested your expression and(pv!Deadline<=now(),pv!EscalationsOn) and was able to get the exception to fire. Can you confirm that you're getting a value for pv!TaskBundle.Result.Deadline as it's a nested value?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 10 years ago
Hmmm, it's there as a value when I examine the CDT. Do you think we're dealing with a subtle type mismatch (xsd:datetime versus Appian: Date and Time)?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 10 years ago
It shouldn't be. I also just tested creating a CDT with the structure that you've defined above. For testing purposes, what's the result of the exception if your pv!TaskBundle.Result.Deadline is also defined as now()?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 10 years ago
Hmm, okay, that definitely means I"ve been dumb. I"ve been setting it for an hour ahead and waiting for it to fire. D'oh.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 10 years ago
Okay, I set it to now, upstream in the process and the exception fired right away. So what does that tell me?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 10 years ago
1) It lets us know that the exception does work and does fire 2) Based on your requirement to have the exception fire if the date has been reached and the flag is turned on, I think you'll want >= instead of less than, otherwise we'll be firing before now.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 10 years ago
Actually, please disregard my comment for number 2. It seems like i'm always firing.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Richard
over 10 years ago
That's what I thought, but that didn't work either.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>