Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1467

Allow Sessions to execute sequencers in-thread and using transient state

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.6.0.Final
    • 3.0.0.Alpha3
    • JCR
    • None

    Description

      Provide a way for a Session to explicitly and synchronously invoke the sequencers (or a particular sequencer) on a specified path, perhaps regardless of whether the node at that path has changed (e.g., in the session's transient state). The path would be evaluated to determine which, if any, sequencers should be invoked, and to then invoke those applicable sequencers. The output from the sequencers would be written to the Session's transient state, where the caller can choose when/if to save the state. Note that this would be a synchronous method, allowing the caller to block and wait for the derived output to be sequenced.

      The primary use case is to simplify clients that want to upload files, synchronously sequence the uploaded files, and then operate upon the content output by the sequencer (all perhaps before the uploaded files are saved to the repository). Clients could use this to validate files (reusing the existing Sequencer framework) before saving them into the repository.

      There are few outstanding issues to work out:

      1. Should this prevent the background sequencing from occurring on the same node? For example, consider a session that uploads a file to "/foo/bar.xsd" and, before saving, invokes the sequencers to process the "/foo/bar.xsd" node. If the XSD sequencer were configured, it would normally run on this file when it is saved and generate the output in its configured location. But if the Session's transient state already included the output (in the configured location), then it would not be required (nor perhaps be desirable) to run the sequencer on the same input.
      2. Should it be possible to explicitly invoke a particular sequencer and specify different output location, perhaps even if no sequencer is configured in the repository to normally sequence the input location. For example, consider a repository that has an XSD sequencer configured to always output the derived information under "/xsd/$1", but where the Session client wants to sequence a particular XSD file and have the output written to "/some/other/location".

      I'm interested in whether people would find this useful, and any opinions on the outstanding issues.

      Attachments

        Issue Links

          Activity

            People

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: