没有合适的资源?快使用搜索试试~ 我知道了~
首页peoplesoft awe开发
peoplesoft awe开发
4星 · 超过85%的资源 需积分: 50 63 下载量 94 浏览量
更新于2023-06-29
评论 1
收藏 3.39MB PDF 举报
最近在网上下了一个关于 peoplesoft AWE的开发资料,不刚独享,希望对初学者有所帮助。因为这方面的资料确实太少了,希望有资料的同志都上传吧,帮助一下我们这些菜鸟!
资源详情
资源评论
资源推荐
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
Blind folio: 91
Chapter
3
Approval
Workflow Engine
ch03.indd 91 5/4/10 10:28:41 AM
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
PeopleSoft PeopleTools Tips & Techniques
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
Chapter 3: Approval Workflow Engine
urchase requisitions, training requests, and employee transfers are some of the
many enterprise transactions that require approval. Some transactions, such as
training requests, may require a single-level manager or supervisor approval; other
transactions may use complex routing rules to determine the approval path. For
example, a purchase requisition for an item costing $10,000 or less may require no
more than a manager’s signature, whereas a purchase requisition for a single item
costing $100,000 or more may require a senior vice president’s approval. Prior to electronic
workflow systems, the approval process consisted of signed forms routed from one approver to
the next.
Prior to PeopleTools 8.48 and PeopleSoft 9.0, PeopleSoft applications used a PeopleTools
approval framework called Virtual Approver. In PeopleTools 8.48, PeopleSoft introduced the
Approval Workflow Engine (AWE). While some Financials and Supply Chain modules adopted
AWE as early as version 8.8, the 9.0 version was the first to extensively use AWE.
AWE began as a custom workflow engine for PeopleSoft’s Supply Chain Management module
in version 8.8. The Supply Chain team continued to improve the workflow engine through
release 8.9. In 9.0, many application development teams switched from Virtual Approver and
legacy workflow to the new AWE. Since AWE is now a core component of PeopleTools 8.48,
you can use it with any PeopleSoft application version.
At the time of this writing, the best available documentation for AWE is the “Approval Workflow
Engine (AWE) for HCM 9.0” and the “Delegation Framework for HCM v. 9.0” red papers available
from Oracle’s support site, http://support.oracle.com. These red papers complement this chapter.
In this chapter, you will learn how to workflow-enable transactions, reduce your modification
footprint, and use AWE from web services and batch processes.
The screenshots and navigation presented in this chapter were taken from a PeopleSoft HRMS 9.0
application. Even though AWE is a PeopleTools component that exists in every PeopleTools 8.48 and
higher PeopleSoft application, the menu navigation for AWE metadata is application-specific. In
HCM, the menu navigation for AWE is under Set Up HRMS | Common Definitions | Approvals. In
Financials, it is under Set Up Financials | Supply Chain | Common Definitions | Approvals.
Workflow-enabling a transaction is a joint effort between developers and functional experts. Once
a developer creates some supporting definitions, a functional expert can configure notifications
and complex approval rules. This contrasts with the prior PeopleTools workflow engine, which
required App Designer access to design and implement workflow activities, steps, rules, and
routings.
Workflow-enabling a transaction consists of the following tasks:
Create supporting definitions: record, SQL, and application class definitions. ■
Configure metadata. ■
Modify the source transaction. ■
In Chapter 2, we created a Web Asset component. Continuing that example, we want to add
the requirement that prior to using a web asset, a member of the Portal Administrator group must
approve the content and the web asset use case. In this chapter, we will use AWE to enhance the
Web Assets page to ensure a web asset is approved before making it available for use.
P
ch03.indd 92 5/4/10 10:28:42 AM
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
Chapter 3: Approval Workflow Engine
AWE uses queries, SQL definitions, and application classes to provide data and business logic for
routing and notifications. It also uses custom record definitions to store information about the
state of an approval.
Transactions are composed of header and detail values. A transaction encompasses all of the data
that represents a single unit. We identify a transaction through its header values. The level 0 scroll
area, for example, is a transaction’s header record. Level 1 and all the levels below it make up the
transaction’s detail records. Approving a transaction, therefore, requires approving the transaction
header.
AWE maintains approval information in its own transaction tables. The link between AWE’s
transaction tables and the main transaction table is called the cross-reference record and is defined as
containing the subrecord PTAFAW_XREF_SBR plus the transaction’s keys. The cross-reference record
is similar to the attachment repository record we used in the previous chapter, in that we create the
record and point PeopleTools to the record, but we never actually modify data within the record.
Figure 3-1 shows our new web assets cross-reference record, named APT_WA_AWE_XREF.
This will serve as the cross-reference record between web asset transactions and the corresponding
AWE transaction. Save and build the APT_WA_AWE_XREF record.
Web assets cross-reference record
ch03.indd 93 5/4/10 10:28:42 AM
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
PeopleSoft PeopleTools Tips & Techniques
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
Chapter 3: Approval Workflow Engine
Each process has its own set of thread IDs. The AWE framework stores these thread IDs in a
record named PTAFAW_IDS. Since we created a new cross-reference record, we will need to add
a new row to the thread ID table, PTAFAW_IDS. AWE uses the thread ID as part of the cross-
reference table’s primary key. Since PeopleTools does not provide a user interface for maintaining
thread IDs, we will need to add a new thread ID value using SQL. The following SQL inserts a
new counter into the PTAFAW_IDS record:
INSERT INTO PS_PTAFAW_IDS(PTAFCOUNTERNAME, PTAFAWCOUNTER)
VALUES ('APT_WA_AWE_XREF', 1);
/
COMMIT
/
The value you provide for PTAFAWCOUNTER is the initial value to be used for thread IDs.
Consider it similar to the first check number when opening a new checking account. Once you
set the value, you can never go back and change it. For a new checking account, you might
choose to start your checks with a number like 1000, so recipients won’t question the integrity of
your checking account. With thread IDs, the starting number doesn’t matter as much. Therefore,
it seems reasonable to start thread IDs at 1. After we create our first web asset approval
transaction, the AWE framework will begin incrementing this value.
AWE triggers events throughout the approval cycle. For example, when a user submits a workflow
transaction, AWE triggers the OnProcessLaunch event. We can handle these events by creating
an event handler application class and registering the event handler with the approval process
definition.
The event handler pattern used by AWE is common to OOP. Java, for example, uses
registered event handler callbacks to notify listeners as events arise. The difference between the
AWE implementation and a Java implementation is that a Java object that triggers events may
have multiple registered listeners, whereas AWE allows only one. At the end of this chapter,
I will show you how to add this functionality with a custom event handler.
Event handlers are subclasses of PTAF_CORE:ApprovalEventHandler. The AWE
framework will call the appropriate event handler method as the event occurs during the course
of a transaction’s life cycle. Since the default handler methods do not contain any business logic,
you need to implement only the events required for your business process. The rest of the events
will be handled by the base class methods, allowing you to ignore events that are irrelevant to
your business process.
The HRMS-specific documentation recommends subclassing the
HMAF_AWE:Wrappers:ApprovalEventHandler class instead.
Other modules and PeopleSoft applications may have similar
recommendations. Consult your application-specific documentation
for additional information. Since this example is meant to apply to any
application that uses PeopleTools, it will use the base PTAF_CORE
application classes.
ch03.indd 94 5/4/10 10:28:43 AM
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
/ PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9 / PeopleSoft PeopleTools Tips & Techniques / Jim J. Marion / 493-9
Chapter 3: Approval Workflow Engine
The following code listing contains declarations for the common event handler methods. For
a complete list, use App Designer to open the PTAF_CORE:ApprovalEventHandler
application class’s PeopleCode editor.
method OnProcessLaunch(&appInst As PTAF_CORE:ENGINE:AppInst);
method OnStepComplete(&stepinst As PTAF_CORE:ENGINE:StepInst);
method OnStepPushback(&userinst As PTAF_CORE:ENGINE:UserStepInst);
method OnStepReactivate(&stepinst As PTAF_CORE:ENGINE:StepInst);
method OnFinalHeaderDeny(&appinst As PTAF_CORE:ENGINE:AppInst);
method OnHeaderDeny(&userinst As PTAF_CORE:ENGINE:UserStepInst);
method OnHeaderApprove(&appinst As PTAF_CORE:ENGINE:AppInst);
Notice that each of these event handlers has some type of instance parameter. The type of
instance depends on the type of event. An approval event, for example, will receive an approval
instance. A step event, which occurs when an approval moves from one step to the next in the
approval chain, will receive an approval step instance. The instance parameter contains
properties and methods allowing you access to relevant AWE and transaction information. For
example, each of the instance classes has a thread property. The thread property corresponds to
the cross-reference record we created earlier. Since the cross-reference record contains
transaction header key values, event handlers have full access to the underlying transaction.
In our example, we will implement approve and deny handlers. These handlers will update
the status of a web asset. A web asset should not be available for use unless it is in approved
status. Since AWE maintains approval history, it isn’t necessary to maintain a transaction-specific
approved or denied flag. Nevertheless, I recommend maintaining an approval flag for
convenience. Whether you are writing reports, processes, or integration points, you may not want
to join your transactions to the AWE tables just to determine the approval state of a transaction.
The only accurate way to maintain an approval flag is through an approval event handler. In
this chapter, we will use the OnHeaderApprove and OnHeaderDeny event handler methods to
maintain the transaction record’s approval flag. This event-driven design contrasts with the legacy
workflow strategy, which involved updating the approval flag within an approval component. A
key difference between AWE and legacy workflow is that AWE does not require a component,
whereas the legacy workflow engine required a component to update workflow transactions.
Let’s create our web asset event handler. We’ll need a new application package, as discussed
in Chapter 1. Select File | New from the App Designer menu bar. When prompted for a definition
type, select Application Package. Save this new application package with the name APT_WA_AWE.
This new package will contain event handlers, user lists, criteria definitions, and many other
AWE-related application classes. After saving the new application package, add a new class
named WebAssetAppr_EventHandler. Add the following PeopleCode to this new class:
import PTAF_CORE:ApprovalEventHandler;
import PTAF_CORE:ENGINE:AppInst;
import PTAF_CORE:ENGINE:UserStepInst;
import PTAF_CORE:ENGINE:Thread;
class WebAssetAppr_EventHandler extends PTAF_CORE:ApprovalEventHandler
method OnHeaderApprove(&appinst As PTAF_CORE:ENGINE:AppInst);
method OnHeaderDeny(&userinst As PTAF_CORE:ENGINE:UserStepInst);
private
ch03.indd 95 5/4/10 10:28:43 AM
剩余49页未读,继续阅读
hanjian05140809
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论6