Open coltmcnealy-lh opened 7 months ago
@eduwercamacaro this ticket seems simple at first but in reality I think it is the start of a long-term effort to build a wrapper over our raw GRPC API in order to improve usability. As such, we should be very careful about throwing a quick solution at it.
Update: we will leave this ticket in the "backlog" for now. That is because we already have rpc ListVariables
which fetches every variable in the WfRun
. That should solve 80% of the use-cases.
A feature request has come in from the community regarding fetching the value of
Variable
s from aWfRun
. Currently, therpc GetVariable
accepts a single variablename
and returns a singleVariable
.A feature request has come in from the community asking for the ability to fetch multiple
Variable
's in a single request. This is highly useful for applications using LittleHorse as a data store for business entities; for example, manyGET
requests need to do the equivalent of selecting a full row in a database.This ticket needs some discussion. There are many ways we could do it, I've listed them below.
Options
Pre-Set Loadable Variables in WfSpec
In this scenario, we would have something like:
We would add a field to the
ThreadVarDef
in theWfSpec
which determines whether a Variable is to be returned in the "GetVariables" response.This relates somewhat to #582
Client Specifies Variables to Fetch
In this scenario, the request would specify a list of
Variable
names to fetch. THe proto here would be more complicated, and requires some discussion.Fluent Query Builder
A long-shot feature would be to add some sort of fluent query API to the SDK's which allow something like: