Add proper handling for outputTransmission
Is your feature request related to a problem? Please describe.
Currently the information outputTransmission returned by the process description (entry point processes/[process-id])
does not account for the information provided by the PROCESS_METADATA of the process,
but is always returning the array ['value'].
While the default for outputTransmission is ['value'],
the logic for the returned information should also consider if PROCESS_METADATA['outputTransmission'] is declared.
Describe the solution you'd like
Alternatives for outputTransmission are:
-
['value'] -
['reference'] -
['value', 'reference']
The ability of the API to return a reference depends on if and where the following are defined:
- where to store the output
- what is the reference URL
There should be alternatives where to define the information required to return a reference. Where multiple alternatives are present they should be considered with the following priority:
- within the runtime of the process (e.g the information where to store the output may be provided as an input parameter)
- within the process definition (e.g. the configuration of the process may include process specific information where to store the output)
- within the manager definition (e.g. the manager configuration may include standard information where to store the output)
- if none of the above is present, then the API cannot return a reference.
For cases 1. and 2. the process will have a (instance or class) function the manager can call to store the output and to get the reference to pass back to the caller. For case 3. the manager will have a local function to call.
If 'reference' is within the PROCESS_METADATA['outputTransmission'], then the logic of the 'process description' will test for the presence of the functions.
Note 1: it is possible the process is not planned to return the output as a value, but only as a reference,
e.g. a process producing a (possibly big) file stream. In this case 'outputTransmission'=['reference'].
Note 2: the returned link is not part of the API.
Note 3: the place where to store the output could be different from a file: it is implementation specific, and could also be (e.g.) a database.
Additional context
By the next release it is possible for the process manager to receive the parameter outputs,
and then process the request also accounting for the parameter outputTransmission.
This should be reflected also in the process description.
Final
I don't foresee any change in current signatures or required configuration.
However, to make the API able to deal with a request with 'outputTransmission'='reference'
then configuration changes are required in the configuration parameters for the ProcessManager, the Process, or both.
I propose to modify the following files:
-
api.processes.describe_processes() -
api.process.manager.base.BaseManager -
api.process.hello_world.HelloWorldProcessor
@tomkralidis Please could you add the tag "OGC API - Processes"
Looking at the Draft version of OGC API - Processes - Part 1: Core (1.1 or 2.0) on OGC API - Processes
the output parameter outputTransmission disappeared.
The current Draft spells that:
-) for Response requesting a single processing output, the server always returns the "value"
-) for Response requesting multiple processing outputs the decision to return the output either as "value" or "reference" include handling the "return preference":
---) if return=representation then always return the output "value"
---) otherwise the server decide if should return an "hiperlink" or the "value".
This Issue has been inactive for 90 days. As per RFC4, in order to manage maintenance burden, it will be automatically closed in 7 days.
As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.