Update to database from frontend gateway to backend gateway

Si I have followed the seup of a frontend and a backend gateway in docker in the elevated studies in inductive university. So I have two functioning gateways, a database connected to the backend and a smtp setup and working with a working gateway network outgoing from backend to frontend.

I have now set up a project on the frontend in perspective and it’s working fine but I have a button where I want to do an update/insert in the database and since the database is connected to the backend i have created an event script to do this onActionPreformed and the script uses a system.util.sendRequest to send a request to the backend-gateway.
On the backend gateway I have set up Gateway event script message handler that triggers a Named Query that do the update in the database. The Named Query is thested and works but the problem is on the frontend-gateway that the press of the button fiers the event script but the log on frontend says that “DispatchManager

04Nov2025 14:04:33

Error during message dispatch: Project 'XXX_backend' was not found!” (I have changed the project namen in this error but the real project name is correct with the project on the backend gateway.

I don’t know what more to do, I have tested and I can’t get it to work. Is there something missing on the backend gateway project? It only handles the gateway event and the named query at the moment this is all the project on the backend contains.

Show your script.

Okay, here is the part of the script that’s going to send the event to the backend gateway.

    resp = system.util.sendRequest(
        project = "Kutter_backend",           
        messageHandler = "InsertBlockData",
        payload = {
            "batchId": batchNumber,
            "orderId": "1234",
            "status": 1,
            "quality": quality
    },
    gateway = "backend-gateway"       
    )

The argument gateway = should be remoteServer =. Check the docs.

2 Likes

6 Likes