Thanks Sudhakar for yet another contribution to Oracle Apps Community. Sudhakar also happens to be a CSCP (certified supply chain professional)
The Oracle Workflow Engine:
--> Is implemented in server-side PL/SQL.
Combination of Tables/Views/Packages and procedures
--> Manages the state of activities for each process instance.
--> Determines the next activity once a prerequisite activity completes.
--> Executes function activities automatically.
--> Calls the Notification System to send notification messages
--> Supports results-based branches, parallel branches, loops, and sub-processes.
--> Can execute activities from non-savepoint environments such as database triggers and distributed transactions.
--> Can defer activities too costly to execute in real time to background engines for processing.
--> Maintains a history of completed activities.
--> Detects error conditions and executes error processes.
Initiating a Workflow Process
We Call the Workflow Engine APIs to initiate a workflow process,
Use 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.
Workflow Engine Processing
Upon starting a process, the Workflow Engine:
--> Identifies and executes the Start activity node
Executes the Start node if it is a function, notification, or process activity
--> Determines the next activity to transition to after completing the prerequisite activity or activities
--> Drives through the process
Automatically executes function activities and Send or Raise event activities
Pauses when it encounters a notification activity or blocking activity
--> Calls the Notification System to notify a performer
Transitions to the next activity after the performer completes the notification,
the blocking activity is completed, or the event message is received
--> Stops when it encounters an End activity
Exception Handling
Use WF_CORE APIs to raise and catch errors in your PL/SQL procedures.
The Workflow Engine sets the status of the function activity to “ERROR” if:
The PL/SQL procedure raises an unhandled exception
The PL/SQL procedure returns a result beginning with “ERROR:”
If an activity encounters an error, information about the error is stored in the following columns in the WF_ITEM_ACTIVITY_STATUSES table, which are viewable from the Workflow Monitor.
-->ERROR_NAME
-->ERROR_MESSAGE
WORKFLOW ENGINE API’s
To start or run a workflow process
-->WF_ENGINE.CreateProcess creates a new runtime process for a work item.
-->WF_ENGINE.StartProcess begins execution of the specified process.
-->WF_ENGINE.LaunchProcess launches a specified process by creating the new runtime process and beginning its execution.
-->WF_ENGINE.SetItemOwner sets the owner of an existing item.
-->WF_ENGINE.SetItemUserKey sets a user-friendly identifier for an item.
-->WF_ENGINE.GetItemUserKey returns the user-friendly identifier assigned to an item.
-->WF_ENGINE.SetItemParent defines the parent/child relationship for master/detail processes.
-->WF_ENGINE.Event receives an event from the Business Event System into a workflow process.
-->WF_ENGINE.Background runs a background engine to process deferred and timed out activities and stuck processes.
-->WF_ENGINE.CreateForkProcess forks a runtime process by creating a new process that is a copy of the original.
-->WF_ENGINE.StartForkProcess begins execution of the specified new forked process.
To communicate attribute information to the Workflow Engine
-->WF_ENGINE.SetItemAttrText, WF_ENGINE.SetItemAttrNumber, WF_ENGINE.SetItemAttrDate, and WF_ENGINE.SetItemAttrEvent set the value of an item type attribute in a process.
-->WF_ENGINE.SetItemAttrTextArray, WF_ENGINE.SetItemAttrNumberArray, and WF_ENGINE.SetItemAttrDateArray set the values of an array of item type attributes in a process.
-->WF_ENGINE.GetItemAttrText, WF_ENGINE.GetItemAttrNumber, WF_ENGINE.GetItemAttrDate, and WF_ENGINE.GetItemAttrEvent return the value of an item type attribute in a process.
-->WF_ENGINE.GetItemAttrInfo returns information about an item attribute, such as its type and format.
-->WF_ENGINE.AddItemAttr adds a new item attribute to the runtime process.
-->WF_ENGINE.AddItemAttrTextArray, WF_ENGINE.AddItemAttrNumberArray, and WF_ENGINE.AddItemAttrDateArray add an array of new item type attributes to the runtime process.
-->WF_ENGINE.GetActivityAttrText, WF_ENGINE.GetActivityAttrNumber, WF_ENGINE.GetActivityAttrDate, and WF_ENGINE.GetActivityAttrEvent return the value of an activity attribute in a process.
-->WF_ENGINE.GetActivityAttrInfo returns information about an activity attribute, such as its type and format.
To communicate state changes to the Workflow Engine
-->WF_ENGINE.CompleteActivity notifies the engine that the specified activity has been completed for the item, identifying the activity by the activity node label name.
-->WF_ENGINE.CompleteActivityInternalName notifies the engine that the specified activity has been completed for the item, identifying the activity by its internal name.
-->WF_ENGINE.BeginActivity determines if the specified activity can currently be performed and raises an exception if it cannot.
-->WF_ENGINE.AssignActivity assigns an activity to another performer.
-->WF_ENGINE.GetActivityLabel returns the instance label of an activity, given the internal activity instance identification.
-->WF_ENGINE.AbortProcess aborts process execution and cancels outstanding notifications.
-->WF_ENGINE.SuspendProcess suspends process execution so that users cannot transition items to new activities.
-->WF_ENGINE.ResumeProcess returns a suspended process to normal execution status.
-->WF_ENGINE.HandleError handles any activity that has encountered an error. This API can also be called for any arbitrary activity in a process to roll back part of the process to that activity.
-->WF_ENGINE.ItemStatus returns the status and results for the root process of the specified item instance.
Comments
Unfor tunately there are no shortcuts to learning. You need to try the tutorials that are here/elsewhere. If you get stuck, then please ask.
thanks
ani l
I am nikhil V railkar working as technical consultant in chennai
My problem is that i have told to work on workflows and will be assigned task on client site in aboroad but i am comfortable with it
i need a small favour from ,if you can send me 2 workflows with all the documents related to it i will be grateful to you
Regard
Nik hil
Would like to thank you for the knowledge that you are sharing with us. I have few questions about workflow. I would like to know what can/cannot be achieved from seeded workflows.Can you please let me know some scenarios where the functionality cannot be achieved by seeded workflow and need customization.
Thank you
Swapna
Accou nt generation is one workflow that almost always requires customization, as each customers has a unique account structure and account generation rules.
Thank s,
Anil Passi
You will have to customize the workflow in this case.
But before customization, check if this notification is based on OA Framework, in which case you can simply personalize and extend the notification.
Thanks,
Anil Passi
Thanks a lot. Yes this this notification is based on OA Framework. How do I personalize (meaning find the name of the field from the form, map that name to create internal item attributes in WF) ?
I am able to extend the notification but these new fields not available in vanila WF (HRSSA) need to be added as new item attributes.
Thanks in advance !
A Desai
The easiest way would be that you create a new StackLayout page and then include that within the notification message, just as other stacklayouts have been included for that notification.
I will try to write up a step by step approach for creating a Fwk based notification, but that will take me a week.
Thanks ,
Anil
Thanks again for quick response. My question for the existing field available on HR Self Service (HRSSA) form, for examle National Identifier. But the same field is not available in the WF, activate when the New Hire request is submitted. How do I hook up this field available on form to the respective notification. If I create new item attibute named NATIONAL_IDENTI FIER (this is the corresponding column name in the table) and pass &NATIONAL_IDENTI FIER in the message body of the Message it does not work. Am I missing something ?
Thanks in advance !
A Desai
Thanks again for quick response. My question for the existing field available on HR Self Service (HRSSA) form, for examle National Identifier. But the same field is not available in the WF, activate when the New Hire request is submitted. How do I hook up this field available on form to the respective notification. If I create new item attibute named NATIONAL_IDENTI FIER (this is the corresponding column name in the table) and pass &NATIONAL_IDENTI FIER in the message body of the Message it does not work. Am I missing something ?
Thanks in advance !
A Desai
Yes, if that attribute has been assigned NI Number, and if that Attribute is avaiable under the Message, then you can use &ATTR to reference its value. See if your message has contents in text or under html tab.
Thanks,
An il Passi
I have a laptop with XP Home Edition. What all softwares do i have to install, in order to work out all the examples you have provided in the site. Thanks in advance.
Sai .
You need Oracle database with Workflow engine installed. Also you would need Oracle WF Client which gets installed automatically with 9i or 10g client
Thank s,
Anil
I normally refer the functional documents that you have prepared and uploaded, some of which have efforts shared by others like Sivakumar Ganesan. These pdfs have been great help in my faltering steps to learn Apps.
I am a functional consultant and hardly know about technical architecture or concepts.
What approach should I take to understand Oracle Workflows and specifically how to implement and customize those for OM module?
Than ks,
Mandar.
I have to make a report on workflow programs that are struck in process displaying at what stage they are struck.
can you help on this report.
Than ks And Regards,
Satya Ram
Can you please post a lession on debugging of workflow?
Th anks,
Vineet
How to create a array type item attribute??And how to populate it?Can you plz clarify
actually i am hrms techno-fuctiona l.i am asked to go onsite and work on workflow.
not getting how to go for preparing workflow fast.
regard s,
yogita.
THANKS for the useful info. I have a query too.
When we send a notification for some approval, the performer can
either approve, reject or request more info. While handling
appro val rejection is not a big deal. I want to send reminder
notif ication if the requestor do not replies (after approver
asks for more info). So how to handle this timeout after
requesting more info.Any suggestion would be of great help..
Thank s Again
You will find the answer in below link
http://www.google.com/search?q=site:apps2fusion.com+oracle-workflow-notifications-timeouts-with-bank-holidays-weekends-2
Yes, timeouts are possible, you can see that option in the Notification Properties window
Thank s
Anil
I am customising PO Approval workflow(11.5.1 0) . one of my requirement is to
find the employee_number of an employee to whom the notification is
sent for approval. I need this employee number to call an another
custom function to do some processing. I get the person_id from
APPROVER_E MPID(Approver employee id) attribute. but to find
employee_n umber can i query from my custom package(written for
customising a workflow process in PO Approval) like select
employee _number from PER_ALL_PEOPLE_ F where person_id='1234 '. is it
the right approach to find the employee_number if we know the
person_id ?
Regards
Arun
Yes your approach is right.
n_appro ver_person_id :=
wf_engine.getit emattrnumber
(
itemtype => itemtype
,itemkey => itemkey
,aname =>'APPROVER_EMP ID'
) ;
FUNCTION get_person_numb er(p_person_id IN INTEGER) RETURN VARCHAR2 IS
CURSOR c_get IS
SELECT employee_number
FROM per_all_people_ f
WHERE person_id = p_person_id;
p_get c_get%ROWTYPE;
BEGIN
OPEN c_get;
FETCH c_get
INTO p_get;
CLOSE c_get;
RETURN p_get.employee_ number;
END get_person_numb er;
X_person_n umber := get_person_numb er( p_person_id =>n_approver_pe rson_id) ;
Thanks,
Anil Passi
Thanks for your response.much appreciated
Aru n
If in the CreateProcess the Process already exists, what must make ?
Please, answer in my e-mail.
ps: Sorry for my English, but i am brazilian and don't speak english.
Thank you for your help understanding workflow. I try to run the example in your first
lesson but i have problem to execute wf_engine package . i try to execute it
from owf_mgr but same result. the package wf_engine is in the schema and status is valid
the oracle database is 10.2.
best regards
mondhe r
To implement the WF tutorials on this site, you must execute the same from apps schema.
If you are using standalone version, then please note that it has been de-supported
T hanks,
Anil
I am new into worklfow. However our company is using oracle workflow since last few years.
I want to process stuck jobs,
Eg: I have a jobid 1 which is completed import task, but while executing export task it got failed due to table space issue. Now the table space issue has been resolved the but job is not getting completed.
Please let me know how can i run export task, i don't want to run using launch process because various jobs are stuck at various stages. I want something it should start from wherever it stopped earlier.
Thank s & Regards,
Murali dhar S
I have an issue in workflow where the workflow notification has been sent to the person who does not belongs to particular workflow. Eg: The workflow notification is coming to the user for a particular order number, where the user is no way related to that order number.The user want to stop this notification and he also want to know where does it comes from.
Can you please suggest.
Regar ds,
Ram.
I am getting WF status no approver available ,Check approval group ,approver hierarchy in purchasing ,I check account range and amount for approver group it is all set right,I run request for employee hierarchy and synchromization WF tables,
The proble is employee Ashok not in the hirarchy raised a iproc requisition and forwarded for approval to emp Veneet he is in approvar hirarchy but having limit to approve only 50,000 amount so it should go to next level that is employee Jagdeep but it does not reach to him and requisition status says incomplete.
I checked workflow its status is no approver available.Pleas e send solurion for the same or possible cause of problem.
Best Regards
Nasar Zia
My requirement is When a dispute is created in Oracle through collections form, need to capture all the details (customer_trx_i d, amount) into a JMS queue. For this scenario can we customize the existing workflow (ARCMREQ, which is internally invoked by AR_CREDIR_MEMO_ API_PUB package) to add a process/functio n?
Another question is, Does Oracle support to modify the standard workflow?
Plea se provide your valuable suggestions....
Thanks,
Vamsi
No customization can ever be safe.
But given that there is no business event, you can consider customizing the workflow.
If there is merely one screen from which disputes are being created, then you can also consider writing FP/CUSTOM.pll
Thanks,
Anil Passi
Can you please let me know hoe to send same notifications to more than one user?
Thanks and regards
Alla Kishore
That will explain.
For example, a responsibility is a role, and all users assigned to the responsibility can be notified if notification gets sent to resp role
thanks
an il
When we create a dispute, a line gets created in the history tab of the 'Collection Agent' screen with status as 'Pending Approval'. Our requirement is that whenever a line gets created, it should have the status as either 'Applied' or 'Closed'.
The workaround that we are thinking is to bypass all the approvals required in between. I need your inputs as how safe this customization can be?
And what can be the impact on the standard oracle process?
Also it will be very nice if you can tell me what all changes I might need to make in the workflow to achieve the results?
Thanks in advance,
Amit
This Santosh, working as Apps Consultant in Oracle from past 2.5 yrs. I am planning to take CSCP for OM. I have oracle study guides. Do you suggest any other books/use cases that would be helpful with my preperation?
T hanks,
Santosh.
I am trying to use the procedure WF_ENGINE.Handl eError to resubmit an Execute Concurrent Program activity as below:
begin
w f_engine.handle error(,,'EXECUT ECONCPROG','RET RY',NULL);
COMM IT;
end;
/
When I execute the above block, the stuck activity gets forced to completion and the next activity (which is actually the same errored activity, not the next in sequence) shows as errored. Please see the below activity statuses:
**** Activity Statuses
Begin Date Activity Status Result User
---------- -------- --------------- --------------- --------------- -------- --------------- ---------------
29-APR-09 15:36:15 ROOT/XAS EForm Approval Process ACTIVE #NULL
29-APR-09 15:36:15 XAS EForm Approval Process/Start COMPLETE #NULL
29-APR-09 15:39:04 XAS EForm Approval Process/Execute Concurrent COMPLETE #FORCE
Program
29-APR -09 15:52:32 XAS EForm Approval Process/Execute Concurrent ERROR #EXCEPTION
Program
There is another concurrent program to be executed in the same workflow process which has the same internal name EXECUTECONCPROG .
Would appreciate anyone's inputs on this issue.
Thanks.
Raquel
begin
wf_engine.hand leerror(l_itemt ype,l_itemkey,' EXECUTECONCPROG ','RETRY',NULL) ;
COMMIT;
end;
/
Please ignore the earlier one.
Thanks.
Raquel
Coul d you please give me Information about CSCP and also please send me if you any sof copy regarding to CSCP . My mail ID : sreeharireddy.lgmail.com
Thanks.
Sreeh ari
I want to take the Invoice id from the AP Invoice form and copy it to an Account generator workflow attribute. I need to get the invoice details with that invoice id.
Please tell me the approach of this logic.
THanks in Advance..
Srin ivasan.
I am usring the following API to make some change in PO, it works fine and change the revision of the PO and submits the approval workflow.
Now my requirement is that, this PO should bypass the approval process and PO get approved automatically. Can u suggest what I can do (either call any API or ......)?, but I don't want to change the exisitng approval procees that will be there for other cases.
You quick response is highy appriciated.
l _result := po_change_api1_ s.update_po(
'1 2345', -- X_PO_NUMBER VARCHAR2,
NULL ,--X_RELEASE_NU MBER NUMBER,
9 ,-- X_REVISION_NUMB ER NUMBER,
1 ,-- X_LINE_NUMBER NUMBER,
1 ,-- X_SHIPMENT_NUMB ER NUMBER,
NULL ,--NEW_QUANTITY NUMBER,
NULL ,--NEW_PRICE NUMBER,
'01-SEP -2010',--NEW_PR OMISED_DATE DATE,
'Y' ,--LAUNCH_APPRO VALS_FLAG VARCHAR2,
NULL ,--UPDATE_SOURC E VARCHAR2,
'1.0' ,--VERSION VARCHAR2,
NULL, --X_OVERRIDE_DA TE DATE := NULL,
X_API_ERR ORS, --X_API_ERRORS, --X_API_ERRORS OUT NOCOPY PO_API_ERRORS_R EC_TYPE,
'Kumar , Mukesh' --p_BUYER_NAME VARCHAR2 default NULL /* Bug:2986718 */
);
Thanks & Regards
Mukesh
Thanks & Regards
Mukesh
I am unable to find Oracle Apps 11.5.10.2 Workflow Table's ER diagram.
I have read may pdfs but mostly talk about Workflow builder and only few tables.
I just need a ER-Diagram of workflow tables.
And psudo logic of workflow from start to finish (in terms of tables which updated first and which updated last)
Thanks in advance
Regards
I need to develop the custom workflow in HRMS in such a way that when an employee applies a leave in absence management window then my work flow need to fire and the approval notifications should go the respective managers. I have developed the workflow and the notifications are going the respective managers but i'm finding difficulty in initiating the workflow when an employee went to absence management window and applying a leave there. Actually i'm running the workflow from back end Toad by using create process and start process procedures.
Please help me here in how to start the workflow when an employee went to absence management window applies a leave there.
with us so I came to check it out. I'm definitely
loving the information. I'm book-marking and will be
tweeting this to my followers! Excellent blog and excellent design and style.
or not this put up is written by way of him as nobody else
understand such distinct approximately my trouble.
You're wonderful! Thank you!
rest of the website is also really good.
and entertaining, and let me tell you, you've hit the nail
on the head. The problem is something too few people are speaking intelligently about.
I'm very happy that I came across this during my
search for something relating to this.
realized it's new to me. Anyhow, I'm definitely happy I
discovered it and I'll be bookmarking it and checking back
frequently!
due to it's good content
up. The words in your content seem to be running off the screen in Internet explorer.
I'm not sure if this is a format issue or something to do with web browser compatibility but I thought I'd post to
let you know. The design and style look great though!
Hope you get the problem resolved soon. Kudos
Look advanced to far added agreeable from you! However, how
can we communicate?
which carries tons of helpful facts, thanks for providing these kinds of information.
Keep up the terrific works guys I've added you guys to my own blogroll.
which i am going to convey in college.
I definitely really liked every part of it and i also have you saved as a favorite
to look at new stuff in your site.
Does running a well-establishe d website such as yours take a lot of
work? I'm brand new to operating a blog however I do write in my journal on a daily basis.
I'd like to start a blog so I can share my own experience and thoughts online.
Please let me know if you have any recommendations or tips for brand new aspiring bloggers.
Thankyou!
and exposure! Keep up the good works guys I've added you guys
to my blogroll.
the newest news update posted here.
assist with SEO? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good results.
If you know of any please share. Kudos!
is a very well written article. I'll make sure to bookmark it and return to read
more of your useful information. Thanks for the post.
I will definitely comeback.
RSS feed for comments to this post