[jboss-jira] [JBoss JIRA] (DROOLS-427) ResourceChangeScanner problem

Xavier Bourdon (JIRA) issues at jboss.org
Wed Feb 12 05:15:30 EST 2014


Xavier Bourdon created DROOLS-427:
-------------------------------------

             Summary: ResourceChangeScanner problem
                 Key: DROOLS-427
                 URL: https://issues.jboss.org/browse/DROOLS-427
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 5.5.0.Final
         Environment: Windows 7 64bit
Java jdk1.5.0_22
            Reporter: Xavier Bourdon
            Assignee: Mark Proctor
            Priority: Critical


I have a problem of execution of all my rules after PKG compilation.

STEP :
1) DRL files generation (43 rules).

2) PKG compilation

      KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
      File droolsWorkspaceFile = new File(_droolsWorkspace);
      for (String file: droolsWorkspaceFile.list())
      {
        if (file != null && file.endsWith(".drl"))
        {
          kBuilder.add(ResourceFactory.newFileResource(_droolsWorkspace + file), ResourceType.DRL);
        }
      }
      KnowledgePackage pkg = null;
      if (kBuilder.getKnowledgePackages().iterator().hasNext())
      {
        pkg = kBuilder.getKnowledgePackages().iterator().next();
      }
      if (kBuilder.getErrors() != null && !StringUtil.isEmpty(kBuilder.getErrors().toString()))
      {
        LOGGER.error(kBuilder.getErrors().toString() + "\n");
      }
      FileOutputStream out = new FileOutputStream(_droolsWorkspace + "MarketingActionEngineRules.pkg");
      try
      {
        if (pkg != null)
        {
          DroolsStreamUtils.streamOut(out, pkg);
        }
      }
      finally
      {
        out.close();
      }

3) Launch rules (43 rules executed)

kSession.fireAllRules();

4) DRL files generation (43 rules : same rules).

5) PKG compilation

6) Refresh Knowledge Agent

ResourceFactory.getResourceChangeScannerService().scan();

7) Launch rules (41 rules executed)

The first two rules are not executed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list