I've been wondering about how partial functions can be used in Appian.
One thing that I was looking at was sticking a bunch of them together to define validation functions by passing them as arguments like this:
rules: rule!BLAKEJ3_Validation_SentenceMustStartWithCapital(_), input: _
This seems like it can be very readable and it breaks testing down into smaller bits that can have defined test cases in expression rules. It means that new validation rules can be assembled from shared modular rule components. However I'm also wondering if its over engineering for the vast majority of cases and if most validation is such simple functions that those aren't really relevant benefits.
I'm curious for more opinions about this as well as hearing how other people have used a very uncommon Appian function.
E: This crashes every time I try and add a tag
Just looking at your rule above, I'm not sure partial evaluation is necessary. Instead, you can just plug in your input directly into the validations like this:
Partial evaluation was used more frequently with some legacy functions like apply(), but now it's almost never used. The only times I have used it recently is for things like searching within a picker: https://docs.appian.com/suite/help/latest/recipe-configure-an-array-picker.html
What kind of monster tries to make me write local!value so many times?
Yes I could do that, however it is more boring. And I'm doing this to explore what I can do rather than what I'd normally do.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.