SlideShare a Scribd company logo
1 of 14
A Simple Workflow
WFB Install
• 首先需要从oracle官方站点下载一个wfb的
  安装包, 可以从下面的站点下载, 安装包版本
  是2.6.3.5大概170M:
 http://www.oracle.com/technetwork/database/options/wincli
 ent-101059.html
 需要注意的是wfb没有linux版本, 仅能运行
 在windows平台上.
WFB Preview
• 安装完成后打开wfb, 并打开一个示例wft文
  件, 注意红色区域的说明文字:
A simple workflow
• 此文档将会演示如何使用WFB创建一个简单的请假
  工作流, 该工作流实现如下功能:
  1, 发送一个请假申请到指定的审批人;
  2, 审批人收到该申请之后决定批准或者拒绝申请;
  之后申请人将收到FYI通知申请是否被批准.
  这个工作流演示了oracle workflow中的如下概念:
 – Item Type
 – Item Type Attribute
 – Process
 – Notification
 – Message
 – Lookup
 同时还讲到到如何装载一个工作流, 启动工作流, 通知
 查看等.
Create wfdemo.wft
• 使用File > Quick Start Wizard新建一个wft文件并默认创
  建一个Item Type(wft可以包含多个Item Type), 如下:
                    Persistence Type: 设置保存工作流运行时数据
                    的方式, 典型的运行时数据如通知数据, 有三个
                    选择:
                    Temporary 结合Number of Days指定数据的临时
                    保存天数, 需要手动运行并发请求来清除临时
                    数据;
                    Permanent 永久保存
                    Synchronous 不产生运行时数据, 仅针对
                    Synchronous流程, 极少使用
                    通常使用的是Temporary+0的组合, 后台定时运
                    行并发请求清除运行时数据.

 对于工作流的所有组成部分都有一个内部名和显示名,
 在这里分别输入Internal Name和Display Name. 之后保存
 为wfdemo.wft.
WFSTD
• WFSTD是在创建wft时默认被引入的Item
  Type, 它定义了一些基础的工作流元素被其
  他的Item Type引用:
  1, 活动
  start/end活动, and/or活动, wait活动.
  2, Lookup
  常用的有Approval/YesNo/Boolean等
Use Notification
             - FYI vs FYA
• Oracle工作流使用的通知分为两种类型: FYI和
  FYA类型. FYI全称是For your Information, 用于通
  知收件人某件事情正在发生, 收件人无需采取
  任何动作, 流程也不会因为FYI通知而停止; FYA
  全称是For your Action, 通常用于获取收件人的
  审批, 流程需要等待收件人的审批结果决定下
  一步的动作.
• 消息的FYI和FYA类型是根据创建消息时时候指
  定Result Type来决定的, 如果为空则是FYI类型,
  非空则是FYA类型.
Use Notification
            - Message
• 在使用通知节点之前, 首先需定义消息, 双击Navigator窗口
  中的消息节点, 按照如下步骤定义:




                       对于使用在FYA通知的消息
                       需要定义与FYA通知相同的
                       result type.
Use Notification
              - Lookup
• 接下来创建一个lookup, 对于FYA的通知需要用到lookup
  type来标识通知的审批结果. 双击Lookup Type节点新建一
  个lookup type之后再添加两个lookup code, 如下:
Use Notification
                - FYA
• 新建一个通知节点, 分别使用刚创建的
  lookup type 和 message来设置Result Type和
  Message字段, 之后将该通知节点拖放到流
  程绘制区域:
                              可以看到目前FYA节点没
                              有出来的线条, 因为FYA
                              节点需要根据动作的结
                              果选择下一步.
Use Notification
            - Performer
• 创建一个通知节点时, 需要指定该通知节点的接收人, 这里
  为了让示例更为接近真实情况, 使用工作流属性(Item Type
  Attribute)来设置. 首先先创建一个工作流属性, 然后设置该
  通知节点的Performer属性:
Item Type Attribute
• 工作流属性可以理解为工作流的全局变量, 这些属性会被
  工作流的通知或者消息等引用, 可以在工作流启动或者运
  行时对这些属性进行设置. 通过右键单击导航区域的属性
  节点添加一个工作流属性:
              1, 类型
              Text   文本类型, 可以指定长度;
              Number 数字类型;
              Date   日期;
              Lookup 可以指定为某个Lookup;
              Form   可以指定为EBS中定义的function,
                     使用function的名字;
              URL    链接
              Document 使用plsql生成的一段文本
              Role   通知收件人, 取wf_role中的用户名
              Event  业务事件类型
              2, 默认值
              可以取常量或者引用另一个属性的值
