This mock-up proof of concept shows how to provide an interoperable interface between ELNs and/or workflow managers via FINALES as a broker.
The main challenge we discuss here is that the tenant might have a GUI to either ask for more information (e.g. additional inputs, confirmation, ...) after the main request is submitted from the ELN, and this requires human interaction. The idea is that this GUI exists already in the tenant, and one does not want to convert all inputs into a schema, and then re-implement a sophisticated GUI in the ELN.
So, the main challenge is how to communicate back to the ELN (where the user first submitted the work) that it should prompt the user for clicking on a link and performing additional information in that GUI, before the workflow can continue.
This is achieved by extending FINALES with a concept of mutable partial responses. They might serve also the goal of communicating back to the requester (here, the ELN) partial results (i.e., progress). But in addition, a special field can be returned with a URL. If present, the ELN will show it in a special way to the user.
For more discussions on the rationale behind this, you can check this message in the MADICES GitHub discussions.
In principle, before getting to the Submit button in the ELN, the ELN might query all available capabilities in the FINALES server, possibly matching its input with the semantic information that could be in the future provided together with the JSON schemas of the capabilities. Then ask the user which ones to run, etc.
Here, we assume this part and the choice have been already done by the user, and we show only the submission part.
NOTE: this is just a quick mock up for demonstration purposes. It does not include proper validation, it is not super robust upon disconnection issues, etc.
The ELN wants to compute Fibonacci numbers from the i-th number (and i) is provided in the request.
To perform the task, the tenant will need to know more "computational parameters". In this mock-up: N, i.e. how many numbers the user wants.
This will be asked in the tenant GUI.
Once this is provided, the tenant will compute N Fibonacci numbers starting from the i-th, with a timeout between each number (5 seconds). Every 5 seconds, it will send a partial result with the numbers computed up to that point. These partial resulsts will not contain anymore the human_feedback_url, so no prompt is shown to the user anymore. Only (optionally) partial results and progress can be shown to the user.
At the end, the tenant will post the final response (the full list of N numbers), and the ELN will show this to the user (and, in principle, appropriately store it inside its database).
After installing the dependencies in a virtual environment, run in 4 different terminals:
-
FINALES-like broker: Run
./finales.pyto start the FINALES (mock) server (will run on port 8000) -
FINALES tenant for the simulations: run
./fibonacci-tenant.pyto start the FINALES tenant (this mocks e.g. a tenant providing simulation capabilities: it checks for requests and processes them. It will provide a partial response with a link for human feedback at the beginning [this will point to the tenant-feedback-portal.py below], then use the combined input from the FINALES request and the information provided by the GUI to run a fake simulation, providing intermediate progress results, and finally post the final response to FINALES) -
Tenant GUI for human feedback: run
./tenant-feedback-portal.pyto start a server serving GUIs for the human feedback (this will run on port 8050) -
ELN-like web frontend: run
python -m http.server 8080to start a mini web server to serve the main GUI (that mocks an ELN providing an interface to push a simulation via FINALES and get the results, but also monitors partial results both to visualize them, but also to ask user to click on the 'human feedback URL' in case this is provided). This will in particular serve the file fibonacci-monitor.html
NOTE: Ports are hardcoded. If you change them, you need to adapt other services (e.g. if you change port 8080 for the ELN-like GUI you need to adapt the CORS parameters in FINALES, etc.)
To start, then, connect from a browser to http://localhost:8080/ELN-interface.html
The discussions behind this mock up happened at the MADICES 2025 conference (Villigen PSI, 20-24 October 2025). Thanks to all people at the conference who provided feedback. The main people involved in the discussion were Giovanni Pizzi, Monika Vogler, Edan Bainglass.
