pipeline drop objects where string is null or empty


I’m trying to get a list of threads where using the wm.server.query:getThreadList
As I only want the threads that are not webM system related I want to drop all the elements where the “startedat” string is null or empty, this way I keep only my treads.

I’ve tried to do this with “Branch” but I din’t mange to make it work.
Can someone please provide some guide lines for this ?

Thank you.

It might be that the result of the service call is not really an IData array but some other obejct type which is just correctly displayed in Designer. But doing “Branch” on it would not work.

You can write a java service and look what object type is returned, and then get the values using getters and filter the list.

To get the user-defined thread list see below code, hope it helps.

1 wm.server.query:getThreadList
2 LOOP over threads (input array=threads, output array=threads)
2.1 BRANCH on /threads/startedat
2.1.1 /[^ ]/ (invoke pub.list:appendToDocumentList) – drop the objects (field names) which is not needed in the output.
2.1.2 $default (do nothing)

Let me know if you have any questions.