workfloworchestrator / orchestrator-ui-library

Component library for the orchestrator-ui (v2) which is published in npm
8 stars 4 forks source link

Bug: [Websocket] cache invalidation events after callback step? #1456

Closed DutchBen closed 1 month ago

DutchBen commented 1 month ago

Mahammad@Geant reports that the process detail page doens't update throught the websocket connection when there are callback steps in his form. The websocket connection is established and the backend sends the correct cache invalidation requests, it appears to stop doing that when a callback step is reached.

torkashvand commented 1 month ago

I also add this here:

I’ve updated @orchestrator-ui/orchestrator-ui-components to version 2.1.0and made the necessary code changes. The websocket connection is working well—I can see the green icon, and the Network tab shows "ping pong" game between the frontend and backend. However, after the update, we no longer see asynchronous updates from LSO like before. I debugged both the backend and frontend and noticed after running a workflow websocket sends some events like this: {"name":"invalidateCache","value":{"type":"processes","id":"0395d66a-9a10-4634-b88b-a8041badcef3"}} and I checked the orchestrator-ui-components code and as I understood the invalidateCache events should do the component re-render for the process detail page but seems doesn’t and we have to refresh the page manually, which is not ideal. FYI, backend isorchestrator-core==2.7.4 I think this is an issue with frontend code (either in my code or orchestrator-ui-components ) Could you help me figure out what’s causing this issue? I will also attach a screenshot from ws tab

torkashvand commented 1 month ago

Screenshot 2024-09-23 at 11 35 51

DutchBen commented 1 month ago

This is probably a backend bug so the issue is moved to the backend: https://github.com/workfloworchestrator/orchestrator-core/issues/744