Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-5642

Per Request strategy behaves as Singleton

    XMLWordPrintable

Details

    • NEW
    • NEW
    • Hide

      Preconditions:

      • Deployed workbench and kie-server
      • Workbench as controller for kie-server via default kieserver user
      1. Go to project authoring
      2. Create new project
      3. Create new package: dtables.bonus_program
      4. Navigate to this package
      5. Upload both java classes and xlsx decision table into this package
      6. Save, Build And Deploy the project
      7. Go to Deploy - Execution Servers
      8. Remove the created Kie Container
      9. Create new Kie Container that will hold artifact corresponding to the created project and will be named bonus-program
      10. Set Runtime Strategy to this container as Per Request
      11. Start the container
      12. Run BonusProgramTest.main() two times
        • First time there will be printed 3 employees and 3 bonuses
        • Second time there will be 6 employees and 6 bonuses
        • Second time are again expected just 3 employees and 3 bonuses
        • There are again just 3 employees and 3 bonuses in the output if the kie container was restarted
      Show
      Preconditions: Deployed workbench and kie-server Workbench as controller for kie-server via default kieserver user Go to project authoring Create new project Create new package: dtables.bonus_program Navigate to this package Upload both java classes and xlsx decision table into this package Save, Build And Deploy the project Go to Deploy - Execution Servers Remove the created Kie Container Create new Kie Container that will hold artifact corresponding to the created project and will be named bonus-program Set Runtime Strategy to this container as Per Request Start the container Run BonusProgramTest.main() two times First time there will be printed 3 employees and 3 bonuses Second time there will be 6 employees and 6 bonuses Second time are again expected just 3 employees and 3 bonuses There are again just 3 employees and 3 bonuses in the output if the kie container was restarted

    Description

      It seems hat per request runtime strategy behaves as singleton. It can be noticed by objects in kie session from previous run of program that communicates with kie server via RuleServicesClient.

      Attachments

        1. Bonus.java
          0.8 kB
        2. bonus-program.xlsx
          9 kB
        3. bonus-program.zip
          6 kB
        4. Employee.java
          0.8 kB

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            rh-ee-jomarko Jozef Marko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: