Hi

yes that would be really useful because catching events on new instance
creation can be really essential.

Today had a discussion with Waruna and got information on some of the data
that I tried to retrieve from events (as mentioned in my first message),and
also discussed the necessity of some data according to the requirement of
this project.

After talking with Waruna and going through all the event data retrieved, I
thought about some important events that would be really useful to be
monitored by BAM. Mainly it is necessary to find whether it is possible to
analyse events when the bpel process is being invoked by a request. As the
method onProcessInvoked() is working it is possible to track when a process
is invoked. It has to be notified whether the particular process invocation
is successful or not. May be this can be done by reading the process state
of the event, and it is still there to be tested. And there can be other
data such as process Id and the process invoked time as additional info
about the process invocation.

Then it is necessary to catch events when a new instance of the bpel process
is being created and invoked. I guess we have to check whether the new
instance creation is successful  or failed. To catch these events, just like
Milinda aiyya replied we have to make the onNewInstanceInvoked() method
working.Then from the newly created process instance all the partner
services will get invoked respectively and it is necessary to track events
of these partner services. From within the onPartnerInvoked()  method we
have to track important information like succesful partner service requests,
fault requests and partner service ID s, partnet role names ,etc to
recognize the external web services.

Another important thing is to identify which partner service belongs to
which process instance, Becasue at same time many request can come to the
same process and create many instances and they all will trigger same web
services. Once Samisa sir suggested to give an unique Actvity ID to the new
instance and for all the related partner services to the process. It is
essential to find a way to fulfill this requirement. Request suggestions.

And finally it is necessary to identify whether the created new instance
complete the process successfully or not. for that we have to identify
whether the process successfully return a respond to a client. Now it is
needed to clearly identify what are the properties that should be included
in to these events that I mentioned above, and need to clarify these
attributes against the need of BPS. Request suggestions on the Event plan.

Thank You
IsuruW



On Fri, Apr 30, 2010 at 9:59 AM, Milinda Pathirage <mili...@wso2.com> wrote:

> Please find my comments inline.
>
> On Fri, Apr 30, 2010 at 8:57 AM, Waruna Ranasinghe <war...@wso2.com>wrote:
>
>>
>>
>> On Thu, Apr 29, 2010 at 6:30 PM, Isuru Wimalasundera <isu...@wso2.com>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.
>>
>
> We can easily add onNewInstanceInvoked into BPEL engine, and we can
> differentiate between instance creation requests and other requests to a
> process using this method. We'll provide you a patch for BPS 1.1.1 for
> testing purposes.
>
>
>>
>>>
>>> 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
>>> Carbon-dev@wso2.org
>>> 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
>> Carbon-dev@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> Milinda Pathirage
> Product Manager, Business Process Server - WSO2 Inc; http://wso2.com
> Blog: http://blog.mpathirage.com
>
> Lean Enterprise Middleware
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to