rules
rules copied to clipboard
Can someone please tell me how to handle null values in durable rules.
In Python we got None and following worked. `from durable.lang import *
with ruleset('handle_nulls'):
@when_all(m.amount != None)
def check_amount(c):
print(f"Processing amount: {c.m.amount}")
@when_all(m.amount == None)
def handle_null(c):
print("Mmessage with None amount.")
post('handle_nulls', { 'amount': None }) post('handle_nulls', { 'amount': 100 })`