Hi,
I have a repeatable CMMN task circled in red as given in the following screen shot. There is a repeatable condition ${score < 50}. The intention is to dynamically trigger this task at will.
I am trying to write a controller method in my Spring boot application that will set the score to 49 at runtime such that the above CMMN task will be activated. The idea is to allow my Angular UI to trigger the Spring Boot endpoint if the user would like to activate this task again when they need it. I have tried the following option.
@PostMapping("/process")
public void setScore(@RequestParam("instanceId") String processInstanceId) {
runtimeService.setVariable(processInstanceId, "score", 49);
}
The issue I am facing is that, I am unable to find the processInstanceId. Is my approach correct?If not could you please recommend the correct approach to follow to accomplish this requirement? I have spent an awful amount of time going through the camunda documentation.Unfortunately I could not find a straight forward solution to this issue. I understand that this could be a common requirement and most of the Camunda experts will be already familiar with this usecase. I am fairly new to Camunda. Any help in this matter will be highly appreciated. Thanks & regards. Roshini