Use Notification
              - FYI
• 根据请假FYA通知Result Type的设置会有两个结果:
  Approve和Reject, 分别给申请者发送FYI通知申请结
  果. 这里需要创建一个工作流属性定义请假申请人,
  和发送给该申请人的两个FYI通知, 如下:




 保存该wft文件, 如果没有弹出任何错误, 则
 说明流程的定义是正确的.
END

More Related Content

Similar to 2, a simple workflow

基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Betazhu02
 
基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Betafulin tang
 
基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Betazwxgo
 
5, workflow function activity
5, workflow function activity5, workflow function activity
5, workflow function activityted-xu
 
深入研究 Windows 系統服務 效能調校與故障排除
深入研究 Windows 系統服務    效能調校與故障排除深入研究 Windows 系統服務    效能調校與故障排除
深入研究 Windows 系統服務 效能調校與故障排除5045033
 
Alibaba Service Framework Practice
Alibaba Service Framework  PracticeAlibaba Service Framework  Practice
Alibaba Service Framework PracticeShawn Qian
 
Power flow簡介
Power flow簡介Power flow簡介
Power flow簡介Sky Wu
 
Auto fac的介紹 20131018
Auto fac的介紹 20131018Auto fac的介紹 20131018
Auto fac的介紹 20131018LearningTech
 
Auto fac的介紹 20131018
Auto fac的介紹 20131018Auto fac的介紹 20131018
Auto fac的介紹 20131018LearningTech
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano旭 張
 
中远公司 Java培训资料
中远公司  Java培训资料中远公司  Java培训资料
中远公司 Java培训资料yiditushe
 
JNC WMS Solution
JNC WMS SolutionJNC WMS Solution
JNC WMS SolutionJncits Tsai
 
Jnc wms solution
Jnc wms solutionJnc wms solution
Jnc wms solutionJncits Tsai
 
第一次用 PHPUnit 寫測試就上手
第一次用 PHPUnit 寫測試就上手第一次用 PHPUnit 寫測試就上手
第一次用 PHPUnit 寫測試就上手Yi-Ming Huang
 
Monitouch Express Vol26
Monitouch Express Vol26Monitouch Express Vol26
Monitouch Express Vol26monitouch
 
阿里巴巴运维自动化的探索与规划
阿里巴巴运维自动化的探索与规划阿里巴巴运维自动化的探索与规划
阿里巴巴运维自动化的探索与规划mysqlops
 
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划colderboy17
 

Similar to 2, a simple workflow (20)

基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta
 
基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta
 
基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta基于Lucene的站内搜索 Beta
基于Lucene的站内搜索 Beta
 
5, workflow function activity
5, workflow function activity5, workflow function activity
5, workflow function activity
 
深入研究 Windows 系統服務 效能調校與故障排除
深入研究 Windows 系統服務    效能調校與故障排除深入研究 Windows 系統服務    效能調校與故障排除
深入研究 Windows 系統服務 效能調校與故障排除
 
Alibaba Service Framework Practice
Alibaba Service Framework  PracticeAlibaba Service Framework  Practice
Alibaba Service Framework Practice
 
Power flow簡介
Power flow簡介Power flow簡介
Power flow簡介
 
驗證與訊息
驗證與訊息驗證與訊息
驗證與訊息
 
Auto fac的介紹 20131018
Auto fac的介紹 20131018Auto fac的介紹 20131018
Auto fac的介紹 20131018
 
Auto fac的介紹 20131018
Auto fac的介紹 20131018Auto fac的介紹 20131018
Auto fac的介紹 20131018
 
Deployment with Capistrano
Deployment with CapistranoDeployment with Capistrano
Deployment with Capistrano
 
中远公司 Java培训资料
中远公司  Java培训资料中远公司  Java培训资料
中远公司 Java培训资料
 
Epp0716
Epp0716Epp0716
Epp0716
 
驗證與訊息
驗證與訊息驗證與訊息
驗證與訊息
 
JNC WMS Solution
JNC WMS SolutionJNC WMS Solution
JNC WMS Solution
 
Jnc wms solution
Jnc wms solutionJnc wms solution
Jnc wms solution
 
