Avatar

Level 1

I'm also interrested on the solution. I have to find all process instances for a given serviceName having a given valriable to a defined value.

The API seams to ansmwer, but in fact, the function procesSearch never find any process, probably because of the fact that no user are participating to the searched process.

In an old pos, I have found a solution based on POF api. Does this api exit for ADEP - 10.0.1?

Searching for a task, the property filter.setAdminIgnoreAllAcls(true); does the work. But this property does not exists in ProcessSearchFilter...

Thanks

Used code for info:

     ServiceConnectionHelper connHelper = new ServiceConnectionHelper(

        livecycleServerAddress, userName, password);

    TaskManagerQueryService queryService = connHelper

        .getTaskManagerQueryService();

    // Yet, we are building the process search on the variable

    ProcessSearchFilter pSearch = new ProcessSearchFilter();

    pSearch.setServiceName(processName);

    pSearch.addCondition("procVar." + variableName, Operator.CONTAINS,

        variableValue);

    List<ProcessInstanceRow> allProcesses = queryService

        .processSearch(pSearch);

    List<ProcessInstanceRow> toReturn = new ArrayList<ProcessInstanceRow>();

    for (ProcessInstanceRow row : allProcesses) {

        if (row.getProcessInstanceStatus() == ProcessInstanceRow.STATUS_RUNNING) {

        toReturn.add(row);

        }

    }

Denis