Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
devjain47 opened this issue Feb 20, 2023 · 1 comment
Open

Comments

@devjain47
Copy link

No description provided.

@mathrep
Copy link

mathrep commented Aug 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants