Drools - Send input data to business process (JBPM) via REST

488 views Asked by At

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

0

There are 0 answers