Currently, when the "Future Requests" show button is clicked, it initiates the workflow simulation engine to figure out where the document will route in the future.
The issue with this is that this simulation executes on the standalone server. If the document against which we are running the simulation has a document type that has a "service namespace" that represents one of the embedded client applications (i.e. KFS, etc.) then we really want the simulation to execute within the embedded engine on that embedded client application. To that end, we should use the service bus to call back into the appropriate client application for the execution of this simulation.
If you look at SuperUserAction you can see an example of how we are doing this with the WorkflowDocumentActions service. We want to do the same thing in the RouteLogAction but for the WorkflowUtilityService.
One issue here though, we are using the SimulationEngine directly inside of the RouteLogAction. Instead what we will want to do is use the WorkflowUtilityService.routingReport method. Unfortunately, this method is a little bit wierd as it takes the simulated action requests and appends them onto the DocumentRouteHeaderValue object's action requests prior to generating the DocumentDetailDTO to return. The result of this is that the action requests which are generated end up getting interleaved on the DocumentDetailDTO with the non-generated ones. You can figure out which ones are generated by checking if the action request ID is a negative number.
Also, DocumentDetailDTO has a collection of ActionRequestDTO objects where the Route Log is expecting to display ActionRequestValue objects. So some conversion needs to come into play here. To make it further complicated, Action Requests in KEW are arranged in a hierarchical fashion which is used to model roles and delegations. So the conversion from ActionRequestDTO to ActionRequestValue will need to take that into consideration.
Also, it would be great if we could write some unit tests to test this aspect of WorkflowUtility.routingReport and also the conversion of ActionRequestDTOs into a proper hierarchical ActionRequest graph.