-
Bug
-
Resolution: Done
-
Major
-
7.12.0.GA
-
False
-
None
-
False
-
Release Notes
-
-
-
-
-
-
CR1
-
+
-
-
2022 Week 17-19 (from Apr 25), 2022 Week 23-25 (from Jun 6), 2022 Week 26-28 (from Jun 27), 2022 Week 29-31 (from Jul 18), 2022 Week 32-34 (from Aug 8)
While trying to update the process instance description via a script task inside process definition, the updated value is not getting reflected immediately.
((org.jbpm.process.instance.impl.ProcessInstanceImpl)kcontext.getProcessInstance()).setDescription("updated::" + kcontext.getVariable("pid"));
Although the updated value is printed if we fetch "kcontext.getProcessInstance().getDescription()", but this updated value is not refleted in business-central UI or fetched with REST API.
GET /kie-server/services/rest/server/queries/processes/instances/1
Update value is only reflected after the process is completed or aborted.
Sharing the reproducer for reference.
solution
using a description based on process variables e.g:
update::#{pid}
where pid is a process variable.
Add the Tag process_description to pid.
Anytime the variable pid is changed the description of the process will be flushed to the ProcessInstanceLog