I've tried setting the output parameter to raster dataset, which does generate a TIFF in the scratch workspace (for example http://xxxxxx:6080/arcgis/rest/directories/arcgisjobs/createrandomraster_gpserver/j20ddb907be1d4404944bd4ec26871851/scratch/RandomRaster.tif), but I can't work out how to use this url to create a layer that can be added to the map. A number of the layer constructors take a url, but none of them display the layer on my map.
I've also tried setting the tool output to raster layer, which displays on the web map ok, but doesn't work as an input to the second tool.
Any ideas? This discussion seems to cover the same area, but no-one has come up with the answer yet.