OpenSAGA Core

InputParameterValue-Übergabe vom Client aus definieren und implementieren

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: OpenSAGA 1.0.0
  • Fix Version/s: Sprint KW20/21
  • Component/s: Runtime system, UI
  • Labels:
    None

Description

Wir müssen definieren, wie wir Parameter, die mit einem InputValueSetModel definiert werden können, vom Client an den Server übermitteln wollen. Dazu sollte wir den Service zur Berechnung von Einsprung-URLs auf Prozessstartzustände so aufbohren, dass er als neuen Pflichtparameter ein InputValueSetModel erhält und dann eine entsprechend parametrisierte URL erhält.

Frage: Welche Probleme sind mit sehr langen URLs zu erwarten? Wo liegt aktuell überhaupt die Grenze für die Länge von URLs?

Siehe auch OS-36 und OS-50.

Activity

Hide
Thomas Biskup added a comment -

Currently supported features

More detailed description of required functionality:

  • InputValueSetModel defines three types of parameters:
    • properties (e.g. atomic values)
    • objects
    • lists of objects

All those values are identified "by name".

URL requirements

According to my current understanding parameter transfer should be handled like this:

  • for properties, the (name, value) pair will be transferred using an HTTP GET parameter
  • for objects, the (name, primary key) pair will be transferred using an HTTP GET parameter
  • for lists, a series of (name_index, primary key) pairs will be transferred using HTTP GET parameters (probably also transferring the length of the series in an additional parameter)
    Additionally we need to use some kind of CRC in order to prevent client side manipulation of the parameters.

Transfer requirements

Currently there is a call

processParameterizationService.handleProcessStartStateParameterValues(requestContext, transitionModel);

in TransitionServiceImpl}. The current {{ProcessParameterizationServiceImpl only retrieves parameters from the session context (and immediately deletes them). The current code block

// Retrieves the input parameters.
        String sessionKey = getSessionKey(startStateModel);
        Map<String, Object> values = (Map<String, Object>) requestContext.getSessionContext().getProperty(sessionKey);
        if (values == null)
        {
            throw new RequestContextProcessingException("Failed to locate the input parameter values for process start state '" + startStateModel.getId() + "'.");
        }
        requestContext.getSessionContext().setProperty(sessionKey, null);

should be expanded to alternatively retrieve the parameters from the HttpServletRequest if none are contained in the session and only then throw an exception if the request parameters also are not correctly defined (by either not being defined at all or by having an incorrect CRC).

Show
Thomas Biskup added a comment -

Currently supported features

More detailed description of required functionality:
  • InputValueSetModel defines three types of parameters:
    • properties (e.g. atomic values)
    • objects
    • lists of objects
All those values are identified "by name".

URL requirements

According to my current understanding parameter transfer should be handled like this:
  • for properties, the (name, value) pair will be transferred using an HTTP GET parameter
  • for objects, the (name, primary key) pair will be transferred using an HTTP GET parameter
  • for lists, a series of (name_index, primary key) pairs will be transferred using HTTP GET parameters (probably also transferring the length of the series in an additional parameter) Additionally we need to use some kind of CRC in order to prevent client side manipulation of the parameters.

Transfer requirements

Currently there is a call
processParameterizationService.handleProcessStartStateParameterValues(requestContext, transitionModel);
in TransitionServiceImpl}. The current {{ProcessParameterizationServiceImpl only retrieves parameters from the session context (and immediately deletes them). The current code block
// Retrieves the input parameters.
        String sessionKey = getSessionKey(startStateModel);
        Map<String, Object> values = (Map<String, Object>) requestContext.getSessionContext().getProperty(sessionKey);
        if (values == null)
        {
            throw new RequestContextProcessingException("Failed to locate the input parameter values for process start state '" + startStateModel.getId() + "'.");
        }
        requestContext.getSessionContext().setProperty(sessionKey, null);
should be expanded to alternatively retrieve the parameters from the HttpServletRequest if none are contained in the session and only then throw an exception if the request parameters also are not correctly defined (by either not being defined at all or by having an incorrect CRC).
Hide
Thomas Biskup added a comment -

Rough estimate (6h).

Show
Thomas Biskup added a comment - Rough estimate (6h).
Hide
Sven Helmberger added a comment -

Works now for PlainText properties. Navigation-URLS are rendered with params as applicable, params are translated into input values at entry.

Show
Sven Helmberger added a comment - Works now for PlainText properties. Navigation-URLS are rendered with params as applicable, params are translated into input values at entry.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
6h
Original Estimate - 6h
Remaining:
6h
Remaining Estimate - 6h
Logged:
Not Specified
Time Spent - Not Specified