Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2673

There Should be a Relation Between the Fired Rule and the Node which Activates the Ruleflow-Group

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Medium

      We asked for the following behavior to be implemented:

      @Test(expected=NameOfOurLayerOtTopOfDroolsException.class)
      public void shouldThrowNameOfOurLayerOtTopOfDroolsExceptionForAnyThrowableThrownWithinDroolsOnTheProcessStart()

      { ksession.startProcess("com.jpmc...process-throws-throwable"); }

      @Test(expected=NameOfOurLayerOtTopOfDroolsException.class)
      public void shouldThrowNameOfOurLayerOtTopOfDroolsExceptionForAnyThrowableThrownWithinDroolsOnTheProcessResume()

      { ksession.getWorkItemManager().completeWorkItem( id, null ); }

      And Plugtree was prompt to create it for us: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/branches/5_1_20100802_esteban_diega/drools-persistence-jpa/src/test/java/org/drools/persistence/jpa/exceptionhandling/PersistentProcessNodeExceptionOccurredEventTest.java

      The only roadblock here, to fulfill our original request, is when Throwable is thrown from within a "ruleflow-group" ( from within rules that are embedded into / invoked from a workflow ), in which case Throwable cannot be caught by the above mechanism due to the fact that:

      "At the moment Drools doesn't keep any relation between the fired rule and the node which activates the ruleflow-group, thus if an activated rule blows up there is no way to know which node has made focus on its group"

      Since Drools is moving towards having everything under "a single roof/parent of Knowledge", Process and Rule children should be rather siblings than strangers, hence should know a little more about each other.

      /Anatoly

            mproctor@redhat.com Mark Proctor
            Anat0ly Anatoly Polinsky (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Archived:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified