Is it possible to do it? Yes, everything is possible. It depends on how much effort you want to put into it as there are different options.
If you’re looking for an almost pure Flow option, then I’m assuming you’re using the services under WmRoot/wm.server.ns.dependency, yes? If so, then first a standard disclaimer: these are not meant for public use so use them at your own risk.
Now, if you’re interested in finding services that invoke pub.flow:debugLog, why not use wm.server.ns.dependency:getDependent instead of :getReferences? If you call :getDependent and pass in node = ‘pub.flow:debugLog’, it will return a document list called referencedBy that has a list of all the nodes that invoke pub.flow:debugLog. Not only that, inside referencedBy, you will find a string list called paths, which is the unique path to the pub.flow:debugLog invocation inside that service. You can loop over referencedBy, extract just the node name from referencedBy.name (i.e. remove the package name from it) and have an inner loop that loops over paths: for each node and path, call wm.server.ns.dependency:getPathNodes and it will give you the details of that invocation.
Here’s the tricky thing though and why I said “almost pure Flow option”: nodeList returned by getPathNodes is not really a document list. In your case, it will be an object of type com.wm.lang.flow.FlowInvoke so parsing that function name automatically might be tricky with pure Flow. At this point, you may want to pass the object to a Java service to extract the information you want out of the FlowInvoke object.
If you’re not interested in a pure Flow implementation, your other option is to just write a Java service from the get-go that does all the things we’ve talked about so far. As you can imagine, all of the WmRoot Java services are calling Java methods in the background so nothing prevents you from calling them yourself as long as you understand they are not supported.
Last but not least: if you’re not interested in messing with undocumented APIs and you’re comfortable writing shell scripts, you could write a bash or Powershell script that loops over all flow.xml files in your packages, looking for an INVOKE tag where the attribute SERVICE equals pub.flow:debugLog. Then, inside that INVOKE tag, you’re looking for a MAP/MAPSET element that sets the function field. Here’s a potential XPath to get you that element:
Hope this helps,