Re: Get the list of processes started by a specific user
"Sasa Bojanic" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <01b601c57727$e39882a0$1200a8c0@bobrock> |
Hi,
try to change expression as follows:
iter.set_query_expression("requesterId!=null && requesterId.equals(\"" + login + "\")");
or use RequesterIteratorExpressionBuilder to create your expression.
Regards,
Sasa.
----- Original Message -----
From: "Jffdsaklj dsjk" <[email protected]>
To: <[email protected]>
Sent: Tuesday, June 21, 2005 9:04 AM
Subject: [shark] Get the list of processes started by a specific user
I want to get the list of processes started by a specific user
(requester). This is the code:
String login = "admin";
WfProcessMgr processMgr;
...
WfProcessIterator iter = processMgr.get_iterator_process();
iter.set_query_expression("requesterId.equals(\"" + login + "\")");
WfProcess[] processes = iter.get_next_n_sequence(0);
The last instruction rises an exception:
2005-06-21 08:55:08,640: BshEvaluator -> The result of expression
requesterId.equals("admin") can't be evaluated - error message=Sourced
file: <Inline eval of:requesterId.equals("admin"); > : Null Pointer in
Method Invocation
On the other hand, if I remove the "set_query_expression" instruction,
there's no exception. Even, if I change the query expression:
"state.equals(...)" there's no exception.
I'm using the last version of engine and API: shark1.1.
What's the problem?
--------------------------------------------------------------------------------
>
> --
> You receive this message as a subscriber of the [email protected] mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
message.footer
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws