Runtime Events and Business Service – Case Study

As I have stated in some of my earlier posts how the combination of Business Service and Runtime events has bailed us out of trouble number of times. I believe we can resolve almost all issues using runtime events and client side business service.

I will be sharing with you different situations in which we used this combination to resolve post production issues.

Requirement:

Our application had lot of scripting on PreCanInvoke events to disable or enable the button based on certain conditions which was proving to be a major performance issue. So, to resolve it we moved the code to PreInvoke event so that the code is only executed when the button is clicked.

In simple language the button would now be enable all the time and when somebody clicks it only then those conditions will be evaluated otherwise the error message will be displayed.

Problem:

One of our developers did the code move as there was no error message prior to that(button would just be disable), developer just wrote an error message what according to him was appropriate to the functionality in question. Just 2 days before we had to move the code client came to us saying that error message is not appropriate and we need to change it.

We had already had freezed the code so we could not go and change it in SRF 🙁 .

Solution:

We wrote a client side business service which would do appropriate RaiseErrorText expected by client and then we setup a runtime event on the invoke method of that button and called the newly created business service which resulted in appropriate error message to be displayed and we change it in SRF in the next release 🙂 .

There are lot more examples where we used same combination to iron out the errors. Will share them in some of my next posts.

2 Responses to Runtime Events and Business Service – Case Study

  1. You wrote the script which throws the error on PreInvoke – Right ? Now that code is freezed.It will somehow fire. And will do Cancel Operation immediately.
    You people did not change the code and instead wrote the BS which will be invoked via Run Time events on ‘Invoke’ Method.

    Just a questions, after PreInvoke throws the Error , will it move to Invoke Method ? I dont think so ? Also if it will go then it will be only after showing first error of PreInvoke and Then for Invoke i.e the invoked via BS

  2. You wrote the script which throws the error on PreInvoke – Right ? Now that code is freezed.It will somehow fire. And will do Cancel Operation immediately.
    You people did not change the code and instead wrote the BS which will be invoked via Run Time events on ‘Invoke’ Method.

    Just a questions, after PreInvoke throws the Error , will it move to Invoke Method ? I dont think so ? Also if it will go then it will be only after showing first error of PreInvoke and Then for Invoke i.e the invoked via BS

Leave a Reply

Contribute