TouK/nussknacker

Refactoring of customAction configuration

Opened this issue · 1 comments

💥 Proposal

While implementing customActions I've encountered several issues and it would be nice to discuss how to approach them:

  1. There is an inconsistency in the configuration of custom-action (definition and implementation provided via DeploymentManager) and custom-link (configuration only).
  2. A customAction seems to be available only in top-right section of Nussknacker frontend ("process-info-panel").
  3. I can define an editor for CustomActionParameter, but not validator.
  4. DTO's used to invoke customAction are spread through different modules. Those used for deployment are in nussknacker-restmodel, and customAction is currently in nussknacker-ui.
  5. What is recommended approach to provide custom definition of invokeCustomAction in PeriodicDeploymentManager?
    Some elements that are usefull for invokeCustomAction exist only in PeriodicDeploymentManager.apply and are not accesible from within class.
  6. What is recommended approach to call other NK services from within PeriodicDeploymentManager?
    E.g. invoke addComment (ProcessActivityRepository).
  7. Method PeriodicDeploymentManager.apply seems to be too long.
jedrz commented

What's more the following features would be useful too:

  • Allow to configure permissions to invoke the custom action.
  • Allow to configure where the button should be displayed (position and panel). Integrate with processToolbarConfig.
  • Allow to hide completely the custom action button. Logic to hide/show and disable/enable the button should depend on scenario json (e.g. show the button only if the scenario uses some components and enable the button only in some statuses of the scenario).