Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-19500

Importing a process xml file can result in issues when using non-embedded forms

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      N/A

      Description

      Summary
      When importing a process xml file with a non embedded form, obviously we only use the form ID to reference the linked forms, This can cause issues, if the form ID has changed in between, for example if the form has been deelted and then reimported through another app.

      Steps to reproduce

      1. Via App Designer in activiti-app create a new reusable form
      2. Create a process named process1 with start-user task-end.
      3. Reference the form created earlier from the user task.
      4. Save and close the process.
      5. Create a second process named process2 with start-user task-end.
      6. Reference the form created earlier from the user task.
      7. Save and close the process
      8. Export the process process2
      9. Create an App ErrorApp1 and add the process process1 to the app
      10. Save the App and close, then export the app
      11. Delete the app completely, then both processes and the form.
      12. Import the App (it will have the first process associated) and publish it
      13. From the pubslished app on the landing page, start a new process and verify that the user task uses the modelled form
      14. Import the second process, associate it with the app and try to publish the app

      Expected behaviour
      App can be pubslihed without seeing any issues/errors.

      Current behaviour
      Publishing the app fails with an error like: 

      02:28:46,613 [http-bio-9999-exec-19] ERROR com.activiti.service.editor.scope.resolve.StencilProcessScopeResolver  - Error retrieving form 220222 referenced from process with model id '221235'
      java.lang.NullPointerException
      	at com.activiti.service.editor.scope.resolve.ProcessScopeDataProvider.getForm(ProcessScopeDataProvider.java:169)
      	at com.activiti.service.editor.scope.resolve.ProcessScopeDataProvider.getForm(ProcessScopeDataProvider.java:160)
      	at com.activiti.service.editor.scope.resolve.AbstractProcessScopeResolver.resolveForm(AbstractProcessScopeResolver.java:197)
      

      Supporting evidence

      • Reproduced with current latest APS 1.8.1 release
      • Issue likely occurs because after form was deleted and reimported through importing the app, it automatically got a new form ID and that does not match with the one in the second process. As the process not only stores form ID but also form Name, we should try to renew the ID.

      Workaround
      After having seen the error, edit process2 in the editor and reselect the correct form.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                dgruber Doug Gruber
                Reporter:
                dkoch Dennis Koch
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel