This PR adds intent composition feature. It allows, from an intent service, to request another intent. As this intent have to be handled by the intent client, due to X-Frame-Options limitations, it has been named Intent Composition.
The client handle this message, start a new intent and hides the current one
Once the intent is resolve, it passes the result to the first intent, via a message to the service
The service is resolved.
This process can be chained indefinitely.
Refactoring
I managed to refactor a little bit the code. What I had in mind was more modular and more clear than the actual result. I am not satisfied by the client part. But the code related to the composition is actually relatively simple and clear. I plan to improve the whole intent code base in the future.
This PR adds intent composition feature. It allows, from an intent service, to request another intent. As this intent have to be handled by the intent client, due to
X-Frame-Options
limitations, it has been named Intent Composition.An intent composition can be called this way:
What happens internally:
compose
message to the clientThis process can be chained indefinitely.
Refactoring
I managed to refactor a little bit the code. What I had in mind was more modular and more clear than the actual result. I am not satisfied by the client part. But the code related to the composition is actually relatively simple and clear. I plan to improve the whole intent code base in the future.