Programming Workflow Activity Guide - 4
Programming Workflow Activity Guide - 4
Activity Overview
From the Workflow Management Setup menu (G0241), select Queue Security. Give
Annette Walters, address number 2006, authority to view queues 24 and 49 for the
Employee Termination group. In addition, answer the following questions about queue
security:
Question Answer
1. How can you determine which distribution lists
have been set up in the EnterpriseOne system?
2. What are the descriptions or names of the two
queues to which you gave Annette Walters
authority?
3. What is the address book number for the
Employee Termination Approval group?
n l y
4. If you select the Public Security option and give
authority to the Collection Management queue,
e O
which users in the system can view the messages in
that queue?
U s
A I
This concludes the activity. Do not continue.
O
l &
n a
te r
I n
c l e
r a
O
n l y
e O
U s
A I
O
l &
na
te r
I n
c l e
r a
O
l y
Slide 181 ______________________________________________________________________________________________________
n
Activity Overview
e O
You can use the work order system to:
U s
EnterpriseOne includes a work order system that you can use for a variety of purposes.
• Manage projects.
A I
• Repair and maintain equipment.
O
• Manufacture items.
l &
•
a
Provide support services.
n
te r
Your company has decided to use the basic work order system to track capital projects.
Because the costs associated with capital projects can be very high, these projects must
I n
be approved before any work is started. In this activity, you will create a workflow
process to automate the approval process for this type of project.
cle
Work orders consist of a work order header, which contains:
O ra •
•
The business unit to be charged.
The information entered into the header depends on the type of project or the type of
work being performed. Each work order has a unique number for tracking and reporting
purposes.
Note. Work order entry actually uses two applications: the Work With Work Orders
(P48201) application and one of three work order entry programs. P48201 uses a
processing option to determine which work order entry program to call. The work order
entry program that you will use in this activity is Project Task Details (P48014).
At your company, the approval process for capital projects begins when the project is
entered into the work order system. The work order contains basic information about the
work to be done. Obtaining the necessary approvals is managed through the workflow
process. The approval routing and status of the work order are determined by the
following factors:
This category code is assigned when the work order is created. All type 3 work
orders must be approved.
• Type 3 work orders created for business units 1 or 9 must be approved by the
Accounting department.
• Michael Josephson approves the type 3 work orders for all other business units.
• For business units 1 or 9, the estimated dollar amount of the work order determines
which people on the distribution list need to approve it.
n l y
You will set up a distribution list specifying the people on the list and their threshold
amounts.
e O
•
s
The originator must be notified when the project is accepted or rejected.
U
•
I
The status of the work order must be pending (E3) until it is accepted or rejected.
A
If rejected, the status must change to disapproved (D). If accepted, the status must
O
change to approved (E4). The table for work order information is the Work Order
Master table (F4801).
te r
An order entry clerk enters a work order into P48014, Project Task Revisions.
I n• If the work order type is 3 (Capital Projects), the work order enters into
c l e •
workflow.
O A message informs the clerk that the order has entered the work order workflow
process.
Approval is required for capital work orders. The approval form is sent either to a
distribution list or to Michael Josephson, depending on the business unit that was
entered on the work order.
• If the business unit entered on the work order is equal to 1 or 9, the approval
form is sent to the Accounting department distribution list (address book number
112<last two digits of your user ID>.
• If the business unit is not equal to 1 or 9, the approval form is sent to Michael
Josephson.
The database is updated by a business function. The business function takes the
values from the approval form and updates the database with an E4 (approved) or D
(disapproved).
6. The order entry clerk, the originator of the work order, is sent a message that the
work order has either been approved or rejected.
e O
Create Capital Projects
Work Order
U s Triggering Event
O PROCESS
l &
n a
Approve Reject
te r
I n
c le
r a
O Exit Workflow Process
Create a Project
Create a project for the new workflow object. The project should contain all the objects
that you create or modify for the Capital Projects Approval workflow.
e O
s
Create Capital Projects
Triggering Event
Work Order
I U
Enter Workflow
A
Send Message to Approver
O
WORK ORDER APPROVAL
PROCESS
l &
n a
Approve Reject
te r
Send Accepted Message to
Originator
Send Rejected Message to Originator
I n
c l e
r a Update Work Order
Status to E4 or D
Use variables in each message to provide specific data regarding each instance of the
process. Name each message template as follows:
You need a message to request approval from the recipient. Create LM561<last two
digits of your user ID>A as the message to the approver with text similar to the
following:
WORK ORDER
WO Number: &1
You need a message to notify the originator if the work order is approved, which
means that it is accepted. Create LM561<last two digits of your user ID>B for the
Accepted message, with text similar to the following:
WORK ORDER
The Capital Project work order &1 for the estimated amount of &2 has been
approved.
n l y
You need a message to notify the originator if the work order is rejected. Create
to the following:
e O
LM561<last two digits of your user ID>C for the rejected message, with text similar
WORK ORDER
U s
rejected.
A I
The Capital Project work order &1 for the estimated amount of &2 has been
n a
•
•
te r
Name the key data structure WF5601<last two digits of your user ID>A.
I n
Data Dictionary Alias Structure Member Name Data Item
r a
O • Name the additional data structure WF5601<last two digits of your user ID>B.
Important! Be certain that you change the structure member names in each data
structure as shown below. Changing the structure member name will make the data item
more identifiable when you create workflow tasks.
• Answer these questions about the data dictionary items in the Capital Projects
Approval workflow process:
l &
n a
te r
Create a Workflow Object in OMW
Perform the following steps to create a workflow object:
I n
1. In the TRN<last two digits of your user ID>102 project, create the Capital Projects
c l e Approval workflow process. Name it K5601<last two digits of your user ID> and
enter the following information:
O Process
Version
K5601<last two digits of your user ID>
1
Description Capital Projects Approval <last two digits of your
user ID>
3. After creating the workflow object, on the Attachments tab enter information to
describe what the workflow process does.
A named event rule is needed to update the status code in the Work Order Master table
(F4801) when the work order has been approved or rejected. Create a data structure and
named event rule to update the status code in the Work Order Master table. The status
code will change to E4 (Approved) if the work order is approved, or D (Disapproved) if
the work order is rejected.
e O
information:
U s
1. On the Add EnterpriseOne Object to the project form, enter the following
Field
A I Value or Status
Object Name
Description O D564801<last two digits of your user ID>
Work Order Approval Data Structure
Product Code
l& 56
na
Product Reporting Code 56
Object Use
t e r
Regular Data Structure
360
Selected
I n
c le
2. Include the following items in the data structure:
O APPRACT
SRST
cApprovalActionCode
szStatusCode
ApprovalActionCode
StatusCode
DOCO mnDocumentOrderInvoiceE DocumentOrderInvoiceE
3. Create named event rule N56480<last two digits of your user ID>to update the status
code to E4 if the work order is approved, or update the status code to D if the work
order is rejected.
Note. You need a business function to pass the values of the Approved and Rejected
options from the approval form to the status field in the table. As mentioned earlier,
the options on the form return a value of A for Approved and R for Rejected.
However, the Work Order Master table (F4801) table requires status codes of E4 for
Approved and D for Disapproved. You will use assignments to associate these values
before updating the table.
a. On the Add EnterpriseOne Object to the project form, enter the following
information:
n l y
e O
b. On Business Function Design, use STA1<last two digits of your user ID> as the
Parent DLL.
U s
Field A I
c. To define the business function, enter the following information in the grid:
Value or Status
Function Name O F4801UpdateWOStatusCode<last two digits of
te r 3
I n
c l e d. Select Parameters from the Row menu and attach data structure D564801<last
two digits of your user ID>.
r a e. Select Edit from the Row menu and enter the following event rules:
BF szStatusCodeWo = “D”
End If
End If
F4801.Update
Note. To create the F4801 Table I/O event rule, follow these steps:
2. Click Next.
4. Click Next.
DocumentOrderInvoiceE = BF mnDocumentOrderInvoiceE
StatusCodeWO Å BF szStatusCodeWO
6. Click Finish.
4. When the business function is complete, build it by using the Build Business
Function option.
O
Consider the following when you configure the tasks:
•
l &
What types of tasks do you need to create (message, business function, or batch
a
application, and so on)?
n
•
•
te r
Should the Generic Workflow Approval (P98805) form be attached to the task?
I n
c e
Note. For the time being, use address book number 1001 for the recipient of the Askaprvl
l
task. After you complete the workflow process and test it, you will design a distribution
list and recipient conditions for the task to route messages correctly.
r a
O •
•
Should a message template be attached to the task?
• Attach N56480<last two digits of your user ID> to the update activity to update
the work order status to E4 or D.
3. Before creating the tasks in Workflow Modeler, enter the necessary information
about each task in the table below.
Use the description and the diagram of the workflow process to determine the task
flow.
e O
Triggering Event
Enter Workflow
U s
WORK ORDER APPROVAL PROCESS
A I
Send Message to Approver
Task: ASKAPRVL
If Approval Action
Code is equal to A IFAPPROVED O IFREJECTED
If Approval Action
Code is equal to R
l &
n
Originator
a
Send "Accepted" Message to Send "Rejected" Message to
Originator
te r
Task: ACCEPTED Task: REJECTED
c l e Status to E4 or D
Task: UPDATE
• After you have added the transitions and transition conditions, validate the workflow
process.
If there are errors, correct them and rerun the validation until the message “Workflow
is Valid” appears.
3. Calling the Pending Review Notification form if you are using standard workflow
notification messages.
Note. Work Order entry actually uses two applications: the P48201 Work With Work
Orders application and one of three work order entry programs. The P48201 uses a
processing option to determine which work order entry program to call. The work order
entry program that you will use in this activity is P48014 Project Task Details. To use the
l y
P48201 and the P48014 to enter work orders in the training environment, you must copy
n
both applications and then change some of the event rules, as described below.
e O
1. In Object Management Workbench, search for the Work With Work Orders (P48201)
application and then add it to the TRN<last two digits of your user ID>102 Capital
Projects Approval project.
U s
A I
2. Copy the application and its associated processing option template and name them
P56481<last two digits of your user ID> and T56481<last two digits of your user
ID> respectively.
O
&
3. Click OK to return to Object Management Workbench.
l
a
4. Remove P48201 from your project.
n
te r
5. In OMW, search for the Project Task Details (P48014) application and then add it to
the TRN<last two digits of your user ID> 102 Capital Projects Approval project.
I n
6. Copy the application and its associated processing option template and name them
P56482<last two digits of your user ID> and T56482<last two digits of your user
c le ID> respectively.
9. Search for WOACTRULES, the workflow process used by Project Task Details
(P48014), and move it into the TRN<last two digits of your user ID>102 Capital
Projects Approval project.
10. Deactivate WOACTRULES so that it does not interfere with your new process.
Note. In the client/server training environment, only one person will be able to
deactivate the process. Check the process to see if the status is active or inactive. If it
is active, deactivate it. If the status is already inactive, do not change it.
11. Verify the K5601<last two digits of your user ID> workflow process is active.
12. Click P56482<last two digits of your user ID> and enter the design mode to attach
the workflow process, using the following steps.
a. Add the event rules to the OK button, Post Button Clicked event.
c. Add event rules to start the workflow process only if the work order type is equal
to 3.
d. Add event rules to start the K5601<last two digits of your user ID> Capital
Projects Approval workflow process.
This form sends the originator the Pending message when the work order enters
the workflow process. No parameters are passed.
f.
l y
Save your changes and exit P56482<last two digits of your user ID> to return to
OMW.
n
click Design.
e O
13. Click P56481<last two digits of your user ID> Work With Work Orders and then
U s
14. Change the event rules to call the P56482<last two digits of your user ID> Project
Task Details form, using the following steps:
A I
a. On the Dialog is Initialized form, add the following assignment at the beginning
O
of the event rules to set the processing option value to call the Project Task
Details form:
l &
PO Work Order Program = 2
n a
te r
b. On the Add button -- Button Clicked event, locate the Call Simple Work Order
Entry section. Disable the form interconnect to Project Task Details (P48014).
I nc. On the Add button -- Button Clicked event, create a form interconnect to
c l e P56482<last two digits of your user ID> Project Task Details in the Call Simple
Work Order Entry section.
c. Click OK.
n
Remodel Gym/Upgrade Equipment
General Tab W.O. Status E3
e O
Type
Charge to BU
U
3
3s
Dates/Assignments Tab
Ext. Amount
Originator
A I 50000
2011<last two digits of your user ID>
O
b. Click OK.
l &
n a
te r
c. You should receive a message indicating that the order is pending approval.
I n
e. Click Close.
cle f. After you have entered both work orders and received the Pending Notification
r a form, go to menu G02 and select Workflow Advanced & Technical Operations.
g. Select Process Task Monitor and verify that the K5601<last two digits of your
O user ID> process has begun.
h. From the Employee Queue Manager on menu G02, find address book number
1001 and select View Mail from the Row menu.
i. On the Employee Queue Manager [Work Center] form, open the Work Order
Approval folder.
You can see two work order approval requests. Both should be the LM561<last
two digits of your user ID>A message that you created previously.
j. Click the first work order approval request and approve it.
k. Click the second work order approval request and reject it.
The first message should be the LM561<last two digits of your user ID>B
approved message that you created in a previous activity. The second message
should be the LM561<last two digits of your user ID>C rejected message, which
you created in the same activity.
o. In Universal Table Browser (UTB), find the Work Order Master table (F4801)
table and see if the status in the WASRST column for each work order has been
updated from E3 to either E4 or D.
If all the appropriate messages were sent and the database was updated with the correct
status codes, your work order process is successful.
•
U s
Accounting supervisors must approve all capital projects.
•
A I
The Accounting Manager must approve all capital projects over 10,000.
•
O
The Controller must approve all capital projects over 100,000.
•
l &
The Chief Financial Officer must approve all capital projects over 500,000.
•
n a
The President must approve all capital projects over 1,000,000.
•
te r
Authorization is required for all capital projects.
•
I nOnly one approval is required at each level. However, a higher-level group can
c l e approve a capital project without prior approval from lower level groups.
O Accounting Supervisors:
Josephine Breton 4801
Chester Ebby 5127
After the Capital Projects Approval process has been tested to verify that it works
correctly, create a distribution list for the Accounting department using the criteria
specified above. Follow these steps:
n l y
Tax ID
Search Type
Blank
M
e O
Business Unit 9
U s
A I
2. Create a distribution list structure type by entering the following information:
O
Field
Codes
l & Value or Status
W<last two digits of your user ID>
Description 1
n a Capital Projects <last two digits of your user ID>
Special Handling
te r
I n
Hard Coded N
c le
3. To create the distribution list, enter AMTO in the Associated Data Item field.
r a 4. Add the distribution list to the appropriate task in the K5601<last two digits of your
O user ID> workflow process.
7. Test the process with the new distribution list by selecting P56481<last two digits of
your user ID> and Run the Application on the Design Tools tab.
c. Click OK.
e
Header Order Number
Description
U s
115<last two digits of your user ID>
Remodel Cafeteria
General Tab W.O. Status
Type A I E3
3
Charge to BU O 3
l&
Ext. Amount 40000
na
Dates/Assignments Tab Originator 2011<last two digits of your user ID>
e r
I nt
b. Click OK.
c l e You should receive a message indicating that the order is pending approval.
d. Click Close.
O e. After you have entered both work orders and received the Pending Notification
form, go to menu G02 and select Workflow Advanced & Technical Operations.
f. Select Process Task Monitor and verify that the K5601<last two digits of your
user ID> process has begun.
g. From the Employee Queue Manager on menu G02, find address book number
4801 and select View Mail from the Row menu.
h. On the Employee Queue Manager [Work Center] form, open the Work Order
Approval folder.
You should see two work order approval requests. Both should be the
LM561<last two digits of your user ID> A message that you created previously.
i. Click the first work order approval request and approve it.
j. Click the second work order approval request and approve it.
l. Find address book number 4802 and select View Mail from the Row menu.
There should be one work order approval request in the amount of 40,000.
n l y
One should be the LM561<last two digits of your user ID> C approved message
s
p. Go to menu G02 and select Workflow Advanced & Technical Operations.
U
A I
q. Select Process Task Monitor and verify that the K5601<last two digits of your
user ID> process instances are at a Completed status.
O
Note. As you are testing, you might discover that you need to make changes to the
n a
te r
Use the Copy feature in OMW to create a new version of the K5601<last two digits of
your user ID> process. Deactivate the first version. Then make changes to the new
process, activate it, and continue testing.
I n
c e
Purge the open instances of the K5601<last two digits of your user ID> process by using
l
Purge Completed Tasks and Purge Completed Processes on menu G02311. Use Purge
Completed Tasks to select by date the instances to purge. You can also access Purge
r a Completed Processes in OMW from the Workflow Operations tab in Workflow Design.
O When the purge is complete, you can deactivate the process, make changes, and continue
testing.
4. In OMW, click P56481<last two digits of your user ID> Work With Work Orders
and then click Design.
Location on Form
Header
Field
Order Number
Value or Status
n l y
116<last two digits of your user ID>
Description O
Replace Window
e
General Tab W.O. Status
Type
U s
E3
3
Charge to BU
Ext. Amount A I 1
700
Dates/Assignments Tab Originator O 2011<last two digits of your user ID>
l &
n a
c. Click OK.
te r
You should receive a message that the order is pending approval.
I n Because the value of the work order is 700, only the people in Group 1 of the
b. Click OK
You should receive a message indicating that the order is pending approval.
Because the business unit is not 1 or 9, only Michael Josephson should get the
approval message.
d. Click Close.
When the workflow process sends the correct messages and updates the Work Order
Master (F4801) table appropriately, you have successfully completed the Final Activity.
U s
Enter Workflow
A I
Send Message to Approver
WORK ORDER APPROVAL
PROCESS
O
l
Approve& Reject
n a
te r
Send Accepted Message to
Originator
Send Rejected Message to Originator
I n
c le Update Work Order
r a Status to E4 or D
1. From Solution Explorer, select Object Management Workbench from the Tools
menu.
3. Under the Object Management Workbench section of the Add EnterpriseOne Object
to the Project form, select the option OMW Project.
n l y
6. Access the Dates tab.
e O
7. Enter the following information:
U s
Field
Date Started
A I
Value or Status
(Populated by the system)
Planned Completion Date
O <5 days past start date>
Date Entered
Completion Date
l & (Populated by the system)
Blank
n a
te r
8. Access the Attachments tab.
I n
9. Enter the following information: This project was created to add the Capital Projects
a
Adding an Owner to Your Project
r
O To add an owner to your project:
1. Expand your new project to reveal the Objects and Owners nodes.
5. Move your user ID into the project by clicking the Add Object or User to Project
arrow.
6. On the Add User to Project form, use the visual assist to select the developer role
(02).
n l y
3. On the Confirm Status Change form, use the visual assist on the blank field to select
the programming status: 21.
A I
2. On Add EnterpriseOne Object to the project, select Data Item and click OK.
O
3. Answer Yes to the Glossary Item message.
l &
4. On the Item Specifications tab, enter the following information:
a
Field
Alias
t e rn Value or Status
LM561<last two digits of your user ID>A
I n
Glossary Group Y
c le
Product Code
Product Code Reporting
56
56
O Error Level 3
5. Complete the Glossary tab with the text-substituted message specified in the Activity
Overview.
6. Click OK.
7. Repeat steps 1 through 6 to create messages LM561<last two digits of your user
ID>B and LM561<last two digits of your user ID>C.
1. Select the Objects node of the TRN<last two digits of your user ID>102 Capital
Projects Approval project and click Add.
2. On the Add EnterpriseOne Object to the Project form, select Data Structure and click
OK.
e O
Regular Data Structure Selected
U s
4. Click OK.
A I
O
5. On the Design Tools tab, click Data Structure Design.
l &
6. Define the data structure using data dictionary alias DOCO.
n a
7. Change the structure member name to mnWorkOrderNumber.
te r
8. Save the data structure and return to Object Management Workbench.
I n
9. The WF5601<last two digits of your user ID>A data structure should now be listed
r a 1. Select the Objects node of the TRN<last two digits of your user ID>102 Capital
O Projects Approval project and click Add.
2. On the Add EnterpriseOne Object to the Project form, select Data Structure and click
OK.
4. Click OK.
Important! Be certain that you change the structure member names in each data
structure as shown below. Changing the structure member name will make the data item
more identifiable when you create workflow tasks.
U s StatusCodeWOs
APPRACT cApprovalActionCode
A I ApprovalActionCode
O
&
7. Save the data structure and return to Object Management Workbench.
l
n a
8. The WF5601<last two digits of your user ID>B data structure should now be listed as
an object under the Capital Projects Approval project.
te r
9. The reasons for including the data items in the workflow process are as follows:
I n
1. Why is the WorkOrderNumber data item included The work order number is used to track each capital
cle
in the Capital Projects Approval workflow process?
2. Why is the Work Order Type data item included
project.
The only work orders being tracked are capital
O Capital Projects Approval workflow process? projects with business unit 1 or 9. Michael Josephson
approves all others.
4. Why is the Estimated Amount data item included The amount of the capital project determines who
in the Capital Projects Approval workflow process? needs to approve it.