Hi to all,
so I managed to progress with the issue. I have used approach mentioned by Maciej Swiderski in Null Pointer Exception when Rule is used to change process variable value.
The RHS now goes like this:
WorkflowProcessInstance p = (WorkflowProcessInstance)kcontext.getKnowledgeRuntime().getProcessInstance($processId);
But, another issue emerged. When I set a primitive value (process variable check), everything works fine, but when I try to set Object variable(city), the change isn't promoted to the process instance.
that sounds very weird as the process instance does not really care about the type of the object. Could you please create standalone reproducer?