Closed bocaguy closed 2 years ago
Found the fix (use "not")
Did not know the input validity list could be replaced by the variable itself (so it's in two contiguous columns) and then use a '-' in the last column so it cascades down to the unrecognized variable.
I believe this issue has been clarified.
I've done things with 'state' before. Check out AN-SNAP V4 grouper (DMN).xlsx https://github.com/russellmcdonell/DecisionCentral/blob/main/DMNexamples/AN-SNAP%20V4%20grouper%20(DMN).xlsx
So, in the Decision (list of Decision Tables to be run), I'd start with validateState - a simple table with one input (the state) and one output 'valid'
U state ||valid =|===========||==== 1|NY,PA,MS,CA||true 2| - ||false
Then, in Decision, all subsequent rows test 'valid' == 'true', and hence get skipped if the state is invalid. On return from decide(), check 'valid' before checking anything else.
Russell McDonell
On Mon, 22 Aug 2022 at 10:35, bocaguy @.***> wrote:
Is there a way to create a rule that basically equates to "is one of." If someone sends a file with an invalid (or missing) geographic state (as opposed sending to NY, PA, MS, CA) I can trap it without getting the error that the state does not match the input validity list? Thanks;
— Reply to this email directly, view it on GitHub https://github.com/russellmcdonell/pyDMNrules/issues/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECWZEQQ3XXYPVVPYOROBBLV2LDOFANCNFSM57F2IWHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Is there a way to create a rule that basically equates to "is one of." If someone sends a file with an invalid (or missing) geographic state (as opposed sending to NY, PA, MS, CA) I can trap it without getting the error that the state does not match the input validity list? Thanks;