How generate an intermediate throwing event programmatically

I would like to know if it is possible to programmatically generate an intermediate throwing event so any of the processes that is waiting at an intermediate caching event will be signaled?

Say I have a process that is waiting on an intermediate catching event. I know if I defined an corresponding intermediate throwing event in another process and if this throwing event is executed, the waiting process will be signaled and continue execution. However, I would be interested in just programmatically create the throwing event instead. I noticed that RuntimeService has a method called messageEventReceived. I am wondering if I call this from my Java code, would that wake up an message intermediate catching event defined in a process?

Process with

<intermediateCatchEvent id="message">
  <messageEventDefinition messageRef="newInvoice" />
</intermediateCatchEvent>

Could be signaled like that

Execution singleResult = runtimeService.createExecutionQuery().messageEventSubscriptionName("newInvoice")
				.processVariableValueEquals("saleOrder", "16/08/2023").singleResult();
//find execution wiating for event with selected variable

runtimeService.messageEventReceived("newInvoice", singleResult.getId(), Map.of("invoiceId",12121));
//signal it and forward event data

Thanks, that is exactly what I was looking for.