Skip to content

How to pass parameters into variables? #80

@chenyusheng

Description

@chenyusheng

hi, i got a problem in using busuness-rules.
i need to pass some parameters into variables so that the variables fun can query data from my database.
just like the actions can config some parm

@rule_action(params={"number_to_order": FIELD_NUMERIC})
 def order_more(self, number_to_order):
        ProductOrder.objects.create(product_id=self.product.id,quantity=number_to_order)

but it seems impossible to achieve.
what can i do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions