Yes, you can publish this tool so it can reconcile versions that are created dynamically. You need to add a couple other tools to the model though. Most of the tool parameters can/should be model parameters, this will give you the most flexibility.
- You should not use a parameter for the sde connection since this will be a connection on the server.
- The parent version can be a model parameter. If you will always be using default as the parent, then no special handling is required since this will always be in the choice list for the gp service. If you want to specify a version that does not exist yet, use the Collect Values tool as described in point 3.
- For the edit version(s), you can add a "Collect Values" (Model only tool), set this tool to accept a model parameter collection of string values and direct the output to the Reconcile Versions Edit Versions parameter. The Collect Values tool will separate the parameter from the Reconcile Versions tool and allow you to send whatever value(s) you want to the tool.
- Acquire Locks, Abort On Conflict, Conflict Detection, Post and Delete can/should all be model parameters.
- Optionally create a log file, you can just provide a name and ArcGIS Server will automatically put this in scratch space. If you then use a Python script to read this file, you can return the contents of the log in the tool messages as output so the calling application can get the results.
Graphically, it might look like this:
The ReadFile script might look something like this:
# Import arcpy module
# Script arguments
theFile = arcpy.GetParameterAsText(0)
if theFile == '#' or not theFile:
theFile = "LogFile.txt" # provide a default value if unspecified
with open(theFile) as f:
content = f.readlines()
Finally, in the Catalog tree, select the ReadFile script and add the 2 parameters ("theFile", File, Required, Input, Not Multivalue; and "content", String, Derived, Output, Multivalue).