Quotes for this week
March 6th, 2006Three grand essentials to happiness in this life are:
* Something to do,
* Something to love, and
* Something to hope for. - Joseph Addison
The secret source of humor
itself is not joy, but sorrow.
There is no humor in heave. - Mark Twain
A life spent making mistakes
is not only more honorable
but more useful than a life
spent in doing nothing. - George Bernard Shaw
You will never be happy
Is you continue to search for
What happiness consists of.
You will never live if you are
Looking for the meaning of life. - Albert Camus
How to see Business Event Parameters
March 1st, 2006Business Event mechanism provided by Oracle Workflow is a very good tool for customization and to add new business functionality on a particular event. (Mostly asynchronous)
But while coding a subscription function, having event name is not sufficient. Sometimes you will require more parameters to handle the event in a proper way.
For example, you want to use delete or update event of a record and in such cases sometimes it is not possible to fetch older data based on event name or primary key. Using event parameters, code, which raised the event, can pass older data, which may be useful for event subscription.
Following basic code snippet shows, how we can check all the parameters passed with the event.
procedure log_me (t varchar2) IS pragma autonomous_transaction; <br />begin <br /> insert into my_log_table values(t); <br /> commit; <br />
end;<br /><br />function update_asgn (p_subscription_guid in raw, <br /> p_event in out WF_EVENT_T) return varchar2 is<br /> <br /> l_wf_parameter_list_t wf_parameter_list_t;<br /> i number := 1;<br /> c number;<br /> l_key varchar2(30);<br /> l_val varchar2(2000);<br />begin<br /> l_wf_parameter_list_t := p_event.getParameterList();<br /> c := l_wf_parameter_list_t.count();<br /> <br /> log_me('event = ' || p_event.getEventName());<br /> log_me('count : ' || c);<br /> <br /> while (i<=c) <br /> loop<br /> <br /> l_key := l_wf_parameter_list_t(i).getName();<br /> l_val := l_wf_parameter_list_t(i).getValue();<br /> <br /> log_me(l_key || '=' || l_val);<br /> <br /> i := i + 1;<br /> end loop;<br /> <br /> return 'SUCCESS';<br /> exception<br /> when others then <br /> log_me('errm' || sqlerrm);<br />end;
Here wf_parameter_list_t is a varray. For more information on API please refer Oracle Workflow API Reference
Most important thing is, you can check same at WF_DEFERRED queue log from Oracle Application Manager -> Workflow Manger without writing any code!
Njoy,
Hardik Tank
Struts action mappings
March 1st, 2006This article discusses different combinations of a Struts action class and a form bean and how these combinations can be used.
Struts action mappings By Michael Jouravlev
- Hardik Tank

Posted by Hardik