Executions are not found, Job assumed on DLQ

We’re searching for an execution by the event subscription and a process variable value, but more often than not we’re getting a null result.

Execution execution = runtimeService.createExecutionQuery()
            .processVariableValueEquals("CASE_ID", "123")
            .messageEventSubscriptionName("subscription")
            .singleResult();

The assumption is that this job has somehow ended up on the DLQ, but I haven’t found a way of searching the DLQ using the information that I have at hand. I don’t have the process instance IDs available. Any ideas how I can search for just one specific job, so that it can be moved across for processing?

Hi jb-pc,

I would need more detailed description. When you are getting null → there is no execution waiting on the message.
If job fails (by default 3x) is moved to DeadLetterQueue. If you want to search for something:

  1. use implemented queries,
  2. implement native queries,
  3. use custom mappings

Regards
Martin

Hi Martin,

What more detail do you need? I’m not sure why there is no execution waiting on the message, there should be, and a few do proceed to the next stage when using the same code. Can I search using the process variables?

Thanks,
JB

The best would be if you can create a jUnit test to reproduce your issue.
Regards
Martin

Hi Martin,

I can’t reproduce the issue - I’m trying to find out why my execution is null, and how I can search the DLQ. Have you got some documentation for either of those?

Thanks,
JB