Skip to content

Setting default evaluation value for a rule variable #52

@vikasverma93

Description

@vikasverma93

Right now we define rules like this. for this variable_1 should be there is in class variables or else at the time of evaluation it throws an error.

"rules": {
    	"conditions": { 
    		"all": [
    			{
    				"name": "variable_1",
    				"operator": "is_true",
    				"value": true
    			}
    		]
    	},
        "actions": [
    		{
    			"name": "action_1",
    			"params": {
    			}
    		}
    	]
}

My requirement is that is variable_1 is not there in class variables, either it should be ignored for evaluation or I should be able to pass a default value at the time of rules generation.

"rules": {
    	"conditions": { 
    		"all": [
    			{
    				"name": "variable_1",
    				"operator": "is_true",
    				"value": true,
                                "default": true
    			}
    		]
    	},
        "actions": [
    		{
    			"name": "action_1",
    			"params": {
    			}
    		}
    	]
}

Can some help me with this, how can I achieve this.

Thanks in advance

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