Workflow
Self Study Pack
The copy numbers referenced above should
be written into the Copy Number
space on the cover of each distributed copy.
If the document is not controlled, you can delete this table and the Copy Number label from the cover page.
Contents
Document
Control........................................................................................................................................................................................
Introduction....................................................................................................................................................................................................
Purpose.............................................................................................................................................................................................................
Audience...........................................................................................................................................................................................................
Prerequisites....................................................................................................................................................................................................
Background Reading and Useful
Websites...............................................................................................................................................
Acknowledgments...........................................................................................................................................................................................
Practice Exercise 1: Simple
Workflow.................................................................................................................................................
Practice Exercise 2: Using the
‘And’ Operator.................................................................................................................................
Practice Exercise 3: Comparing
Text....................................................................................................................................................
Practice Exercise 4: Simple FYI
Notification....................................................................................................................................
Practice Exercise 5: Response
Required Notification with Timeouts....................................................................................
Practice Exercise 6: Response
Required Notification with Message Attributes.............................................................
Practice Exercise 7: Creation
of Custom Workflow Functions...............................................................................................
Practice Exercise 8: PO/PO
Requisition Account Generator...................................................................................................
Practice Exercise 9: PO/PO
Requisition Approval.........................................................................................................................
Practice Exercise 10: FA
Account Generator.................................................................................................................................
Example A: Changing the value
of a segment for all Book Level and Category Level Accounts................................................
Example B: Specifying a
different value for a segment based on account type..............................................................................
Practice Exercise 11:
Master/Detail Co-ordination Questions.............................................................................................
Practice Exercise 12: PO
Account Generator/PO Requisition Account Generator Challenge #1.........................
Practice Exercise 13: PO
Account Generator/PO Requisition Account Generator Challenge #2.........................
Practice Exercise 14: FA
Account Generator Challenge.........................................................................................................
Practice Exercise 15: PL/SQL:
Launching a Simple Workflow.................................................................................................
Practice Exercise 16: PL/SQL:
Launching a Simple Workflow II............................................................................................
Practice Exercise 17: PL/SQL:
Master/Detail Co-ordination Activities............................................................................
Solutions to Practice Exercises
15,16................................................................................................................................................
Note:To update the table of
contents, put the cursor anywhere in the table and press [F9]. To change the number of levels displayed,
select the menu option Insert‑>Index and Tables, make sure the Table of
Contents tab is active, and change the Number of Levels to a new value.
Purpose
Note:This is a generic
front end to any document to be produced for the project where there is no
deliverable template.
This pack seeks to assist OracleApplications consultants
with their workflow training requirements by:
·
Highlighting required background readings and
useful web sites, and
·
Guided Exercises
·
Some PL/SQL Exercises for those more technically
oriented
Audience
This document is targeted at Functional and Technical
Consultants who have an immediate workflow training requirement, and don’t have
time to wait for an Instructor led class.
Prerequisites
It is assumed you have access to Oracle eBusiness suite
11I, and also have installed Oracle Workflow Client 2.5 on your laptop.
You will need to add the necessary tnsnames entries to
access the 11I database, and will need the APPS username and password. For the Vision database, the APPS password is
usually APPS.
Remember to backup workflows before you modify them, and
after you have finished an exercise save back the original workflow to the
database.
Installing Workflow 2.5.X on your Laptop
You can download workflow client software from the Oracle
Workflow website (see below) which has a link to the sac.us.oracle.com site
(from this website you can download all of Oracle’s software).
You can install Workflow 2.5 on Windows 95 or Windows NT
using the Oracle Installer. After you
have downloaded the software, it will be in zip a file. You will have to:
·
extract the file into a temporary or staging
directory,
·
search for the Oracle Installer file
(orainst.exe or setup.exe) and run this program (I have found that sometimes
the version of Oracle Installer gives Dr Watson errors - if you have this
problem, just get another version of Oracle Installer)
·
Install Workflow Builder 2.5 and delete staging
directory
Background
Reading and Useful Websites
·
Oracle
Workflow User Guide (Online help)
·
REQUIRED:
Using Oracle Workflow Builder - explains how to use the tool, and definitions
·
Oracle
Support Policy for Predefined Workflows: found in the Workflow User
Guide(Online help) - a must read before you modify a Workflow and before you
call Support
·
http://www-apps.us.oracle.com/doclib/
·
Release 11I Documentation. Look up the manual for the Product you are
interested for required reading on how to modify workflows, what is supported
and what is not supported. Don’t forget
there may be documentation updates which you must read. This also includes the
Workflow Userguide (Online Help) which is very useful (answers most of the
Workflow questions in the lab exercises)
·
REQUIRED: Read Chapter 10 Account Generator of
the Applications Flexfield Manual if you need to modify Account Generator
workflows.
·
http://www-apps.us.oracle.com/atg/wf
·
The Oracle Workflow website is full of useful
information for all consultants, including product overviews, documentation,
trouble shooting and FAQ and Transfer of Information. It includes links to Workflow mailing list
archive wftech.us.
·
http://www-apps.us.oracle.com
·
The Applications Development homepage contains
links to most of the Applications product groups. Some product groups include useful tips on
how to modify workflows, including documentation updates. For example, the Purchasing team on
http://www-apps.us.oracle.com/po/ includes a link ‘Help for Consultants’ which
includes required information on PO Workflows.
The Assets team has an FA Account Generator whitepaper on
http://www-apps.us.oracle.com/fa/ which is very useful
·
Any Workflow Whitepapers you can find on the
module you are interested in.
·
Workflow Toolkit Whitepaper(downloadable from
the Corporate Repository)
·
A useful customisation which reduces the need
for custom PL/SQL code when creating and modifying workflows. This is required to be installed if you wish
to complete some of the practice exercises.
Acknowledgments
Some of the Practice Exercises have been copied and
repackaged from other sources. Thanks to
Mark Jordan, Adam Bash ford, Stuart Houston and FA Product Team.
This lab illustrates
how to create a simple workflow and launch it from Oracle Self Service Web
Applications.
1.
Open the Oracle Workflow Builder
2.
Navigate File à
Quick Start Wizard
3.
What is the purpose of the Quick Start Wizard?……………….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
4.
Change the Internal Name to be ‘WFCUSTXX’, where XX is
the unique number of your PC.
5.
Change the Display Name to be ‘XX Custom Workflows’
where XX is the unique number of your PC.
6.
Leave Persistence Type as ‘Temporary’. What does persistence type
mean?…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
7.
Leave Number of Days as 0.
8.
Change Internal Process to be ‘WFHLWDXX’ where XX is
the unique number of your PC.
9.
Change Display Name to be ‘Hello World’
10.
From the Navigator, check that the Standard Workflow
has been attached to your custom workflow.
11.
What is the purpose of the Standard workflow?
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
12.
Expand the Standard Workflow branch.
13.
Expand the Functions branch.
14.
Click on the ‘Noop’ function and drag it onto the
‘Hello World’ custom process (place it between the Start and the End
activities)
15.
Join the activities together. Right click on the Start activity, keeping
the right click pressed, draw a line between the Start activity and the Noop
activity.
16.
Right click on the Noop activity, keeping the right
click pressed, draw a line between the Noop activity and the End activity.
17.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
18.
Log into Oracle Applications 11I
19.
Select the Workflow Administrator Web Applications
responsibility.
20.
Select the Launch Processes function.
21.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
22.
From the Initiate Workflow, enter ‘000001’ as the Item
Key, and ‘000001’ as the User Key.
23.
Why are the Item Type and Item Key so important when
dealing with Workflows?
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
24.
Press the OK button
25.
From the Activities List, press the View Diagram
button.
26.
What is the function of Workflow Monitor?
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
27.
Review the information stored under each of the Tabs.
In this exercise, you
will modify the workflow you built in Practice Exercise 1 to include the
standard Defer Thread function, and the ‘And’ Operator. The Defer Thread function will cause that
branch of the workflow to stop until the Workflow Background Process concurrent
program is run. The ‘And’ operator will
prevent the workflow continuing past this operator until both branches of the
workflow have reached it.
1.
Open the Oracle Workflow Builder
2.
Open the Workflow you created in Practice Exercise 1.
3.
Expand the Workflow tree in the Navigator by clicking
on the ‘+’ sign.
4.
Expand the Process tree by clicking on the ‘+’ sign.
5.
Double click on the Process you created in Practice
Exercise 1.
6.
Expand the Standard Workflow branch.
7.
Expand the Functions branch.
8.
Click on the ‘Defer Thread’ function and drag it onto
the ‘Hello World’ custom process (place it between the Start and the End
activities)
9.
What is a deferred activity?
…………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
10.
Click on the ‘And’ operator and drag it onto the ‘Hello
World’ custom process (place it between the Start and the End activities)
11.
Modify the diagram to look like the below diagram.
12.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
13.
Log into Oracle Applications 11I
14.
Select the Workflow Administrator Web Applications
responsibility.
15.
Select the Launch Processes function.
16.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
17.
From the Initiate Workflow, enter ‘000002’ as the Item
Key, and ‘000002’ as the User Key.
18.
Press the OK button
19.
From the Activities List, press the View Diagram
button.
20.
The Workflow Monitor diagram should look like the
diagram below.
21.
To make this Workflow Complete, either:
·
Log in to the Core Applications, System
Administrator responsibility and run the Workflow Background Process concurrent
program with the parameter ‘Process Deferred’ set to ‘Yes’, or
·
Click on the ‘Defer Thread’ function in the
Workflow Monitor (the green box). Click on the Expedite button and select
‘Skip’. Click OK. The Workflow Monitor should update to show the workflow has
completed. (Green line to the ‘End’ activity)
In this exercise, you
will build a workflow which will compare 2 different character strings and
determine whether they are equal. Using
the Launch Processes functionality you learned about in Exercise 1, you will
enter these character strings before you initiate the workflow.
1.
Open the Oracle Workflow Builder
2.
Open the Workflow you created in Practice Exercise 1.
3.
Expand the Workflow tree in the Navigator by clicking
on the ‘+’ sign.
4.
Right Click on the Processes branch. Select ‘New
Process’
5.
Enter ‘WFCMTXXX’ as the Internal Name of the New
Process, where XX is the unique number of your PC.
6.
Enter ‘Compare Text’ as the Display Name.
7.
Enter ‘Compare Text’ as the Description.
8.
Make sure the ‘Runnable’ checkbox is checked.
9.
From the Standard workflow ‘Functions’ branch, drag the
‘Start’ and 2 ‘End’ activities onto the your process.
10.
Double click on the ‘Start’ activity. Navigate to the ‘Node’ tab. On the Start/End field, change the entry from
‘Normal’ to ‘Start’. Click OK
11.
Double click on the ‘End’ activity. Navigate to the ‘Node’ tab. On the Start/End field, change the entry from
‘Normal’ to ‘End’. Click OK
12.
Expand the Standard Workflow branch.
13.
Expand the Functions branch.
14.
Click on the ‘Compare Text’ function and drag it on the
new process.
15.
Join the activities together as shown in the diagram
below.
16.
Right click on the attributes branch of your workflow,
and select ‘New Attribute’
17.
Create an Item Attribute as follows:
·
Internal Name: MYTESTVALUE
·
Display Name: My Test Value
·
Description: My Test Value
·
Type: Text
·
Length: 20
·
Default Value:
18.
Create an Item Attribute as follows:
·
Internal Name: MYREFERENCEVALUE
·
Display Name: My Reference Value
·
Description: My Reference Value
·
Type: Text
·
Length: 20
·
Default Value: GREYHOUND
19.
In your process, double click on the ‘Compare Text’
function, and go to the ‘Node Attributes’ tab.
20.
The Compare Text function requires you to fill in 2
Activity Attributes. For the Test Value activity attribute, change the ‘Type’
to be Item Attribute, and the ‘Value’ to be ‘My Test Value’.
21.
For the Reference Value activity attribute, change the
‘Type’ to be Item Attribute, and the ‘Value’ to be ‘My Reference Value’.
22.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
23.
Log into Oracle Applications 11I
24.
Select the Workflow Administrator Web Applications
responsibility.
25.
Select the Launch Processes function.
26.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
27.
From the Initiate Workflow, select the process you just
created. Enter ‘000003’ as the Item Key, and ‘000003’ as the User Key.
28.
Notice that word GREYHOUND is defaulted into the My
Reference Value attribute value.
29.
Enter ‘WHIPPET’ into the My Test Value attribute value.
30.
Click on OK.
31.
What was the result of the Compare Text function? It should be Greater Than. Click on the View
Diagram button.
32.
Redo steps 26-31(but use ‘000004’ as the Item Key and
User Key), this time enter GREYHOUND into the My Reference Value attribute.
Confirm the result of the Compare Text function is Equal.
This lab illustrates
how to create a simple FYI Notification workflow and launch it from Oracle Self
Service Web Applications.
1.
Open the Oracle Workflow Builder
2.
Open the Workflow you created in Practice Exercise
3.
You can store Workflows in 2 different formats. What are these formats?………………………………….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
4.
Expand the Workflow tree in the Navigator by clicking
on the ‘+’ sign.
5.
Right Click on the Processes branch. Select ‘New
Process’
6.
Enter ‘WFFYINXX’ as the Internal Name, where where XX
is the unique number of your PC.
7.
Enter ‘Simple FYI Notification’ as the Display Name.
8.
Enter ‘Simple FYI Notification’ as the Description.
9.
What is the function of the ‘Result Type’ field and the
‘Runnable’ checkbox? …………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
10.
On the Details tab, there is a field called Error Item
Type. What is this field for?
…………………………………………………………………………………………….………………….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
11.
Click OK
12.
Double click on this process. The process should now open (it will be
empty)
13.
From the Standard workflow ‘Functions’ branch, drag the
‘Start’ and ‘End’ activities onto the your process.
14.
Double click on the ‘Start’ activity. Navigate to the ‘Node’ tab. On the Start/End field, change the entry from
‘Normal’ to ‘Start’. Click OK
15.
Double click on the ‘End’ activity. Navigate to the ‘Node’ tab. On the Start/End field, change the entry from
‘Normal’ to ‘End’. Click OK
16.
Create a Notification for this Process. Right click on the Notification branch of
your Workflow and select ‘New Notification’
17.
Enter ‘WFFYINTF01’ as the Internal Name.
18.
Enter ‘Simple FYI Notification’ as the Display Name.
19.
Enter ‘Simple FYI Notification’ as the Description.
20.
Click OK
21.
Drag the Notification onto your process, and connect
the start, end and notification activity as follows: Start à Notification à
End.
22.
On the Navigator window, click on the ‘Simple FYI
Notification’ process.
23.
Verify your process. Navigate File à Verify, and check for errors. Select ‘Cancel’.
24.
What is Top-Design?
…………………………………………………………………………………………….………………….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
25.
Right click on the Messages branch of your
Workflow. Select New Message.
26.
Enter ‘FYIMSGXX’ as the Internal Name.
27.
Enter ‘FYI Message’ as the Display Name.
28.
On the Body tab, enter ‘XX FYI Message’ as the subject.
29.
Enter ‘Simple Test FYI Message’ as the Text Body.
30.
Click OK.
31.
Navigate to Notification branch, and double click on
the ‘Simple FYI Notification’ notification.
32.
Select ‘FYI Message’ as the Message.
33.
Verify your process. Navigate File à Verify, and check for errors. Select ‘Cancel’
34.
What is a performer?
…………………………………………………………………………………………….………………….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
35.
Navigate File à
Load Roles from Database.
36.
Enter ‘Stock%’ in the Find Roles field, and press the
‘Find’ button.
37.
Select Stock, Patty from the Query Results section, and
press the ‘Add’ button.
38.
Click OK
39.
For the process you created, double click on the
Notification, and go to the Node tab.
40.
In the Performer Value field, for Performer Type:
Constant, select Stock, Patty for the Value field and select OK.
41.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
42.
Log into Oracle Applications 11I
43.
Select the Workflow Administrator Web Applications
responsibility.
44.
Select the Launch Processes function.
45.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
46.
Change the Process Name to be the Process you just
created.
47.
From the Initiate Workflow, enter ‘000005’ as the Item
Key, and ‘000005’ as the User Key.
48.
Press the OK button
49.
From the Activities List, press the View Diagram button
and verify your workflow completed successfully.
50.
Return to the Responsibility screen and view the
notifications for the OPERATIONS user.
51.
Check that the OPERATIONS user received the
Notification.
This lab illustrates
how to create a response required Notification workflow including a reminder
notification and launched from Oracle
Self Service Web Applications.
1.
Open the Oracle Workflow Builder
2.
Open the Workflow you created for Practice Exercises 1.
3.
Right Click on the Process you created in Practice
Exercise 4. Select ‘Copy’. Right Click and select ‘Paste’.
4.
For the new process, enter ‘WFNTFR01’ as the Internal
Name, where where XX is the unique number of your PC.
5.
Enter ‘Simple Response Required Notification’ as the
Display Name.
6.
Enter ‘Simple Response Required Notification’ as the
Description.
7.
Click OK
8.
Open up the new Process
9.
Delete the notification.
10.
Create a new message as follows:
·
Internal Name: MSGRRR01
·
Display Name: Response Required Notification
·
Body Subject: Do you know enough about Workflow?
·
Text Body:
Do you know enough about Workflow?
·
Result Display Name: Do you know enough about
Workflow?
·
Result Description: Do you know enough about
Workflow?
·
Lookup Type: Yes/No
11.
Create a new notification as follows:
·
Internal Name: NTFRRR01
·
Display Name: Response Required Notification
·
Description: Response Required Notification
·
Message: Response Required Notification
·
Result Type: Yes/No
·
In the Node tab, change the Timeout Type to be
Relative Time
·
Set the timeout to 2 minutes
12.
What is the purpose of Timeouts?
…………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
13.
Drag the Response Required Notification onto the
process you just copied.
14.
Double click on the Notification and in the Node tab,
change the Timeout type to be Relative Time, and the Value to be 2 minutes.
Click OK.
15.
Complete the process as in the diagram below:
16.
What is a transition?
…………………………………………………….………………………………………………….……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
17.
Verify your process. Navigate File à Verify, and check for errors. Select ‘Cancel’.
18.
Assign ‘Stock, Patty’ as the performer.
19.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
20.
Log into Oracle Applications 11I
21.
Select the Workflow Administrator Web Applications
responsibility.
22.
Select the Launch Processes function.
23.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
24.
Change the Process Name to be the Process you just
created.
25.
From the Initiate Workflow, enter ‘000006’ as the Item
Key, and ‘000006’ as the User Key.
26.
Press the OK button
27.
From the Activities List, press the View Diagram button
and verify your workflow completed successfully.
28.
Return to the Responsibility screen and view the
notifications for the OPERATIONS user.
29.
Check that the OPERATIONS user received the
Notification.
30.
Respond to the Notification with ‘Yes’
31.
Use the Find Processes function to view the workflow
using the Workflow Monitor.
32.
Repeat steps 21-30 using an item key/user key of
‘000007’ of , however this time do not respond to the notification.
33.
What causes a timeout to be initiated?
…………………………………………………….………………………………………………….………. …………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
34.
Run the Workflow Background Process concurrent program
for your workflow only (the parameter Process Timeouts should be set to ‘Yes’),
to process timeouts.
35.
Verify using the Workflow Monitor that the time out for
your workflow has been executed after the concurrent program completes.
1.
This lab builds on the
workflow process you created in Practice Exercise 5. Your Manager has noticed your considerable
workflow skills, and would like you to modify the ‘Do you know enough about
Workflow’ notification to be ‘ Do you know enough about workflows’, where the
module name is not hard coded in the message, but can be varied.
Your manager would
also like to give recipients of the message the ability to enter information
into a Notes field to explain the response.
1.
Open the Oracle Workflow Builder
2.
Open the Workflow you created for Practice Exercises 1
3.
Right Click on the Process you created in Practice
Exercise 5. Select ‘Copy’. Right Click and select ‘Paste’.
4.
For the new process, enter ‘WFNTFRMAXX’ as the Internal
Name, where where XX is the unique number of your PC.
5.
Enter ‘Response Required Notification with Attributes’
as the Display Name.
6.
Enter ‘Response Required Notification with Attributes’
as the Description.
7.
Click OK
8.
Create a new Item Attribute as follows:
·
Internal Name: MODULENAME
·
Display Name: Module Name
·
Description: Module Name
·
Type: Text
·
Length: 100
·
Default Value:
9.
Create a new Item Attribute as follows:
·
Internal Name: SHORTNOTE
·
Display Name: Short Note
·
Description: Short Note
·
Type: Text
·
Length: 200
·
Default Value:
10.
Right Click on the Message you created in Practice
Exercise 5. Select ‘Copy’. Right Click and select ‘Paste’.
11.
Enter ‘MSGRRRMA01’ as the Internal Name.
12.
Enter ‘Response Required Notification with Message
Attributes’ as the Display Name. Click OK.
13.
Right Click on this message, and select ‘New
Attribute’. Create a Message Attribute as follows:
·
Internal Name: MODULENAME
·
Display Name: Module Name
·
Description: Module Name
·
Type: Text
·
Source: Send
·
Length: 100
·
Default Type: Item Attribute
·
Default Value: Module Name
14.
Create another Message Attribute for this message as
follows:
·
Internal Name: SHORTNOTE
·
Display Name: Short Note
·
Description: Short Note
·
Type: Text
·
Source: Respond
·
Length: 200
·
Default Type: Constant
·
Default Value:
15.
Open up the Message, and navigate to the Body tab.
16.
Modify the Subject to be: Do you know enough about
&MODULENAME workflows?
17.
Modify the Text Body to be: Do you know enough about
&MODULENAME workflows? Enter Additional comments in the Notes field.
18.
From the Notifications branch (NOT THE PROCESS), double
click on the Response Required notification.
19.
Change the Message to be ‘Response Required
Notification with Message Attributes. The actual process diagram should be
identical to Practice Exercise 5.
20.
Verify your process. Navigate File à Verify, and check for errors. Select ‘Cancel’..
21.
Save the Workflow. Navigate File à Save As.
Select Database, and enter the Database User/Password and the name of
the database instance, and press OK.
22.
Log into Oracle Applications 11I
23.
Select the Workflow Administrator Web Applications
responsibility.
24.
Select the Launch Processes function.
25.
From the Launch Processes screen, select your Workflow.
(click on the hyperlink)
26.
Change the Process Name to be the Process you just
created.
27.
From the Initiate Workflow, enter ‘000008’ as the Item
Key, and ‘000008’ as the User Key.
28.
Press the OK button
29.
From the Activities List, press the View Diagram button
and verify your workflow completed successfully.
30.
Return to the Responsibility screen and view the
notifications for the OPERATIONS user.
31.
Check that the OPERATIONS user received the
Notification.
32.
Respond to the Notification with ‘Yes’
33.
Use the Find Processes function to view the workflow
using the Workflow Monitor.
This lab illustrates
how to create a custom workflow PL/SQL function which you will be able to use
when completing some of the other Practice Exercises.
1.
Read the Workflow Toolkit Whitepaper
2.
Open the Oracle Workflow Builder
3.
Open the Workflow you created for Practice Exercises 1.
4.
Navigate to the function branch of this workflow, right
click an select ‘New Function’
5.
Create a new function as follows:
·
Internal Name: CUSTOM_DYNAMIC_QUERY
·
Display Name: Custom
Dynamic Query
·
Description: Custom
Dynamic Query
·
Function: CUSTOM_DYNAMIC_QUERY
·
Type: PL/SQL
·
Result Type:
Boolean (this from
the WFSTD_BOOLEAN lookup code)
6.
What is the purpose of function attributes?
…………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
7.
For this Function, create the following attributes:
·
Internal Name: COLUMN_NAME
·
Display Name: COLUMN_NAME
·
Description: COLUMN_NAME
·
Type: Text
·
Length: 100
·
Internal Name: TABLE_NAME
·
Display Name: TABLE_NAME
·
Description: TABLE_NAME
·
Type: Text
·
Length: 100
·
Internal Name: WHERE_COL_NAME
·
Display Name: WHERE_COL_NAME
·
Description: WHERE_COL_NAME
·
Type: Text
·
Length: 100
·
Internal Name: WHERE_VAL_NAME
·
Display Name: WHERE_VAL_NAME
·
Description: WHERE_VAL_NAME
·
Type: Text
·
Length: 100
·
Internal Name: RETURN_VAL_NAME
·
Display Name: RETURN_VAL_NAME
·
Description: RETURN_VAL_NAME
·
Type: Text
·
Length: 100
8.
What is the purpose of attributes in workflow?
…………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
9.
Create a new attribute as follows (this step may
need to be repeated if this function is used more than once using unique
names):
·
Internal Name: RETURN_VALUE_ATTR
·
Display Name: Return
Value from Custom Dynamic Query
·
Description: Return
Value from Custom Dynamic Query
·
Type: Number
·
Length: 100
10.
Now we will test the function. Create a new process as follows: Start à Custom Function à
End
11.
You will use the workflow function to update the
attribute with the employee id of the Operations User. You will SELECT the EMPLOYEE_ID column from the
FND_USER table where the USER_NAME equals OPERATIONS.
12.
Create another Workflow Attribute as follows:
·
Internal Name: EMPLOYEE_NAME
·
Display Name: Employee
Name
·
Description: Employee
Name
·
Type: Text
·
Default Value: OPERATIONS
13.
In your process, double click on the function and go to
the Node Attributes tab. Enter the
following Activity Attributes:
·
COLUMN_NAME: Constant, EMPLOYEE_ID
·
TABLE_NAME: Constant, FND_USER
·
WHERE_COL_NAME: Constant, USER_NAME
·
WHERE_VAL_NAME: Item Attribute, Employee Name
·
RETURN_VAL_NAME: Constant, RETURN_VALUE_ATTR
14.
Save the Workflow to the database
15.
Use the Launch Processes function to launch the
workflow.
16.
Use the Workflow Monitor ‘Attributes’ button to verify
that the RETURN_VALUE_ATTR attribute was updated with the EMPLOYEE_ID of the OPERATIONS
user.
(From Mark Jordan and Adam Bashford)
1.
Choose File, Open to open the data store
2.
Select database to connect to
User: apps
Password: apps
Connect: (instructor will supply)
User: apps
Password: apps
Connect: (instructor will supply)
3.
Select PO Requisition
Account Generator (the item types you want to view) from the Hidden list
and click on Show to move it to the
Visible list
4.
Click on OK to load the selected item types to the
navigator tree
5.
Choose File, Save As and save a copy of your data
store: for example C:\[YourTeam]_PO_REQ_AG.WFT
6.
Create a new process activity within the PO Account
Generator Item Type:
Internal name: [YourTeam]_PO_CONSTANT
Display name: [YourTeam] PO Constant
Result type: Flexfield Result
Uncheck: Runnable
Internal name: [YourTeam]_PO_CONSTANT
Display name: [YourTeam] PO Constant
Result type: Flexfield Result
Uncheck: Runnable
7.
Diagram the PO Constant process to model the following
rules:
a)
Create a Start
node. Remember to modify the Start node process activity property Start/End to
“Start” (found in Standard Flexfield
Workflow)
b)
Create five Assign
Value to Segment functions in your process (functions located in the
Standard Flexfield Workflow item type) and branch the first one from “Start”
and continue branching them together. Set the following attribute values:
Name
|
Value Type
|
Value
|
|
1)
|
Company Segment
|
||
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Company
|
|
Value
|
Constant
|
01
|
|
2)
|
Department Segment
|
||
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Department
|
|
Value
|
Constant
|
520
|
|
3)
|
Account Segment
|
||
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Account
|
|
Value
|
Constant
|
5250
|
|
4)
|
Sub-Account Segment
|
||
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Sub-Account
|
|
Value
|
Constant
|
[YourTeam] Sub Account
|
|
5)
|
Product Segment
|
||
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Product
|
|
Value
|
Constant
|
000
|
c)
Branch a Is Code
Combination Complete? function in
your process (functions located in the Standard Flexfield Workflow item type)
from the last Assign Value to Segment function
d)
Branch to two End
nodes. Remember to modify the End node process activity property “Start/End” to
“End” and set one Result to “Success”
and the other to “Failure”
3.
Modify the Generate Default Charge Account Process so
that your process replaces the Build Expense Charge Account Process (see
partial diagram below)
4.
Save your work!!! Test by creating a
Requisition with an Expense Item and clicking in the Charge Account Field. If a charge account fails to be built, use
the Workflow Monitor to debug your workflow (ensure Profile Option: Account
Generator: Run in Debug is set to Yes)
Results:
Co
|
Department
|
Account
|
SubAccount
|
Product
|
|
Result:
|
In this exercise, you will use an account segment from the
Expense Account flexfield and set constants for the remainder of the segments.
1.
Create a new process activity within the PO Requisition
Account Generator Item Type:
Internal name: [YourTeam]_PO_FLEX_SINGLE
Display name: [YourTeam] PO Flexfield Value for a Single Segment
Result type: Flexfield Result
Uncheck Runnable
Internal name: [YourTeam]_PO_FLEX_SINGLE
Display name: [YourTeam] PO Flexfield Value for a Single Segment
Result type: Flexfield Result
Uncheck Runnable
2.
Diagram the PO Flexfield Value for a Single Segment
process to model the following rules:
a)
Create a Start
node. Remember to modify the Start node process activity property Start/End to
“Start”
b)
Branch to the Expense
Account function (function located in the PO Account Generator item type)
c)
When the result for Expense Account is “Failure”, branch to the End Activity node. Remember to modify
the End node process activity property “Start/End” to “End” and set the Result to Failure
d)
When the result for Expense Account is “Success”,
branch to the Copy Segment Value from
Code Combination function (located in the Standard Flexfield Workflow item
type). Set the following attribute
values
Name
|
Value Type
|
Value
|
|
1)
|
Code Combination
|
Item Attribute
|
Temp Account ID
|
Segment Identifier
|
Constant
|
Name
|
|
Segment
|
Constant
|
Department
|
d)
Create four Assign
Value to Segment functions in your process (functions located in the
Standard Flexfield Workflow item type) and branch the first one from Copy
Segment Value from Code Combination and continue branching them together. Set
the following attribute values for each:
Name
|
Value Type
|
Value
|
|
1)
|
Segment Identifier
|
Constant
|
Name
|
Segment
|
Constant
|
Company
|
|
Value
|
Constant
|
01
|
|
2)
|
Segment Identifier
|
Constant
|
Name
|
Segment
|
Constant
|
Account
|
|
Value
|
Constant
|
7330
|
|
3)
|
Segment Identifier
|
Constant
|
Name
|
Segment
|
Constant
|
Sub-Account
|
|
Value
|
Constant
|
[YourTeam] Sub Account
|
|
4)
|
Segment Identifier
|
Constant
|
Name
|
Segment
|
Constant
|
Product
|
|
Value
|
Constant
|
000
|
f)
Branch to End
activity node. Remember to modify the End node process activity property
“Start/End” to “End” and set the
Result to Success
3.
Modify the Generate Default Charge Account Process so
that your process replaces the Build Expense Charge Account Process.
4.
Save your work!!! Test by creating a
Requisition with an Expense Item and clicking in the Charge Account Field. If a charge account fails to be built, use
the Workflow Monitor to debug your workflow (ensure Profile Option: Account
Generator: Run in Debug is set to Yes)
Results:
Co
|
Department
|
Account
|
SubAccount
|
Product
|
|
Result
|
In this Practice Exercise, you
will add an extra Notification to the PO Requisition Approval, such that when
an Employee is sent a reminder that a requisition is awaiting approval, the
Purchasing Vision Operations(USA) responsibility will also be notified.
1.
In the Notify Approver process, modify the
notification so that there is a timeout activated after 3 minutes.
2.
Create a new FYI notification and message that
will inform Purchasing Super Users that no response has been received.
3.
Modify the Notify Approver process so that the
first timeout transition links to a notification/message which you created in
step 2.
4.
Load Roles from Database.
5.
Create a new requisition and submit for
approval.
6.
Run the Workflow Background Engine concurrent
program from the System Administrator responsibility to process timeouts.
7.
Confirm the timeout was executed using the
Workflow Monitor (Query the Requisition in the Requisition Summary form,
navigate Tools à View Approval through Workflow.
Can we email Responsibilities?
…………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
For a notification activity, what is the purpose of the
“Expand Roles” checkbox? …………………………………………………….………………………………………………….……….
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
From
http://www-apps.us.oracle.com/fa/collateral/suppload_new.html “Release 11 -
Account Generator and Workflow”. Note: To test these modifications you will
have to run the faxagtst.sql from SQL*Plus, and enter the appropriate
parameters. Screen shots are from Workflow 2.0.3.
Example A: Changing the value of a segment for all
Book Level and Category Level Accounts
Problem. We want to change the Cost Center
detail from the Default CCID to the Distribution CCID for all Book Level
Accounts and Category Level Accounts noted in Table 1.1.
Steps.
1. Download
the FA Account Generator file from the Database.
2. From
the Navigator window, navigate to FA Account Generator/Processes/Generate
Default Account.
3. Double
click on Generate Default Account. We
need to modify the following:
·
Book Level Accounts
·
Category Level Accounts
4.
Double click on the Generate Book Level
Account process. The Generate Book Level
Account screen will appear.
5.
In the Generate Book Level Account screen,
double click on the Cost Center from CCID icon.
The Control Properties screen will appear.
6.
Select the Attribute Values tab.
7.
Select the attribute Code Combination ID by
clicking on the word “Code Combinatio...” and change the Value from “Default
CCID” to “Distribution CCID” in the pull down menu that appears. This step is demonstrated below.
8.
Return to the Generate Default Account
screen and locate the Generate Category Level Account Process. The Generate Category Level Account screen
will appear.
9.
In the Generate Category Level Account
screen, double click on the Cost Center from CCID icon. The Control Properties screen will appear.
10. Select
the Attribute Values tab.
11. Change
the value of the attribute “Code Combination ID” from Default CCID to
Distribution CCID, as in Step 7.
12. To
change the comment, click on the Process Activity tab in the Control Properties
window. In the comment field, change the
description to Cost Center from Distribution CCID.
Example B: Specifying a different value for a
segment based on account type
Problem. We want to specify a different Cost Center
segment value for the Asset Cost Account, a specific type of Category Level
Account. The Cost Center segment is
derived from the default for the Asset Cost account, but we will derive the
Cost Center segment from the Distribution CCID.
Asset Level Accounts and Book Level Accounts will continue to have their
Cost Center segment derived from the Default CCID as expected, and all other
Category Level Accounts (other examples are listed in Table 1.1) will also
continue to have their Cost Center segment derived from the Default CCID.
Solution. For the Category Level Account called Asset
Cost, we will create a new process path that designates a different value for
the Cost Center segment to derive its value.
All other accounts will use the default path to specify their Cost
Center segment values.
Steps.
1.
Download the FA Account Generator file from the
Database.
2.
From the Navigator window, navigate to FA Account
Generator / Processes / Generate Default Account.
3.
Double click on Generate Default Account to open the
Generate Default Account screen. We need
to modify the Cost Center segment of all of the Category Level Accounts.
4.
Double click on the Generate Category Level Account
process. The Generate Category Level
Account screen will appear.
5.
Change the function labels from “Name” to “Comment.
” Right click in the white space of the
Generate Category Level Account screen, then choose Show Label/Comment from the
menu (as shown below).
6.
Now, you will add two new functions to the Generate
Category Level Account process. In the
Navigator window, navigate to FA Account Generator/Standard Flexfield
Workflow/Functions. Note that one
function listed under this section is “Copy Segment Value from Code
Combination.”
7. In
the Navigator window, click and hold down the mouse on the words “Copy Segment
Value from Code Combination” and drag the mouse to the Generate Category Level
Account screen. Release the mouse
button, and you will see a new instance of this function. Create two instances.
8.
Change the function labels from “Comment” to
“Name.” Right click in the white space
of the Generate Category Level Account screen, then choose Show Label/Display
Name from the menu (as shown in Step 5).
9.
Reposition the two icons created in Step 7 so that one
is directly above the “Balancing Segment from Distribution CCID” icon and the
other is directly above the “Cost Center from Default CCID” icon.
10. Double
click on the icon now located directly above the “Cost Center from Default
CCID” icon. When the Control Properties
screen appears, select the Process Activity tab and enter the comment “Make the
Cost Account = Distribution CCID.”
11. Double click on the icon now located directly
above the “Balancing Segment from Distribution CCID” icon. When the Control Properties screen appears,
select the Process Activity tab and enter the comment “Balancing Segment from
Distribution CCID.”
12. Position
the mouse on the “Get Category Account Name” function icon and right
click. As you continue to hold down the
right mouse button, move the mouse to the new icon named “Balancing Segment
from Distribution CCID.” You will see a
new path line appear to connect the two icons as you drag your mouse across the
screen. When you release, a menu will
appear. Select Asset Cost from the menu,
as shown below:
13. Create
another path to connect the two new icons:
Position the mouse on the new “Balancing Segment from Distribution CCID”
icon and right click. As you continue to
hold down the right mouse button, move the mouse to the “Make the Cost Account
= Distribution CCID” icon.
14. Create
another path to connect the “Make the Cost Account = Distribution CCID” icon
and the “Account Value to Account Segment” icon as in Steps 12 and 13.
15. Modify
the attribute values of the two new icons.
Double clicking on an icon will open the Control Properties screen, from
which you may choose the Attribute Values tab.
The Attribute Values are listed in the tables below:
Balancing
Segment from Distribution CCID function.
|
|||
Name
|
Value
Type
|
Value
|
Type
|
Code
Combination
|
Item
Attribute
|
Default
CCID
|
Number
|
Segment
Identifier
|
Constant
|
Qualifier
|
Lookup
|
Segment
|
Constant
|
GL_BALANCING
|
Text
|
Replace
Existing
|
Constant
|
False
|
Lookup
|
Make
the Cost Account = Distribution CCID function.
|
|||
Name
|
Value
Type
|
Value
|
Type
|
Code
Combination
|
Item
Attribute
|
Distribution
CCID
|
Number
|
Segment
Identifier
|
Constant
|
Qualifier
|
Lookup
|
Segment
|
Constant
|
FA_COST_CTR
|
Text
|
Replace
Existing
|
Constant
|
False
|
Lookup
|
16. The
process should look like this upon completion:
You will notice that there are
two paths. If a code combination is
being generated for the asset cost, it will follow the top path. All other accounts will be generated via the
lower (default) path.
Example C: Specifying a
different value for a segment based on book
Problem. We want to set up our book such that the Cost
Center segment is derived from the Distribution CCID in the Corporate
Book. However, the Cost Center segment
is derived from the default CCID in the Budget Book or Tax Book.
Solution.
Steps.
1.
Download the FA Account Generator file from the
Database.
2.
From the Navigator window, navigate to FA Account
Generator/Lookup Types.
3.
Create a new Lookup Type.
a.
In the Navigator, place the cursor on the line labeled
“Lookup Types” and select it.
b.
From the Edit menu, choose New/Lookup Type.
c.
When the Oracle Workflow Navigator Control Properties
screen appears, enter:
·
Internal Name = BOOK_TYPE_CODE
·
Display Name = Books
·
Description = Book Type Code
d.
Choose the OK button.
4.
Create a Lookup CODE for each Asset Book.
a.
In the Navigator, place the cursor on the line labeled
“Lookup Types” and select it.
b.
From the Edit menu, choose New/Lookup CODE.
c.
When the Oracle Workflow Navigator Control Properties
screen appears, you will see that the Lookup Type is already of type
Books. Enter the following and choose OK
to save:
·
Internal Name = CORP
·
Display Name = US Corp Book
·
Description = US Corp Book
d.
From the Edit menu, choose New/Lookup CODE again.
e.
When the Control Properties screen appears, you will
see that the Lookup Type is already of type Books. Enter the following and choose OK to save:
·
Internal Name = TAX
·
Display Name = Federal Tax Book
·
Description = Federal Tax Book
5.
Assign the Result Type, a predefined Lookup Type. Result Types list the possible results
returned by this activity. (Note: Your workflow diagram may sometimes branch
depending on the value returned by your completed activity.) Navigate to FA Account Generator / Functions/
Get Book Type Code and double click on “Get Book Type Code.” When the Control Properties screen appears,
change Result Type by selecting Books from the pull-down menu. Note:
If the Result Type is grayed out and you do not have access to change it,
cancel out of the Control Properties screen,
navigate to the menu bar and select Help/About Oracle Workflow
Builder. Change your access level to an
integer less than 100, then press OK.
You may now change the Result Type as per the instructions.
6.
Navigate to FA Account Generator/Processes, then double
click on “Generate Default Account.”
7. We need to modify the Generate Book Level
Account process and the Generate Category Level Account process. Double click on the Generate Book Level
Account icon to address this process first.
8. Change the function labels from “Name” to
“Comment.” Right click in the white
space of the Generate Book Level Account screen, then choose Show Label/Comment
from the menu.
9. Now, you will add two new functions to the
Generate Book Level Account process. In
the Navigator window, navigate to FA Account Generator/Standard Flexfield
Workflow/Functions. Note that one
function listed under this section is “Copy Segment Value from Code
Combination.”
10. In the Navigator screen, click and hold down
the mouse on the words “Copy Segment Value from Code Combination” and drag the
mouse to the Generate Book Level Account screen. Release the mouse button, and you will see a
new instance of this function. Place it
above the “Cost Center from Default CCID” icon.
11. In the Navigator window, navigate to FA
Account Generator/Functions. Note that
one function listed under this section is “Get Book Type Code.”
12. In
the Navigator window, click and hold down the mouse on the words “Get Book Type
Code” and drag the mouse to the Generate Book Level Account screen. Release the mouse button, and you will see a
new instance of this function. Place it
above the “Balancing Segment from Distribution CCID” icon.
13. Double click on the “Get Book Type Code”
icon. When the Control Properties screen
appears, select the Process Activity tab and enter the comment “Book Type
Code.”
14. Double
click on the “Copy Segment Value from Code Combination” icon. When the Control Properties screen appears,
select the Process Activity tab and enter the comment “Cost Center from the
Distribution CCID.”
15. In
the Control Properties screen of the “Cost Center from the Distribution CCID”
icon, select the Attribute Values tab and enter the following values:
Name
|
Value Type
|
Value
|
Type
|
Code Combination
|
Item Attribute
|
Distribution CCID
|
Number
|
Segment Identifier
|
Constant
|
Qualifier
|
Lookup
|
Segment
|
Constant
|
FA_COST_CTR
|
Text
|
Replace Existing
|
Constant
|
False
|
Lookup
|
16. Position the mouse on the “Cost Center from
the Distribution CCID” function icon and right click. As you continue to hold down the right mouse
button, move the mouse to the new icon named “Account Segment from the Book
Control.” You will see a new path line
appear to connect the two icons as you drag your mouse across the screen.
17. Position the mouse on the “Book Type Code”
function icon and right click. As you continue to hold down the right mouse
button, move the mouse to the new icon named “Cost Center from Default
CCID.” You will see a new path line appear
to connect the two icons as you drag your mouse across the screen. When you release, a menu will appear. Select Default. This means that all other Book Type Codes
will use this Default.
18. Position the mouse on the “Book Type Code”
function icon and right click. As you continue to hold down the right mouse
button, move the mouse to the new icon named “Cost Center from Distribution
CCID.” You will see a new path line
appear to connect the two icons as you drag your mouse across the screen. When you release, a menu will appear. Select US Corporate Book.
19. Position the mouse on the “Cost Center from
Default CCID” function icon and right click. As you continue to hold down the
right mouse button, move the mouse to the new icon named “Account Segment from
Book Control.” You will see a new path
line appear to connect the two icons as you drag your mouse across the
screen. Once you reposition your icons,
the end result should appear similar to the picture show below:
20. From the Navigator window, navigate to FA
Account Generator/Processes/Generate Category Level Account to open the
Generate Category Level Account screen.
Repeat steps 8 through 19 for the Generate Category Level Accounts
Process.
1.
What are Master/Detail Coordination Activities
(refer to Workflow Online help)
……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
2.
Give an example of where Master Detail
Coordination activities can be used?(refer to Workflow Online help)
……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
Use the custom dynamic query function you created in
Exercise 4 to get the Employee Default Expense Account CCID.
If you were going
to create different accounts depending on whether it is an Asset or an Expense
Item, how would you determine whether an item is an expense or asset?
…………………………………………………….………………………………………………….…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………
Department Segment from Employees Default CCID
This customisation example was completed on the Vision
demonstration database for Release 11.0.1 Purchasing Requisition Account
Generator workflow. The Vision
Operations Accounting Flexfield is set up as follows:
·
Company
·
Department
·
Account
·
Sub-Account
·
Product
By default, the workflow will populate all accounting
segments with the Item Expense Account.
A common requirement is for Company/Cost Centre/Department information
to be populated from the Employee Default Expense Account. This customisation will populate the Charge
Account Department segment with the Employee Default Expense Account Department
segment .
Note:
1.
Copy the Build Expense Charge Account process,
and rename it as follows:
·
Internal Name: CUSTOM_EXPENSE_CHARGE_ACCOUNT
·
Display Name: Custom
Build Expense Charge Account
·
Description: Custom Build Expense Charge
Account
2.
Modify the Custom Build Expense Charge Account
process to be as follows:
3.
Populate the Custom Dynamic Query function with
the following attribute values:
·
COLUMN_NAME: Constant,
DEFAULT_CODE_COMB_ID
·
TABLE_NAME: Constant,
PER_ASSIGNMENT_V7
·
WHERE_COL_NAME: Constant,
DEFAULT_CODE_COMB_ID IS NOT NULL AND PERSON_ID
·
WHERE_VAL_NAME: Item
Attribute, To person id
·
RETURN_VAL_NAME: Constant,
RETURN_VAL_ATTR
4.
Populate the Copy Department from Employee CCID
(based on the Standard Flexfield Workflow function Copy Segment Value from Code Combination)with the following
attribute values:
·
CODE_COMBINATION_ID: Item Attribute, Return Value from Custom Dynamic
Query (if you can’t see this attribute it is because the attribute should be of
type NUMBER)
·
SEGMENT_IDENTIFIER: Constant, Name
·
SEGMENT: Constant,
Department
·
REPLACE_CURRENT_VALUE: Constant, False
Save this workflow to the database and test the creation
of requisition charge accounts under different scenarios.
Create a Descriptive Flexfield on the Item Category Codes
form in Purchasing. This DFF will be
used to hold the Natural Account.
Modify the PO Account Generator/PO Requisition Account
Generator such that the natural account for the Build Expense Charge Account
process is derived from the Category DFF, and all other segments are derived
from the Employee Expense Account.
Use the Assign Value to Segment function to assign the dff
account to the Accounting Flexfield.
Example D: Specifying a
different value for a segment based on a descriptive flexfield
Problem. We want to build accounting flex combinations
where the Asset Cost segment, a Category Level Account, is dependent on the
value stored in a descriptive flexfield.
For instance, we may have three different types of Additions: New
Additions, Late Additions, and Intercompany Additions. We want to store the type of addition in the
descriptive flexfield, then have Account Generator create the corresponding
accounting flex combinations based on the Addition type.
Solution. Since we are varying Asset Cost, we must be
working with a Category Level Account (see Table 1.1). We will create two attributes: Distribution
ID and Account Value Segment. Then,
Distribution ID will be passed into a customized PL/SQL function.
The PL/SQL function takes the
Distribution ID and determines the value of the account segment that is
required to build the proper accounting flex combination based on the
information in the descriptive flexfield.
For instance, if the PL/SQL function identifies that an addition of type
NEW is stored in the descriptive flexfield, it will return some value x. If a LATE addition is stored, then it will
return some value y.
========================================================
HINT: You should use the Custom Function we created in Exercise 4. For
example:
select ASSET_ID from FA_DISTRIBUTION_HISTORY where distribution_id =
select ASSET_KEY_CCID from FA_ADDITIONS where asset_id =
select SEGMENT1 from FA_ASSET_KEYWORDS where code_combination_id =
The use the Assign Value to Segment function to assign ‘Custom SEGMENT1
Item Attribute’ to the Company Segment.
=========================================================
This return value will be used to
populate the Account Value Segment, which is the other attribute that we
specified. The Account Value Segment can
then be used to create the appropriate accounting flex combination.
Steps.
1.
Download the FA Account Generator file from the
Database.
2.
From the Navigator window, navigate to FA Account
Generator/ Processes/ Generate Category Level Account.
3.
Double click on the Generate Category Level Account
process. The Generate Category Level
Account screen will appear.
4. From the Navigator window, navigate to FA
Account Generator/ Functions and highlight the word “Functions.”
5. Create a new function. With Functions selected in the Navigator
window, go to the Edit menu and choose New/ Function. The Control Properties screen should appear.
6.
In the Control Properties screen, enter the following:
·
Internal Name
= GET_DESC_ACCT
·
Display Name = Get Account Information
·
Description = Get Account Information
·
Function = of type PL/SQL
The PL/SQL
function must be written such that it takes a parameter DISTRIBUTION_ID
and returns the
appropriate value for the account based on what information is located in
the descriptive
flexfield.
·
Result Type = None
·
Press OK to create the new function “Get Account
Information.”
7. From the Navigator window, notice that the
new function “Get Account Information” is now listed under FA Account
Generator/ Functions. Highlight the
words “Get Account Information.”
8. Add an attribute to the Get Account
Information function. With “Get Account
Information” selected in the Navigator window, go to the Edit menu and choose
New/ Attribute. The Control Properties
screen should appear.
9.
In the Control Properties screen, enter the following:
·
Internal Name = DISTRIBUTION_ID
·
Display Name = DISTRIBUTION_ID
·
Description = Distribution ID
·
Type = Number
·
Default Values = Item Attribute, Distribution ID
·
Press OK to create the new attribute
“Distribution ID” for the “Get Account Information “ function. DISTRIBUTION_ID will then be listed as an
attribute in the Navigator window, as shown below:
10. Add another attribute to the Get Account
Information function. With “Get Account
Information” selected in the Navigator window, go to the Edit menu and choose
New / Attribute. The Control Properties
screen should appear.
11. In the Control Properties screen, enter the
following:
·
Internal Name = ACCOUNT_VALUE_SEG
·
Display Name = ACCOUNT_VALUE_SEG
·
Description = Account Value Segment
·
Type = Text
·
Press OK to create the new attribute “Account
Value Segment” for the “Get Account Information “ function. Account Value Segment will then be listed as
an attribute in the Navigator window,
12. Now that the function is created and its
attributes are defined, return to the Generate Category Level screen to
construct the process.
13. Change the function labels from “Name” to
“Comment. ” Right click in the white
space of the Generate Category Level Account screen, then choose Show
Label/Comment from the menu (as shown below).
14. Now, you will add the new function to the
Generate Category Level Account process.
In the Navigator window, navigate
to FA Account Generator/Functions to locate the “Get Account Information”
function.
15. In the
Navigator window, click and hold down the mouse on the words “Get Account
Information” and drag the mouse to the Generate Category Level Account
screen. Release the mouse button, and
you will see a new instance of this function.
Place the new icon directly above the path between the “Copy Segment
Value from Code Combination” icon and the “Assign Value to Segment” icon, as
shown below:
16. Highlight the path that connects the two
function icons “Copy Segment Value from Code Combination” and “Assign Value to
Segment.” Push the delete key to delete
this path. You will insert the new “Get
Account Information” function icon in between these two icons.
17. Position the mouse on the “Copy Segment Value
from Code Combination” function icon and right click. As you continue to hold down the right mouse
button, move the mouse to the new icon named “Get Account Information.” You will see a new path line appear to
connect the two icons as you drag your mouse across the screen.
18. Position the mouse on the “Get Account
Information” function icon and right click.
As you continue to hold down the right mouse button, move the mouse to
the new icon named “Assign Value to Segment.”
You will see a new path line appear to connect the two icons as you drag
your mouse across the screen.
19. When you have completed all of the steps, the end result should
appear something like this:
The task in this
exercise is to write and then execute a PL/SQL script that will launch the
workflow you created in Practice Exercise 1 (you find details of Workflow
Engine PL/SQL APIs in the Workflow User Guide and Online Help.
Question: Why do you have to issue a COMMIT at the end of the program?
EXAMPLE:
DECLARE
l_item_type VARCHAR2(100) := '&1';
l_item_key VARCHAR2(100)
:= '&2';
l_process VARCHAR2(100)
:= '&3';
BEGIN
wf_engine.createprocess(l_item_type,
l_item_key, l_process);
wf_engine.startprocess(l_item_type, l_item_key);
COMMIT;
END;
/
The task in this
exercise is to write and then execute a PL/SQL procedure that will launch the
workflow you created in Practice Exercise 3.
EXAMPLE:
DECLARE
l_item_type VARCHAR2(100) := '&1';
l_item_key VARCHAR2(100)
:= '&2';
l_process VARCHAR2(100)
:= '&3';
BEGIN
wf_engine.createprocess(l_item_type, l_item_key, l_process);
/** If you want to populate Item Attributes
wf_engine.SetItemAttrText( itemtype => '',
itemkey => ,
aname => '',
avalue => '');
**/
wf_engine.startprocess(l_item_type, l_item_key);
COMMIT;
END;
/
This task in this
exercise is to write a PL/SQL procedure which can be included in a Workflow to
launch a detail workflow from a master workflow (read the Master/Detail
Coordination Activities and the SetItemParent API and build your workflow and
code based on this)
EXAMPLE:
procedure
start_children ( itemtype in varchar2,
itemkey in
varchar2,
actid in number,
funcmode in varchar2,
resultout
in out varchar2) is
begin
-- if not run mode then end
if (funcmode != 'RUN') then
return;
end if;
SOME LOOP
wf_engine.CreateProcess(ItemType =>
itemtype,
ItemKey => to_char(child_key),
process => 'CHILD');
wf_engine.SetItemAttrText(itemtype
=> itemtype,
itemkey
=> to_char(child_key),
aname
=> '',
avalue =>
);
--
copy any item attributes that are referenced in messages
--
from the parent to the child
XXXXX := wf_engine.GetItemAttrText(
itemtype => ItemType,
itemkey => ItemKey,
aname => '');
wf_engine.SetItemUserKey(itemtype
=> itemtype,
itemkey => to_char(child_key),
userkey => );
wf_engine.SetItemAttrText(itemtype
=> itemtype,
itemkey => to_char(child_key),
aname
=> '',
avalue =>
);
wf_engine.SetItemAttrNumber(itemtype
=> itemtype,
itemkey => to_char(child_key),
aname => '',
avalue => );
--
define the parent child relationship
wf_engine.SetItemParent(itemtype
=> itemtype,
itemkey => to_char(child_key),
parent_itemtype
=> itemtype,
parent_itemkey
=> itemkey,
parent_context
=> null);
wf_engine.StartProcess( itemtype
=> itemtype,
itemkey => to_char(child_key));
end
loop;
resultout
:= wf_engine.eng_completed||':'||wf_engine.eng_null;
end;
end
start_children;
Practice Exercise 15 Solution
DECLARE
/** Remember to make the Item Key unique
XX is your PC Number
**/
l_item_key VARCHAR2(100)
:= '&1';
BEGIN
wf_engine.createprocess(‘WFCUSTXX’,
l_item_key , ‘WFHLWDXX’);
wf_engine.startprocess(‘WFCUSTXX’,
l_item_key);
COMMIT;
END;
/
Practice Exercise 16 Solution
DECLARE
l_item_key VARCHAR2(100)
:= '&2';
BEGIN
wf_engine.createprocess(‘WFCUSTXX’, l_item_key, ‘WFCMTXXX’);
wf_engine.SetItemAttrText( itemtype => 'WFCUSTXX',
itemkey => l_item_key,
aname => 'MYTESTVALUE',
avalue =>
'GREYHOUND');
wf_engine.SetItemAttrText( itemtype => 'WFCUSTXX',
itemkey => l_item_key,
aname => 'MYREFERENCEVALUE',
avalue =>
'WHIPPET');
wf_engine.startprocess(‘WFCUSTXX, l_item_key);
COMMIT;
END;
/
performer icon is not show , any resolution problem, please help me.
ReplyDelete