Send message for all active process

thanks for your reply.@ Miklas
The fact is that I need to send my parameters to each process, and they will either output or create a task, so the signal does not fit.

In my version, everything is ok, only I need to find all the instances that are waiting for the message.
It was verified empirically that if there are 2 processes waiting for one message, then my script works, because in it I send a message to each specific process separately.

Search Example:
var processInstancesList = rs.createProcessInstanceQuery().active().processDefinitionKey(“ApplicationApprove”).list()

How can I fix it to find processes waiting for my message?