There is no need to say “I have been really busy these past few days” the inactivity from site says it all but I am back (just for a while though). Few days back I laid the foundation of the framework in my project by extending the date object and adding some cool functions like
format: Allows you format a date object in any way you want for example after declaring a date object (var cDate = new Date();) I can do this
cDate.format(“mm/dd – yyyy”) : returns 12/17 – 2010
cDate.format(“dddd – yy mmmm”) : returns Friday – 10 December
cDate.format(“mmm ddd yyyy”) : returns Dec Fri 2010
addWorkingDays: Add week days (ignore saturday and sunday) to a given date (doesn’t cater to holidays) .
getDaysBetween: returns number of days between two dates.
But this post is not about the details of the framework.It is about the problems I faced while trying to use it in workflows and BS executed in asynchronous manner. Here is what happened
These functions were defined in a business service that was instantiated on Application Start method. Everything worked fine when these functions were invoked through object manager as part of user session but if I tried to use these functions in business services that were invoked in Asynchronous workflow it gave an error
“Error invoking function format : function not defined”
It took me a while before I figured out the reason for this behavior. What I found was that our workflow process manager component was pointing to “siebel.cfg” (used for Siebel Sales Enterprise Application) where as our Object Manager was pointing to “fins.cfg” (used for Siebel Financial Services Application).
When we submit a workflow process request to server as job (using Asynchronous Server Request BS) Object manger doesn’t come into the picture and parameters defined at Workflow Process Manager Component are used. So, in this case it was using Siebel Sales Enterprise Application Objectand therefore not able to find our functions as they were defined in Siebel Financial Services Application Object. To have a better understanding of what I am talking about I would suggest going through the following post on Siebel Mantra.
Solution in this case was as easy as going to the Workflow Process Manager Component and change the “OM – Configuration File” parameter to use fins.cfg instead of siebel.cfg.
Do you think it was this easy. Guess what, it was not as easy it sounds, there is a twist in a tale 🙂 my Asynchronous troubles are just starting. Stay tuned in next post I will divulge the details my actual Asynchronous troubles (don’t worry you will not have to wait long for the next post)