第一次用 PHPUnit 寫測試就上手
第一次用 PHPUnit 寫測試就上手第一次用 PHPUnit 寫測試就上手
第一次用 PHPUnit 寫測試就上手
 
Monitouch Express Vol26
Monitouch Express Vol26Monitouch Express Vol26
Monitouch Express Vol26
 
阿里巴巴运维自动化的探索与规划
阿里巴巴运维自动化的探索与规划阿里巴巴运维自动化的探索与规划
阿里巴巴运维自动化的探索与规划
 
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划
阿里巴巴 肖劲青 阿里巴巴运维自动化的探索与规划
 

More from ted-xu

11, OCP - awr & alert system
11, OCP - awr & alert system11, OCP - awr & alert system
11, OCP - awr & alert systemted-xu
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashbackted-xu
 
9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rmanted-xu
 
7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recoveryted-xu
 
6, OCP - oracle security
6, OCP - oracle security6, OCP - oracle security
6, OCP - oracle securityted-xu
 
5, OCP - oracle storage
5, OCP - oracle storage5, OCP - oracle storage
5, OCP - oracle storageted-xu
 
4, OCP - oracle networking
4, OCP - oracle networking4, OCP - oracle networking
4, OCP - oracle networkingted-xu
 
3, OCP - instance management
3, OCP - instance management3, OCP - instance management
3, OCP - instance managementted-xu
 
2, OCP - installing and creating a database
2, OCP - installing and creating a database2, OCP - installing and creating a database
2, OCP - installing and creating a databaseted-xu
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture introted-xu
 
12, OCP - performance tuning
12, OCP - performance tuning12, OCP - performance tuning
12, OCP - performance tuningted-xu
 
OPM Recipe designer notes
OPM Recipe designer notesOPM Recipe designer notes
OPM Recipe designer notested-xu
 
5, sed
5, sed5, sed
5, sedted-xu
 
4, grep
4, grep4, grep
4, grepted-xu
 
3, regular expression
3, regular expression3, regular expression
3, regular expressionted-xu
 
2, bash synax simplified
2, bash synax simplified2, bash synax simplified
2, bash synax simplifiedted-xu
 
1, shell intro
1, shell intro1, shell intro
1, shell introted-xu
 
6, awk
6, awk6, awk
6, awkted-xu
 
8, lamp
8, lamp8, lamp
8, lampted-xu
 
6, vim
6, vim6, vim
6, vimted-xu
 

More from ted-xu (20)

11, OCP - awr & alert system
11, OCP - awr & alert system11, OCP - awr & alert system
11, OCP - awr & alert system
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashback
 
9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman9, OCP - restore and recovery with rman
9, OCP - restore and recovery with rman
 
7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery7, OCP - configure database for backup and recovery
7, OCP - configure database for backup and recovery
 
6, OCP - oracle security
6, OCP - oracle security6, OCP - oracle security
6, OCP - oracle security
 
5, OCP - oracle storage
5, OCP - oracle storage5, OCP - oracle storage
5, OCP - oracle storage
 
4, OCP - oracle networking
4, OCP - oracle networking4, OCP - oracle networking
4, OCP - oracle networking
 
3, OCP - instance management
3, OCP - instance management3, OCP - instance management
3, OCP - instance management
 
2, OCP - installing and creating a database
2, OCP - installing and creating a database2, OCP - installing and creating a database
2, OCP - installing and creating a database
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture intro
 
12, OCP - performance tuning
12, OCP - performance tuning12, OCP - performance tuning
12, OCP - performance tuning
 
OPM Recipe designer notes
OPM Recipe designer notesOPM Recipe designer notes
OPM Recipe designer notes
 
5, sed
5, sed5, sed
5, sed
 
4, grep
4, grep4, grep
4, grep
 
3, regular expression
3, regular expression3, regular expression
3, regular expression
 
2, bash synax simplified
2, bash synax simplified2, bash synax simplified
2, bash synax simplified
 
1, shell intro
1, shell intro1, shell intro
1, shell intro
 
6, awk
6, awk6, awk
6, awk
 
8, lamp
8, lamp8, lamp
8, lamp
 
6, vim
6, vim6, vim
6, vim
 

