Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4251

"kcontext.getProcessInstance()).setDescription" is not updating the description immediately

    XMLWordPrintable

Details

    • 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)

    Description

      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

       

       

      Attachments

        Activity

          People

            rhn-support-egonzale Enrique Gonzalez Martinez (Inactive)
            rhn-support-sudnair Sudhish Nair
            Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
            Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: