hi , the problem is the String returned from launch(i think)...
you can't use this for retrive an item...
try this
... ...
String wsid = workSession.launch("mainEngine", li);
StringTokenizer tok=new StringTokenizer(wsid);
//recupera wfid dalla stringa ritornata...
for (int i = 0; i < 8; i++) {
String tmp=tok.nextToken();
if (i==7)
wsid=tmp;
}
while(true)
{
if( /* test */ )
{
InFlowWorkItem wi = workSession.get("Store.bravo", wsid); //
this line throws WorkListException
}
}
... ...
if there is a best method, please make me know.
sorry for my english.
andrea
PS
what do you mean for
-----------
then poll the engine for status and if the status response
(from the "Status" service) says that there is a workitem in
"Store.bravo"
------------
?
tanks
2007/5/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
> Hi,
>
> I'm using OpenWFE 1.7.2 and I've faced the following problem. Let's
> suppose that I have two instances of one workflow currently running.
> Those two instances keep their workitems in one store, say
> "Store.bravo". From my client java app first I launch one of the
> workflows, then poll the engine for status and if the status response
> (from the "Status" service) says that there is a workitem in
> "Store.bravo", I want to grab it and process in my app. The code is
> like:
>
> WorkSessionServer sessionServer =
> (WorkSessionServer)Naming.lookup(worklistURL);
> WorkSession workSession = (WorkSession)sessionServer.login("admin",
> "admin");
>
> LaunchItem li = new LaunchItem();
> li.setWorkflowDefinitionUrl(engineURL + workflowName);
> String wsid = workSession.launch("mainEngine", li);
>
> while(true)
> {
> if( /* test */ )
> {
> InFlowWorkItem wi = workSession.get("Store.bravo", wsid); //
> this line throws WorkListException
> }
> }
>
> What am I doing wrong? How should I tell the engine to retrieve the
> workitem that belongs to "my" workflow, i.e. the one launched and
> identified by wsid? The workflow itself launches without any problem.
>
> Thanks,
> Bart
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenWFE users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/openwfe-users?hl=en
-~----------~----~----~----~------~----~------~--~---