You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current TaskOrchestration and TaskActivity interfaces require implementations to use the context object to receive inputs. Consider the following example (copied from the integration tests):
The fetching of inputs is not type-safe because the call to ctx.getInput(String.class) could fail if the input isn't actually a string.
The call to ctx.getInput() isn't intuitive, making the programming model harder for developers to learn.
The call to ctx.complete(output) is both unintuitive and inconsistent with how activity functions are defined.
This issue tracks improving the programming model to make processing inputs and outputs more intuitive and type-safe.
Proposal
The proposal is to change these interface definitions so that a developer could write the following, simpler orchestration and activity implementations:
Background
The current
TaskOrchestration
andTaskActivity
interfaces require implementations to use the context object to receive inputs. Consider the following example (copied from the integration tests):This design, while it works, has a few issues:
ctx.getInput(String.class)
could fail if the input isn't actually a string.ctx.getInput()
isn't intuitive, making the programming model harder for developers to learn.ctx.complete(output)
is both unintuitive and inconsistent with how activity functions are defined.This issue tracks improving the programming model to make processing inputs and outputs more intuitive and type-safe.
Proposal
The proposal is to change these interface definitions so that a developer could write the following, simpler orchestration and activity implementations:
The differences are:
This results in a simpler, more intuitive programming model and is also consistent with the proposed C# programming model.
The text was updated successfully, but these errors were encountered: