rules icon indicating copy to clipboard operation
rules copied to clipboard

Can someone please tell me how to handle null values in durable rules.

Open devjain47 opened this issue 2 years ago • 1 comments

devjain47 avatar Feb 20 '23 11:02 devjain47

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 })`

mathrep avatar Aug 07 '24 01:08 mathrep