jBPM
  1. jBPM
  2. JBPM-3823

Designer validation fails when Reusable Subprocess refers to a different package

    Details

    • Type: Bug Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor Minor
    • Resolution: Done
    • Affects Version/s: jBPM 5.3
    • Fix Version/s: None
    • Component/s: Designer
    • Labels:
      None
    • Bugzilla Update:
      Perform
    • Similar Issues:
      Show 10 results 

      Description

      In case that you have 2 processes in different packages, you can set one process as 'Called Element' in a 'Reusable Subprocess' of another process. But 'Validate Process' will fail with "No existing process with id=xxxx.XXXX could be found." message.

      You can reproduce it with the attached repository_export_subprocess_in_different_package.xml.

      • Import
      • Open 'parentprocess'
      • Click 'Validate Process'

      BPMN2SyntaxChecker looks at only parent's package.

          if(fe instanceof CallActivity) {
              CallActivity ca = (CallActivity) fe;
              if(ca.getCalledElement() == null || ca.getCalledElement().length() < 1) {
                  addError((CallActivity) fe, "Reusable Subprocess has no called element specified.");
              } else {
                  String[] packageAssetInfo = ServletUtil.findPackageAndAssetInfo(uuid, profile);
                  String packageName = packageAssetInfo[0];
                  List<String> allProcessesInPackage = ServletUtil.getAllProcessesInPackage(packageName, profile);
                  boolean foundCalledElementProcess = false;
                  for(String p : allProcessesInPackage) {
                      String processContent = ServletUtil.getProcessSourceContent(packageName, p, profile);
                      Pattern pattern = Pattern.compile("<\\S*process[\\s\\S]*id=\"" + ca.getCalledElement() + "\"", Pattern.MULTILINE);
                      Matcher m = pattern.matcher(processContent);
                      if(m.find()) {
                          foundCalledElementProcess = true;
                          break;
                      }
                  }
                  if(!foundCalledElementProcess) {
                      addError((CallActivity) fe, "No existing process with id=" + ca.getCalledElement() + " could be found.");
                  }
              }
          }
      

        Gliffy Diagrams

          Activity

          Hide
          RH Bugzilla Integration added a comment -

          Toshiya Kobayashi <tkobayas@redhat.com> made a comment on bug 867188

          Description of problem:

          Platform BZ for https://issues.jboss.org/browse/JBPM-3823

          Steps to Reproduce:

          1. Import repository_export_subprocess_in_different_package.xml attached to JBPM-3823
          2. Open 'parentprocess' in defaultPackage
          3. Click 'Validate Process'

          Actual results:

          Validation error "No existing process with id=anotherPackage.childprocess could be found."

          Expected results:

          No validation error.

          Show
          RH Bugzilla Integration added a comment - Toshiya Kobayashi <tkobayas@redhat.com> made a comment on bug 867188 Description of problem: Platform BZ for https://issues.jboss.org/browse/JBPM-3823 Steps to Reproduce: 1. Import repository_export_subprocess_in_different_package.xml attached to JBPM-3823 2. Open 'parentprocess' in defaultPackage 3. Click 'Validate Process' Actual results: Validation error "No existing process with id=anotherPackage.childprocess could be found." Expected results: No validation error.
          Hide
          Toshiya Kobayashi added a comment -
          Show
          Toshiya Kobayashi added a comment - Sent a pull request: https://github.com/droolsjbpm/jbpm-designer/pull/7
          Hide
          Tihomir Surdilovic added a comment -

          Pull request merged into master - thank you!

          Show
          Tihomir Surdilovic added a comment - Pull request merged into master - thank you!
          Hide
          RH Bugzilla Integration added a comment -

          Tihomir Surdilovic <tsurdilo@redhat.com> made a comment on bug 867188

          Raise blocker flag to include in 5.3.1

          Show
          RH Bugzilla Integration added a comment - Tihomir Surdilovic <tsurdilo@redhat.com> made a comment on bug 867188 Raise blocker flag to include in 5.3.1
          Hide
          RH Bugzilla Integration added a comment -

          Tihomir Surdilovic <tsurdilo@redhat.com> changed the Status of bug 867188 from NEW to ASSIGNED

          Show
          RH Bugzilla Integration added a comment - Tihomir Surdilovic <tsurdilo@redhat.com> changed the Status of bug 867188 from NEW to ASSIGNED
          Hide
          RH Bugzilla Integration added a comment -

          Tihomir Surdilovic <tsurdilo@redhat.com> made a comment on bug 867188

          Fix committed to 2.3.x Designer branch

          Show
          RH Bugzilla Integration added a comment - Tihomir Surdilovic <tsurdilo@redhat.com> made a comment on bug 867188 Fix committed to 2.3.x Designer branch
          Hide
          RH Bugzilla Integration added a comment -

          Tihomir Surdilovic <tsurdilo@redhat.com> changed the Status of bug 867188 from ASSIGNED to MODIFIED

          Show
          RH Bugzilla Integration added a comment - Tihomir Surdilovic <tsurdilo@redhat.com> changed the Status of bug 867188 from ASSIGNED to MODIFIED

            People

            • Assignee:
              Tihomir Surdilovic
              Reporter:
              Toshiya Kobayashi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development