On Thu, Apr 29, 2010 at 6:30 PM, Isuru Wimalasundera <[email protected]>wrote:
> Hi ,
>
> As I am working in the project Monitoring* *a BPEL process on WSO2 BPS by
> using WSO2 BAM, I was on finalizing the set of Events that is needed to
> monitored by BAM. Mainly as identified it is necessary to identify when a
> BPEL process get invoked and the number of times it got invoked. And also it
> is necessary to identify how the partner services get invoked, in which
> occasions does they get invoked and also maybe the number of times each
> service get invoked. And also just like Milinda mentioned to me it is also
> necessary to identify when the process get complete and whether it is
> successfully responded to the client call.
>
> ApacheODE provides and interface called MessageExchangeInteceptor which
> contains four main methoda called ;
>
> 1. onBpelServerInvoked()
> 2. onProcessInvoked()
> 3. onNewInstanceInvoked()
> 4. onPartnerInvoked()
>
> A test event observer class has been written extending the
> MessageExchangeInteceptor interface and was able to run and identify what
> are the events that get triggered against a bpel process which contains
> several partner services. It was evident to me that the onProcessInvoked()
> method and onPartnerInvoked() methods are responding well and caught events
> whenever a bpel process got invoked and each time a partner service got
> invoked. But the onBpelServerInvoked() and onNewInstanceInvoked() methods
> were not working and I have informed it to the BPS team. But still the
> MessageExchangeInteceptor has been able to answer some of the event
> requiremnets. Today I was trying to retrieve more useful data from the
> events that get caught by the onProcessInvoked() method and the
> onPartnerInvoked() method, and found some very important data can be
> retrieved . But there were some data that couldn't get retrieved as they
> thrown Null pointer exceptions and couldn't continue running the bpel
> process.
>
Yes, there are some issues with onBpelServerInvoked and onNewInstanceInvoked
methods, but I think, other two methods provide all the data that is
required.
>
> both the onProcessInvoked() and onPartnerInvoked() methods take
> MessageExchangeInterceptor.InterceptorEvent object as a parameter
> (InteceptorEvent is another static interface within the
> MessageExchangeInteceptor) and can retrieve data from this object under four
> main methods which are
>
> 1. org.apache.ode.bpel.dao.BpelDAOConnection getConnection()
> 2. org.apache.ode.bpel.dao.ProcessDAO getProcessDAO()
> 3. org.apache.ode.bpel.iapi.ProcessConf getProcessConf()
> 4. org.apache.ode.bpel.dao.MessageExchangeDAO()
>
> under the onProcessInvoked() method I have successfully been able to
> retrieve data for method calls such as...
>
> System.out.println("onProcessInvoked: " +
> ic.getProcessConf().getProcessId().toString());
> ("Time: "+ic.getMessageExchangeDAO().getCreateTime().toString());
> ("Type: "+ic.getProcessDAO().getType().toString());
> ("Version: "+ic.getProcessDAO().getVersion());
> ("Process ID: "+ic.getProcessDAO().getProcessId().toString());
> ("Num of Instances: "+ic.getProcessDAO().getNumInstances());
> ("processState : "+ic.getProcessConf().getState().toString());
>
> and found throwing Null Pointer Exceptions to data retrival such as ....
> //System.out.println("Callee:
> "+ic.getMessageExchangeDAO().getCallee().toString());
> ("Channel: "+ic.getMessageExchangeDAO().getChannel());
> ("EPR: "+ic.getMessageExchangeDAO().getEPR().getBaseURI());
> ("PartnerLinkModelID:
> "+ic.getMessageExchangeDAO().getPartnerLinkModelId());
> ("Request data:
> "+ic.getMessageExchangeDAO().getRequest().getData().getNodeValue());
> ("PartnerLink EPR:
> "+ic.getMessageExchangeDAO().getPartnerLink().getMyEPR().getBaseURI());
Lets look into these and figure out a solution
>
>
> under the onPartnerInvoked() method it had been able to retrieve data from
> method calls such as given below.
> System.out.println("onPartnerInvoked: " +
> ic.getProcessConf().getProcessId().toString());
> ("Time: "+ic.getMessageExchangeDAO().getCreateTime().toString());
> ("PartnerLinkModelID:
> "+ic.getMessageExchangeDAO().getPartnerLinkModelId());
> ("PartnerLink MySessionId:
> "+ic.getMessageExchangeDAO().getPartnerLink().getMySessionId());
>
> and found throwing Null Pointer Exceptions to data retrival such as ....
> //System.out.println("Request data:
> "+ic.getMessageExchangeDAO().getRequest().getData().getNodeValue());
> ("PartnerLink EPR:
> "+ic.getMessageExchangeDAO().getPartnerLink().getMyEPR().getBaseURI());
> ("PartnerLink RoleName:
> "+ic.getMessageExchangeDAO().getPartnerLink().getMyRoleName());
getMyRoleName is not available for all the partnerlinks.
Thanks,
Waruna
>
> ("PartnerLink RoleServiceName:
> "+ic.getMessageExchangeDAO().getPartnerLink().getMyRoleServiceName().toString());
> ("PartnerLink PartnerRoleName:
> "+ic.getMessageExchangeDAO().getPartnerLink().getPartnerRoleName()
>
> I found some of these failed data can be really useful when monitoring a
> bpel process and I would like the bps team to take a look on this and find
> if there is a way whether I can retrieve these data, and please give your
> kind consideration on checking the necessity of these data for the projects.
> And also I believe that there can be more important other data that may be
> we can generate with in these methods to monitor a bpel process in an
> interactive way. Request suggestions.
>
> Thank You
> IsuruW
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
--
-------------------------------------------------------------------------
Waruna Ranasinghe
Software Engineer, WSO2
Mobile: +94 724 318285
BLOG: http://warunapw.blogspot.com
www.wso2.com - "Lean . Enterprise . Middleware"
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev