newExternalWorkflowStub not working "Called from non workflow or workflow callback thread"

I want to send signal to another workflow, once I receive a success webhook.

var failureMonitorWorkflow = Workflow.newExternalWorkflowStub(FailureMonitorWorkflow.class, workflowId);
failureMonitorWorkflow.markSuccess(orderNumber);

This is giving me error Called from non workflow or workflow callback thread

Static methods of Workflow class can be called from the workflow code only.

Use workflow client to send signal from all other code.