In order to create a type-safe experience for working with orchestrations and activities, the Java SDK for the Durable Task Framework should support type-safe invocation of orchestration and activities.
For example, when calling an activity, instead of the following:
Object activityInput = "World";
String result = context.callActivity("SayHello", activityInput, String.class).get();
...we should be able to instead write:
MyActivities activities = // get a pointer to an activity proxy
String result = activities.sayHello("World");
We'd want the same experience also for orchestrations (created by a client) and sub-orchestrations.
Ideally this support will also allow developers to easily unit test their code.
Design considerations
Java's Proxy support could be a good starting point for such a feature.
Requirements
In order to create a type-safe experience for working with orchestrations and activities, the Java SDK for the Durable Task Framework should support type-safe invocation of orchestration and activities.
For example, when calling an activity, instead of the following:
...we should be able to instead write:
We'd want the same experience also for orchestrations (created by a client) and sub-orchestrations.
Ideally this support will also allow developers to easily unit test their code.
Design considerations
Java's Proxy support could be a good starting point for such a feature.