Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-2911

Update Scenario Simulation command to use the new module

XMLWordPrintable

    • 2018 Week 45-47, 2018 Week 48-50
    • 2
    • NEW
    • NEW

      Use new kie-wb-common-command-api for Scenario Simulation commands

      Specs:
      Preliminary steps:

      • Add dependency to the new module containing AbstractCommand
      • Split CommandExecutor class into two classes: a pure executor and a general event handler that accepts all the events
      • Refactor ScenarioGridMode.bindContent and ScenarioSimulationViewImpl.refreshContent to be able to refresh internal model and grid model in a simple way (for now it refreshes only the errors from the internal model)
      • Refactor remaining actions with no commands (for instance flush of inline editing should fire an event instead of update directly the code). More or less all the methods that work with ScenarioGridModel should be inside a command

      Move to common API:

      • Implement ScenarioCommandManager extending org.kie.workbench.common.command.impl.CommandManagerImpl
      • Refactor all commands to extend org.kie.workbench.common.command.AbstractCommand
      • Implement a default undo strategy that dump the model and restore it when needed (we should consider how to preserve selections, columns width and right panel status)
      • Implement ScenarioCommandRegistry extending org.kie.workbench.common.command.registry.command.CommandRegistryImpl
      • Implement ScenarioCommandController (or with a better name ) that wrap ScenarioCommandRegistry and ScenarioCommandManager and exposes some API for safe command execute (for instance undo only of the last executed method). This class should be the entry point to manage commands (probably it should be declared as @Dependent and injected into the Presenter)

              gcardosi Gabriele Cardosi (Inactive)
              dzonca@redhat.com Daniele Zonca
              Klara Bezdekova Klara Bezdekova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: