0

Please advise how to update many Kogito process variables with outputs from a service task? I mapped service task's outputs to process variables on "Data Outputs and Assignments" screen of BPMN editor and implemented service task handler to return java Map<String, Object>. Solution compiles and runs but process variables do not update with results and process stucks in Active state ...

@ApplicationScoped
public class Handler {
  public Map<String, Object> Execute() {
    Map<String, Object> results = new HashMap<>();
    results.put("processVariableA", true);
    results.put("processVariableB", "message");
    return results;
  }
}

Log

2022-08-23 16:47:49,164 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (main) Starting workflow 'Provisioning' (8ce17dc5-9606-425b-b563-a9deacdcc812)
2022-08-23 16:47:49,168 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (main) Triggered node 'Start' for process 'Provisioning' (8ce17dc5-9606-425b-b563-a9deacdcc812)
2022-08-23 16:47:49,172 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (main) Triggered node 'Set Variables' for process 'Provisioning' (8ce17dc5-9606-425b-b563-a9deacdcc812)
2022-08-23 16:47:49,365 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (main) Workflow 'PortsProvisioning' (8ce17dc5-9606-425b-b563-a9deacdcc812) was started, now 'ACTIVE'

1 Answers1

0

I raised this question at zulip as well. Maybe that triggers someone: https://kie.zulipchat.com/#narrow/stream/232676-kogito/topic/Question.3A.20update.20multiple.20proces.20variables

Han
  • 137
  • 9
  • There is an (currently open) issue for this: https://github.com/kiegroup/kogito-runtimes/issues/2413 – Han Sep 01 '22 at 09:12