0

Good day! I'm trying to start the next Drools Business Process via REST

My Business Process

This process has the following process variable (named contractObject), which is populated at the beginning of the flow and used to validate with the decision table

contractObject variable

I'm sending the next body in the Drools Request

{   
    "lookup": "ksession1",
    "commands": [
    { "start-process": {
                "processId":"decision-tree-test.businessProcessTest", 
                "out-identifier": "firedProcesses",
                "data": [
                            {  
                                "contractObject": {
                                    "com.myspace.decision_tree_test.Contract":{
                                        "contractType": "P",
                                        "service": 2000,
                                        "serviceType": 3000,
                                        "promotion": 3470
                                    }
                                }
                            }
                        ] 
            }
    }]
}

But i keep getting the next error

{
  "type" : "FAILURE",
  "msg" : "Error calling container decision-tree-test: [decision-tree-test.businessProcessTest:11 - Decision Table:5] -- [decision-tree-test.businessProcessTest:11 - ?:4] -- Exception when trying to evaluate constraint  in split null",
  "result" : null
}

So I guess I'm not sending the data well as it doesn't seem to be taking it. In the documentation they do not specify a specific format to send data for process variables, this is what I have found for the start-process command:

start-process documentation

start-process documentation JSON request body

What could I be doing wrong?

Links to the documentation i've consulted:

  1. https://access.redhat.com/documentation/en-us/red_hat_process_automation_manager/7.1/html-single/interacting_with_red_hat_process_automation_manager_using_kie_apis/index#runtime-commands-con_kie-apis
  2. https://docs.jboss.org/drools/release/5.3.0.Final/droolsjbpm-integration-docs/html/ch04.html#d0e1028

Picture of the Decision Table Data I / O Picture of the Decision Table Data I / O

  • the error says you have a null in your evaluation ... i do drools, not jbpm, but that error message sounds like it's unable to evaluate the split (the orange diamond in your diagram). so the issue is likely with the output from the decision table. Your inputs are fine. – Roddy of the Frozen Peas Nov 30 '21 at 15:45
  • It seems you are unable to get process variable in XOR expression, that indicates the variable is not set. How did you set it? You have declared a process variable contractObject on the process level which is a defined Data object. Did you map that input to the business rule task so when you fill the forms for the task the process variable should get updated. Please share the screenshot of business rule task Data I/O. – Amit Nijhawan Nov 30 '21 at 15:59
  • @AmitNijhawan That's what i'm trying to do, i'm trying to set the process variable contractObject from the body of the request, but i guess i'm doing it wrong because apparently the variable is null when the process starts. I attached a photo of the Decision Table Data I / O – Vanessa Nadal Nov 30 '21 at 16:39

0 Answers0