It's a beautiful thing to have Dynatrace calling the REST API of AWX to make things happen, but Dynatrace does not do asynchronous calls. It cannot delay anything, so the /launch call returns from AWX in millis and gets marked a success in Dynatrace without regard to whether the job succeeded or not.
I can make Dynatrace parse the job number from the /launch and call back to get the status of the job, but 30ms later, the job is always running (or pending or something). I cannot make Dynatrace wait the necessary 4+ seconds for a result. We've built wait loops in OpenShift and Powershell for this, but I cannot build a wait loop into Dynatrace since it's all JavaScript (without the Promise/await options).
I see no way to do this, except to build an external service that proxies the launch of the AWX job and blocks until finished. Am I missing something? It sure seems like a service option more than one person would value. I know I don't relish maintaining a second web site to call AWX, but I know my customers would LOVE not having to do the whole parse and wait loop.