uber-apicadence-workflowtemporal-workflow

uber cadence :: want to store an object inside a workflow


Want to store an object inside a workflow then want to receive it through cadence api.

ListOpenWorkflowExecutionsRequest listOpenWorkflowExecutionsRequest=new ListOpenWorkflowExecutionsRequest();
listOpenWorkflowExecutionsRequest.setDomain(DOMAIN);
listOpenWorkflowExecutionsRequest.setStartTimeFilter(startTimeFilter);
ListOpenWorkflowExecutionsResponse response=
        cadenceService.ListOpenWorkflowExecutions(listOpenWorkflowExecutionsRequest);*

I am open to go with any solution.


Solution

  • Use the QueryWorkflowExecution API to retrieve information from a single workflow.

    The list API is used to get lists of workflows without querying them directly. You can attach custom information (called memo) to a visibility record that is returned by a list API. Use WorkflowOptions.memo property to add it.

    The memo is not indexable. If you want the ability to index on custom attributes use the Search Attributes feature. One other feature of search attributes is that they are updatable from the workflow code using upsertSearchAttributes API. So for example, if the workflow code updates the "state" attribute on each state transition then it would be possible to find all the workflows in a given state. Also, all the search attributes are returned by the list API so their value can be shown in the UI list view even if they are not part of the search predicate. Note that this requires Elastic Search cluster integration enabled.