ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Abes" <aa...@progress.com>
Subject RE: Usage of MockBpelServer
Date Mon, 30 Mar 2009 14:32:46 GMT
Take a look at:
org.apache.ode.bpel.iapi.MessageExchangeContext.
onMyRoleMessageExchangeStateChanged

Which is implemented in an anonymous inner class created in
createMessageExchangeContext().

You could probably override this to get the exchange and it's return
message.

HTH,
A.



> -----Original Message-----
> From: buddhika chamith [mailto:chamibuddhika@gmail.com]
> Sent: Monday, March 30, 2009 6:18 AM
> To: user@ode.apache.org
> Subject: Usage of MockBpelServer
> 
> Hi,
> 
> I am using the MockBpelServer to deploy and invoke a process. I was
able
> to
> deploy a simple synchronous helloworld process to it. But it seems the
> invoke method doesn't return anything as a form of response from the
> process.(return type is void). So I changed the method to return the
> object
> taken from the Future class which is returned from calling invoke on
> MyRoleMessageExchage. But I donot get any response from the process
> invocation in that manner. It time out when I use a time duration for
it
> to
> complete. Here is my modified invoke method. Top portion is unchanged
from
> the original method.
> 
>  public Object invoke(QName serviceName, String opName, Element body)
> throws
> Exception {
>         try {
>            // unchanged
>             Future f= mex.invoke(request);
>             mex.complete();
>             _txManager.commit();
>             return f.get(70000, TimeUnit.MILLISECONDS);
>         }catch(TimeoutException e){
>             e.printStackTrace();
>             throw new Exception();
>         }catch (Exception except) {
>               _txManager.rollback();
>               throw except;
>         }
> }
> 
> Any help in this regard is greatly appreciated. Is there a better way
to
> start the engine, deploy, invoke and get a response from a process
using
> IL
> API level interfaces?
> 
> Regards,
> Chamith

Mime
View raw message