I know Elsa is mainly used for background task workflow, and the built-in in activities doesn't support page navigation, but can I theoretically use the custom activities to do so? As in, create a custom activity that can take parameters for a razor page(view data, model) and maybe render the page, or redirect to a given URL?
Yes, Elsa is designed to be usable for screen navigation just as well as for background tasks.
A good way to use it might be to implement an ASP.NET middleware component that invokes a given workflow, where the workflow might consist of (custom) activities that read any inbound form post data and determine the next URL to redirect to.
It could even have custom activities that allows you to select a given Razor page and have it render it and sent to the HTTP response.
And last but not least: you could implement a custom activity type provider that dynamically provides activity types to the system based on e.g. the Razor pages you have in your application.
For example, let's say you have these Razor pages:
The custom activity type provider might then produce the following activities:
Obviously, you'll need to figure out how to discover these pages, and maybe introduce a custom attribute in case you want to associate your pages with some settings that the activity type provider might use to further configure the activity types, but as you can see, this can produce a set of activities that make it easy to control displaying pages from a workflow.
Similarly, it could be used in a Blazor application.
Your question has inspired me to create a roadmap item to include activities that help implement these kind of scenarios for Elsa 3 - thank you :D