rather than the approach you can use with the flow framework:
promisedActivities.myActivity( myPromise )
so passing the promise directly. In the above example promisedActivities could be a (caller for an) interface generated based on the regular activities interface but with all parameters wrapped in a promise (as with the methods generated by the flow framework via APT):
With Groovy, generation of the interface could be done via AST so would not require any special configuration and would be opt-in (via annotation). To invoke there would be a modification/variation of AsyncCaller that did not wrap parameters with promises.
It seems beneficial to allow passing promises from workflows, but I'm not sure if this fits with the motivations for glisten (or if this functionality is not necessary for some reason)
It is not currently possible (out of the box) to pass a promise to an activity from a workflow with glisten. Currently you would use something like:
rather than the approach you can use with the flow framework:
so passing the promise directly. In the above example promisedActivities could be a (caller for an) interface generated based on the regular activities interface but with all parameters wrapped in a promise (as with the methods generated by the flow framework via APT):
With Groovy, generation of the interface could be done via AST so would not require any special configuration and would be opt-in (via annotation). To invoke there would be a modification/variation of AsyncCaller that did not wrap parameters with promises.
It seems beneficial to allow passing promises from workflows, but I'm not sure if this fits with the motivations for glisten (or if this functionality is not necessary for some reason)