How to get process instance list. on BProc 1.0.2

Hi, I’m using commercial BProc

And I need to get all process instances of process by process id and business key.

In my service I injected BprocHistoricService

and when
there is error

Method threw 'java.lang.ClassCastException' exception. Cannot evaluate com.sun.proxy.$Proxy259.toString()



I just tried to invoke the method you’ve provided, and it works fine.

Are you sure that you invoke exactly the same code that you wrote here


and not something like



I see the toString() method invocation on the screenshot you provided.

Hi, yes. This is sample of code from service in project

Error is on invocation createHistoricProcessInstanceDataQuery()

But does it fail? Does the application stop working after that line? Are there any errors in the app.log? Can you reach the next line of code while debugging?
You screenshot tells that “Evaluate expression” dialog tries invoke the toString() of the Proxy object and this “toString()” invocation fails.

When test I run service method from test and its fails.
When I run app and invoked this method from Service Task of process now process run as expected. I received number of process instances.

I think problem with MainTestContainer init. How I can solve this problem?

Here is a sample that includes a test invoking BProc API: (91.4 KB)

The test file is

Pay an attention to the modifications in the SampleTestContainer. The process engine must be initialized explicitly.

There is a line:


in the method:

        public void before() throws Throwable {
            if (!initialized) {
                initialized = true;

Tested, this works ok!