Is it feasible to include a file of up to 64KB size as part of the response in the TaskCompletedOK message? The intention is to return a profile file to the user upon an OEM Action, which is saved and managed in the BMC. The idea is to attach the file as a byte string to the TaskCompletedOK message. Are there any potential challenges or considerations to be aware of in implementing this process?
Not to the message itself; that would break the usage of the TaskCompletedOK message as defined today.
However, I don't think adding it to the task messages or task itself is the right thing to do here anyway. When a client is monitoring its operation, the final response will be the operation results (NOT the completed task). In your case, it might make more sense to define a response payload for your action, so that way you're not tied to the task construct as a way of sending the information back to the user. Take a look at how "GenerateCSR" in "CertificateService" has a response payload (using ReturnType in CSDL); you should be able to leverage this modeling method for your OEM action.
That's entirely up to the service to dictate. If it's a short operation, they just hold off on sending the HTTP response until the data is ready. If it's a long operation, they use a task to track that a response isn't ready yet and is being constructed in the background.