Adversity
February 12th, 2006
Adversity cause some men to break;
others to break records.
- William A Ward
So, where do I stand?
Adversity cause some men to break;
others to break records.
- William A Ward
So, where do I stand?
How to Start a Workflow Process from PL/SQL block
You can call the Workflow Engine APIs to initiate a workflow process through the CreateProcess and StartProcess APIs if you want to perform additional tasks, such as setting item attributes, after creating and before starting the process. If you do not need to perform any additional tasks, you can use the LaunchProcess API, which is a wrapper combining the CreateProcess and StartProcess APIs.
The procedure that executes the Workflow Engine APIs to initiate a process must identify the item type and item key of the process for these APIs. The item type and item key passed to these APIs uniquely identify an item and must be passed to subsequent API calls for each specific process. The process must begin with the standard Start activity or with another function, notification, or process activity, marked as a Start activity node.
Oracle Workflow also includes a Launch Processes Web page for manually initiating workflow processes. The Launch Processes link is available from the Workflow home page in standalone Oracle Workflow or from a workflow administrator responsibility in embedded Oracle Workflow. It is intended for use by the workflow administrator to test workflow processes in a development environment.
For more information, refer to the Workflow Engine APIs chapter in the Oracle Workflow API Reference
Example:
The following example shows how to initiate a process using the CreateProcess,
SetItemUserKey, SetItemAttribute, SetItemOwner, and StartProcess APIs.
function test_wf_calling ()<br /> l_itemtype varchar2(15);<br /> l_itemkey varchar2(15); -- some unique key<br />begin<br /> <br /> l_itemtype := 'NEW_TASK'; <br /> <br /> -- code to have some unique key for this process instance<br /> l_itemkey := 'something'; <br /> <br /> -- which process of the workflow you want to start?<br /> wf_engine.CreateProcess ( ItemType => l_itemtype, <br /> ItemKey => l_itemkey,<br /> Process => 'MAIN_PROCESS');<br /> <br /> -- set user key<br /> wf_engine.SetItemUserKey ( ItemType => l_itemtype,<br /> ItemKey => l_itemkey,<br /> UserKey => ItemUserKey);<br /> -- set owner<br /> wf_engine.SetItemOwner ( itemtype => l_itemtype,<br /> itemkey => l_itemkey,<br /> owner => 'HARDIK' );<br /> <br /> -- Initialize item attributes <br /> -- Text Attribute<br /> wf_engine.setItemAttrText(itemtype => l_itemtype,<br /> itemkey => l_itemkey,<br /> aname => 'RESOURCE',<br /> avalue => 'HARDIK');<br /><br /> -- Date Attribute <br /> wf_engine.setItemAttrDate(itemtype => l_itemtype,<br /> itemkey => l_itemkey,<br /> aname => 'START_DATE',<br /> avalue => '23-Sep-1981');<br /> <br /> -- Now start the process <br /> wf_engine.startprocess(itemtype => l_itemtype,<br /> itemkey => l_itemkey);<br /> <br />end;
Stay tuned for more detailed example…
Two men, both seriously ill, occupied the same hospital room. One man was allowed to sit up in his bed for an hour each afternoon to help drain the fluid from his lungs. His bed was next to the room’s only window. The other man had to spend all his time flat on his back. The men talked for hours on end. They spoke of their wives and families, their homes, their jobs, their involvement in the military service, where they had been on vacation.
Every afternoon when the man in the bed by the window could sit up, he would pass the time by describing to his roommate all the things he could see outside the window. The man in the other bed began to live for those one-hour periods where his world would be broadened and enlivened by all the activity and color of the world outside.
The window overlooked a park with a lovely lake. Ducks and swans played on the water while children sailed their model boats. Young lovers walked arm in arm amidst flowers of every color and a fine view of the city skyline could be seen in the distance.
As the man by the window described all this in exquisite detail, the man on the other side of the room would close his eyes and imagine the picturesque scene. One warm afternoon the man by the window described a parade passing by. Although the other man couldn’t hear the band - he could see it. In his mind’s eye as the gentleman by the window portrayed it with descriptive words.
Days and weeks passed. One morning, the day nurse arrived to bring water for their baths only to find the lifeless body of the man by the window, who had died peacefully in his sleep. She was saddened and called the hospital attendants to take the body away. As soon as it seemed appropriate, the other man asked if he could be moved next to the window.
The nurse was happy to make the switch, and after making sure he was comfortable, she left him alone. Slowly, painfully, he propped himself up on one elbow to take his first look at the real world outside. He strained to slowly turn to look out the window beside the bed.
It faced a blank wall. The man asked the nurse what could have compelled his deceased roommate who had described such wonderful things outside this window. The nurse responded that the man was blind and could not even see the wall. She said, “Perhaps he just wanted to encourage you.”
Epilogue:
*”There is tremendous happiness in making others happy, despite our own situations”*
*”Shared grief is half the sorrow, but happiness when shared, is doubled”*
*”If you want to feel rich, just count all the things you have that money can’t buy”*
*”Today is a gift, that’s why it is called the present.” *
– Source: Email
ONE PARAGRAPH THAT EXPLAINS LIFE!
Arthur Ashe, the legendary Wimbledon player was dying of AIDS which he got due to infected blood he received during a heart surgery in 1983. From
world over, he received letters from his fans, one of which conveyed: “Why does GOD have to select you for such a bad disease”?
To this Arthur Ashe replied: The world over — 5 crore children start playing tennis, 50 lakh learn to play tennis, 5 lakh learn professional
tennis, 50,000 come to the circuit, 5000 reach the grand slam, 50 reach Wimbledon, 4 to semi final, 2 to the finals, when I was holding a cup I
never asked GOD “Why me?”, And today in pain I should not be asking GOD “Why me?”
Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u
Going…..
Keep Going…..
– Source: Email