How does one execute a microflow by microflowname?
The question used to be very different, but came down to: "I have this generic microflow that calls three specific microflows that are different in each case and it would be nice if I would just be able to pass down the names of these microflows to the generic one, which would then execute them." So as an immediate response of one of the comments "What exactly are you doing, and why are you using ExecuteMicroflowAsUser?" Here is why I needed to call a Microflow based on string name: I have the following microflows: TestObjectX, TestObjectY, TestObjectZ...etc. For each object I have made at least three microflows per TestMicroflow, namely CreateObject(X), EditObject(X), DeleteObject(X), as the creation and editing procedure of different objecttype are often (slightly) different as well. The solution in mind was to somehow have TestObjectX generate the name of ObjectX, call a generic microflow CRUD, which in turn calls the three object-specific CRUD microflows (Create, Edit, Delete). The problem was, I only knew of CommunityCommons that has Java action calls that execute microflows, but they do so by user. So when I tried using the ExecuteMicroflowAsUser Action Call, a new browser opened and the Selenium action I wanted to run could then no longer be executed, because I was no longer on the same screen.
Thus I had to make my own java action where Core.execute() did the trick.