When starting a process model from the web api, the process variable is []. Below I have attached the result for your reference.
Discussion posts and replies are publicly visible
HI,
1. Make sure the mappings are correct .
2. Check the API whether parameters have been passed or not.
3. Check the security for the service account.
Hi, thanks for your reply
I just created a web api with the default template start process and called the process model. Here we don't need to map any parameter.
Can you share the code in API.
Are you passing the body correctly that will match the Process parameters.
I think the data is not passed properly into the start process
If you do not pass a value for process variables in Web API, the process variable value will be set to null/default when the process is started by Web API.
In your case, table_count, and table_name are process variables, and you are not passing value for these parameters from Web API.
sure, here attached for your reference
Can you check the body you are passing into the API.
Hi, thanks for your reply.
Can you check the code attached. I am just starting a process model from web api and we will be getting the body result in json format. Like below
{ "pp": { "id": 536891228, "name": "EA QueryDB", "priority": 1, "initiator": { "id": "rithika14" }, "startTime": "2024-07-19T07:01:54.560Z", "timeZone": "GMT", "starred": false, "parentName": "", "execId": 2, "status": 0 }, "pm": { "id": 8579, "uuid": "0002ec55-6acd-8000-3ce3-7f0000014e7a", "name": "EA QueryDB", "description": "", "version": "15.0", "creator": { "id": "rithika14" }, "timeZone": "GMT", "starred": false, "parentName": "" }, "pv": { "table_count": [], "table_name": [] }}
You have to send data in an API request as shown below:
Web API is receiving the data from the process model directly, no need to send data from web api to process model.
For process model variables you need to pass the data in json format in the body if the body of the API is null that means the inputs are empty to the process model . So you will get null values in process variables.
For process model (which has only query database step that too using sql query) it doesn't have any parameter to be passed. It only gives output and that I will be saving in the process variable and i am trying to fetch it in the web api.