Java retrieve active WF

Hi all,

is there a way that allows me to have the current active WF by taskQueue or workflowID?
I’m in a distribuited architecture and i want to call a SignalMethod of the active WF.

Thx a lot.

I’m not sure I understand the question correctly.

You don’t need to do anything special to signal a workflow by the WorkflowId. If RunId is not specified then the currently running workflow is always selected as the signal target.

hi maxim,

I need to invoke a signal through an api. not having the workflow instance, I can somehow recover the
active workflow to be able to trigger the signal on this instance?


i was successfull using this:

public void callback(@RequestParam(name = "value", required = true) Boolean value) {

it’s correct?
how can i pass the parameters?

thx a lot

I think using gRPC API directly, in this case, is not the simplest way to achieve your goal. The supported way is to use the workflow stub:

MyWorkflow stub = client.NewWorkflowStub(MyWorkflow.class, "<workflowId>");

thanks maxim, works like a charm

1 Like