opengeospatial / opengeospatial/ogcapi-processes

P3-Workflows: Re-usable components ($ref with JSON Pointers)

Open
#304 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discussion Part 3 (Workflows/Chaining)
Dominant language
AsciiDoc
Stars
63
Forks
46
Avg merge
2d 1h
Merged PRs (30d)
8

Description

Possibly as a separate conformance class, it would be very useful to support re-usable components with $ref and a JSON Pointer to avoid repeating the same redundant (potentially complex) nested process definition within a workflow.
In addition, an implementation would easily be able to identify that two nested process objects are identical and therefore their outputs should be re-used (as opposed to executing it twice).

This would also facilitate defining a nested process that generates multiple outputs, then refer to it adding an {"outputs": ... section to select a specific output for its use as a particular input e.g.,

{
   "process": "https://example.com/ogcapi/processes/SomeProcess",
   "inputs" : {
      "orthoPhoto" : { "$ref" : "#/components/photogrammetry", "outputs" : { "orthoPhoto": { } },
      "pointCloud" : { "$ref" : "#/components/photogrammetry", "outputs" : { "pointCloud": { } }
   },
   "components" :
   {
      "photogrammetry":
      {
         "process": "https://example.com/ogcapi/processes/Photogrammetry",
         "inputs" : { ... }
      }
   }
}

See also scenario 4 in https://github.com/opengeospatial/ogcapi-processes/issues/279#issuecomment-1046682392 , where it is used in a different context (which may be better addressed with a mechanism as part of the Input/Output Fields conformance class to aggregate over a temporal dimension for multiple intervals, as opposed to completely reducing the temporal dimension).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with issue 304 and scenario 4 in the linked comment on issue 279. Compare the proposed $ref and JSON Pointer component reuse with the alternative involving the Input/Output Fields conformance class. Done means the project has a decided scope and documented conformance requirements for this proposal.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.