Open Nekrosis1 opened 4 months ago
Based on the information provided, it seems like there might be an issue with the state management or routing within the Elsa Studio when it is wrapped inside your own Blazor client application. The behavior you're experiencing suggests that the application is not handling the navigation to the custom activity definition correctly, especially since a page refresh leads to a 404 error.
Here are some steps you can take to troubleshoot and potentially resolve the issue:
Check the Console for Errors: Open the browser's developer tools and check the console for any JavaScript errors that might indicate what's going wrong when you click the link.
Review Blazor Navigation: Ensure that the Blazor routing is set up correctly in your application. Blazor uses a Router component to load the correct component for the current URL. There might be a conflict between Elsa Studio's routing and your application's routing.
State Management: Investigate how state is managed between page navigations in your Blazor application. It's possible that the state is not being preserved correctly when navigating to the custom activity definition.
Elsa Studio Updates: Check if there are any updates to Elsa Studio that address this issue. It's possible that this is a known bug that has been fixed in a newer version.
Elsa Studio Integration: Review the integration code for Elsa Studio within your Blazor application. There might be specific requirements or configurations needed for Elsa Studio to function correctly when embedded.
Elsa Community and Support: If the issue persists, consider reaching out to the Elsa community or support channels. You can create an issue on the Elsa GitHub repository or ask a question on Stack Overflow with the elsa-workflows
tag.
Fallback to Direct Links: As a temporary workaround, you might consider using direct links to the workflow definitions instead of relying on the in-app navigation.
Debugging: Use Blazor's debugging capabilities to step through the code and see where the navigation is failing.
Given that the issue seems to be specific to the integration of Elsa Studio within your Blazor application, it's important to focus on the interaction between the two and how the Blazor app is handling the routing and state management.
If you have already tried some of these troubleshooting steps, please provide additional details so that further assistance can be given.
This comment was generated by Glime.
Description
When Clicking on the link to a workflow that is used as an activity in a workflow (custom activity), the link, despite pointing to the correct URL, does not work. When forcing a page refresh (F5 / Ctrl+F5), the page displays a 404 error and cannot recover, despite the link being verifiably correct. The GET requests to elsa/api resolve successfully and the response is correct (JSON of the desired definition).
When looking at instances, there is a link to the definition of the workflow, this link does basically the same thing and works.
Steps to Reproduce
Screenshots
Expected Behavior
Studio editor displays the custom activity.
Actual Behavior
URL in address bar changes, page is not updated. page refresh (F5 / Ctrl+F5) results in 404, client seems to crash.
Environment
Log Output
Browser Console, Server Console and Network Tab do not display any errors.
Troubleshooting Attempts
Looking at the requests, pages and links, everything seems fine. There seems to be some sort of render issue, where the context gets lost and/or the editor does not change state properly. Opening a link, refreshing the page and going back to the previous page results in another 404, only complete reloading of the app leads to recovery.
Additional Context
We use Elsa Studio wrapper inside our own Blazor client app. (WorkflowDefinitionEditor)