This is probably doable, but in a hacky way for the moment.
I will push your need to the product team so we have it in mind for the future.
The solution will probably be to expose you an execute workflow function via the wwLib object.
What interface will you want? Pass the id (we can display it in the dev info) or the name of the global workflow? Only global workflow or also some element workflow?
Also, looking at the html you are embedding, be careful to trust the content of the variables you are adding dynamically as it can bring to XSS attacks (eg. "><script>alert(document.domain)</script>) because you are updating the element innerHTML using the v-html directive.
All workflows are already available on the Vue store, i will just expose our internal method which take a workflowId and execute it. No script injection, just a new method on the wwLib global variable.
Great to know. Thank you, @aurelie. I just wanted to make sure that it wasn’t a definitive “This isn’t possible and likely won’t be possible for a long time.” It’s really helpful to understand how far I can push WeWeb with this sort of functionality.
As far as the interface, I was thinking it would make sense for me to to select the function by the name here and the workflowId would get added to the Custom JS (similarly to other variables are added).
Standard considerations about security apply, the most critical is: are you inserting user generated content in the html component?
If yes you should assess if this can be a problem in your specific case.
Here is an example:
A custom plugin instead can avoid this kind of problem.