2, a simple workflow

  • 2. WFB Install • 首先需要从oracle官方站点下载一个wfb的 安装包, 可以从下面的站点下载, 安装包版本 是2.6.3.5大概170M: http://www.oracle.com/technetwork/database/options/wincli ent-101059.html 需要注意的是wfb没有linux版本, 仅能运行 在windows平台上.
  • 3. WFB Preview • 安装完成后打开wfb, 并打开一个示例wft文 件, 注意红色区域的说明文字:
  • 4. A simple workflow • 此文档将会演示如何使用WFB创建一个简单的请假 工作流, 该工作流实现如下功能: 1, 发送一个请假申请到指定的审批人; 2, 审批人收到该申请之后决定批准或者拒绝申请; 之后申请人将收到FYI通知申请是否被批准. 这个工作流演示了oracle workflow中的如下概念: – Item Type – Item Type Attribute – Process – Notification – Message – Lookup 同时还讲到到如何装载一个工作流, 启动工作流, 通知 查看等.
  • 5. Create wfdemo.wft • 使用File > Quick Start Wizard新建一个wft文件并默认创 建一个Item Type(wft可以包含多个Item Type), 如下: Persistence Type: 设置保存工作流运行时数据 的方式, 典型的运行时数据如通知数据, 有三个 选择: Temporary 结合Number of Days指定数据的临时 保存天数, 需要手动运行并发请求来清除临时 数据; Permanent 永久保存 Synchronous 不产生运行时数据, 仅针对 Synchronous流程, 极少使用 通常使用的是Temporary+0的组合, 后台定时运 行并发请求清除运行时数据. 对于工作流的所有组成部分都有一个内部名和显示名, 在这里分别输入Internal Name和Display Name. 之后保存 为wfdemo.wft.
  • 6. WFSTD • WFSTD是在创建wft时默认被引入的Item Type, 它定义了一些基础的工作流元素被其 他的Item Type引用: 1, 活动 start/end活动, and/or活动, wait活动. 2, Lookup 常用的有Approval/YesNo/Boolean等
  • 7. Use Notification - FYI vs FYA • Oracle工作流使用的通知分为两种类型: FYI和 FYA类型. FYI全称是For your Information, 用于通 知收件人某件事情正在发生, 收件人无需采取 任何动作, 流程也不会因为FYI通知而停止; FYA 全称是For your Action, 通常用于获取收件人的 审批, 流程需要等待收件人的审批结果决定下 一步的动作. • 消息的FYI和FYA类型是根据创建消息时时候指 定Result Type来决定的, 如果为空则是FYI类型, 非空则是FYA类型.
  • 8. Use Notification - Message • 在使用通知节点之前, 首先需定义消息, 双击Navigator窗口 中的消息节点, 按照如下步骤定义: 对于使用在FYA通知的消息 需要定义与FYA通知相同的 result type.
  • 9. Use Notification - Lookup • 接下来创建一个lookup, 对于FYA的通知需要用到lookup type来标识通知的审批结果. 双击Lookup Type节点新建一 个lookup type之后再添加两个lookup code, 如下:
  • 10. Use Notification - FYA • 新建一个通知节点, 分别使用刚创建的 lookup type 和 message来设置Result Type和 Message字段, 之后将该通知节点拖放到流 程绘制区域: 可以看到目前FYA节点没 有出来的线条, 因为FYA 节点需要根据动作的结 果选择下一步.
  • 11. Use Notification - Performer • 创建一个通知节点时, 需要指定该通知节点的接收人, 这里 为了让示例更为接近真实情况, 使用工作流属性(Item Type Attribute)来设置. 首先先创建一个工作流属性, 然后设置该 通知节点的Performer属性:
  • 12. Item Type Attribute • 工作流属性可以理解为工作流的全局变量, 这些属性会被 工作流的通知或者消息等引用, 可以在工作流启动或者运 行时对这些属性进行设置. 通过右键单击导航区域的属性 节点添加一个工作流属性: 1, 类型 Text 文本类型, 可以指定长度; Number 数字类型; Date 日期; Lookup 可以指定为某个Lookup; Form 可以指定为EBS中定义的function, 使用function的名字; URL 链接 Document 使用plsql生成的一段文本 Role 通知收件人, 取wf_role中的用户名 Event 业务事件类型 2, 默认值 可以取常量或者引用另一个属性的值
  • 13. Use Notification - FYI • 根据请假FYA通知Result Type的设置会有两个结果: Approve和Reject, 分别给申请者发送FYI通知申请结 果. 这里需要创建一个工作流属性定义请假申请人, 和发送给该申请人的两个FYI通知, 如下: 保存该wft文件, 如果没有弹出任何错误, 则 说明流程的定义是正确的.
  • 14. END

Editor's Notes

  1. 说明: