Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-330

Provide workflow category and workflow method information to allow event workflow classes to handle multiple events

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.23.02-alpha
    • None
    • None

    Description

      Ate provided a patch for this problem.

      From Ate:

      Yes, I noticed this limitation before as well.

      IMO it should be trivial to fix this though.

      The WorkflowEventWorkflow #fire() and #fire(Document) methods are only invoked from within two classes (AFAIK):

      • org.hippoecm.repository.impl.WorkflowPostActionSimpleQuery
      • org.hippoecm.repository.impl.WorkflowPostActionsBoundMethod

      Both these classes already have instance String variables for both the triggering workflowCategory and WorkflowMethod.

      So, we can easily introduce a new interface, extending WorkflowEventWorkflow implementation to make it 'multiple events (types) capable', e.g. like

      interface WorkflowEventsWorkflow extends WorkflowEventWorkflow

      { void setWorkflowCategory(String category); void setWorkflowMethod(String method); }

      Then those two classes above can simply check if this interface is implemented instead and if so first set these two variables and you've got your generic mediator event(s) workflow implementation!

      If the above is feasible this would be a very trivial to implement without any side-effects or backwards compatibility issues.
      And I would then also deprecate the original WorkflowEventWorkflow interface.

      Update: for the fun of it I've already created and attached a patch for it, took me only 5 minutes to create against repo trunk, but probably can also be applied to previous released version. I haven't actually tested it yet though.

      If you could try this patch out and it works, I can create an issue for it and have it applied ASAP.

      Attachments

        Issue Links

          Activity

            People

              jsheriff Junaidh Kadhar Sheriff
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: