I am having trouble figuring out how to call an asynchronous geoprocessing service with the new 4.0 API. I have looked at the example for calling the sychronous service, but I didn't see any examples for an asynchronous service. I understand that it requires using a "promise", which I am trying to learn to use, and it appears that I have to use "getResultImageLayer()" or "getResultImage()", but I don't understand what I would use for the parameters "resultName" and "imageParams". In the 3.x API, I had to use the URL for the MapServer of the asynchronous service along with the JobId, which would return the result as a layer. I guess I am just confused how this now works in the 4.0 API. I wish there was an example of using an asychronous service. Does anyone know of any examples?
Thanks,
Abby