分享
 
 
 

PowerFolder 工作流服务器版本0.5 试驾之旅(4)

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

2.3 SubmitInvoice提交发货单

2.3.1 Situation情景

Company employees must fill out a purchase request if they want new supplies of pencils, paper,

and toner. A purchase request total under $10 should be approved automatically, otherwise

someone from the accounting department must also approve. Pencils cost $0.50 each, paper costs

$0.07 each, and toner costs $5.99 each.

当公司雇员需要提供新的铅笔,纸张和夹子时,他们必须填写一个购买请求。低于10

美元的购买请求将自动批准,否则财务部门的某人必须批准。铅笔每支0.5美元,纸张每

张0.07美元,夹子每个5.99美元。

Accounting can change the quantities of purchase requests costing $10 or more.

财务部门可以更改花费10美元及以上购买请求的购买数量.

2.3.2 Preparation准备

2.3.2.1 Overview 概览

1) If the PowerFolder Server has not been started, start it now.

如果PowerFolder服务器还没有启动,那么启动它。

2) Log into the PowerFolder Console

登录进入PowerFolder控制台

3) Undeploy all scripts and web pages

卸载所有的脚本和页面

4) Deploy the following script and web pages.

发布下面的脚本和页面。

Script:

脚本

- SubmitInvoice

Web Pages:

页面

- AdjustInvoice

- ApproveInvoice

- EnterInvoice

- SubmitInvoice

- ViewInvoices

2.3.2.2 How-To 怎样做

- Starting the PowerFolder Server. If you configured environment variable 'JAVA_HOME'

during installation, just double-click 'run_with_tomcat.bat' in Windows Explorer. Otherwise,

open a command console and make sure the environment variable 'JAVA_HOME' is set to base

directory of the Java installation. Start the PowerFolder server by going to the directory then go

to the 'jboss' subdirectory then again go to the 'bin' subdirectory. Run program

'run_with_tomcat.bat'.

启动PowerFolder服务器。如果你在安装时配置了环境变量JAVA_HOME,只要在资源

管理中双击run_with_tomcat.bat。否则的话,打开一个命令控制台,设计环境变量

JAVA_HOME到Java安装的根目录。要启动PowerFolder服务器,移动到安装目录,到

jboss子目录,到bin 子目录,运行程序run_with_tomcat.bat。

- Logging into the PowerFolder Console. Open a web browser and go to the address

'http://localhost:8080/powerfolder/login'. Enter 'admin' for the user name and password, then

press 'Login'.

登录进入PowerFolder控制台:打开一个浏览器,到地址

'http://localhost:8080/powerfolder/login',输入admin作为用户名和口令,按下

Login按钮。

- Undeploying scripts and web pages. To undeploy scripts, from the PowerFolder Console open

'Administer' then open 'Scripts'. Check the boxes next to the scripts you want to undeploy under

the section 'Deployed Scripts' then click 'Remove Checked Scripts'. To undeploy web pages,

from the PowerFolder Console open 'Administer' then open 'Web Pages'. Check the boxes next

to the web pages you want to undeploy under the section 'Deployed Web Pages' then click

'Remove Checked Web Pages'.

卸载所有脚本和页面。为了卸载脚本,从PowerFolder控制台打开Administer,然后

打开Scripts.在'Deployed Scripts'部分,选中你想卸载的脚本前面的选择框,然后单

击'Remove Checked Scripts'。为了卸载页面,从PowerFolder控制台打开

Administer,接着打开Web Pages。在Deployed Web Pages部分选中你要卸在的页面,

然后单击'Remove Checked Web Pages'。

- Deploying scripts and web pages. To deploy scripts, from the PowerFolder Console open

'Administer' then open 'Scripts'. Check the boxes next to the scripts you want to deploy under the

section 'Available Scripts' then click 'Deploy Checked Scripts'.

- To deploy web pages, from the PowerFolder Console open 'Administer' then open 'Web Pages'.

Check the boxes next to the web pages you want to deploy under the section 'Available Web

Pages' then click 'Deploy Checked Web Pages'.

发布脚本和页面。为了发布脚本,从PowerFolder控制台打开Administer,接着打开

Scripts.在Available Scripts部分选中你想发布的脚本,接着单击'Deploy Checked

Scripts'。为了发布Web页面,从Administer,接着打开Web Pages。从Available Web

Pages部分选中要发布的页面,接着单击'Deploy Checked Web Pages'。

2.3.3 Technical Overview技术概览

2.3.3.1 Diagram流程图

2.3.3.2 Workflow Steps工作流步骤

1) SubmitInvoice - this is where the process starts. If the purchase request is over $10, go to

'NotifyAccounting'. Otherwise, go to 'AutoApprove'.

SubmitInvoice-这是流程启动的地方。如果购买请求超过10美元,移动到

'NotifyAccounting',负责,移动到'AutoApprove'。

2) NotifyAccounting - tell Accounting that is has a specification change to approve.

NotifyAccounting-告诉财务部门有一个规格变化待批准。

3) ApproveInvoice - wait here until Manufacturing approves. Once this wait has been externally

released (via web page), print a message to indicate that the purchase request has been approved.

ApproveInvoice-在财务部门批准之前等待。一旦这个等待被从外部释放(通过Web

页面),打印一个消息来说明请求已经被批准。

4) AutoApprove - print a message to indicate that the purchase request has been approved

without Accounting's input.

AutoApprove - 打印一个消息指出购买请求已经在没有财务部门的输入情况下被批

准。

5) End - this is where the process ends.

End -这是流程结束的地方。

2.3.3.3 User Interface 用户界面

1) AdjustInvoice - allows the accounting department to change the quantities of a purchase

request before approving.

AdjustInvoice -允许财务部门在批准之前改变购买请求的数量。

2) ApproveInvoice - approve the revised purchase order.

ApproveInvoice - 批准修改后的购买订单。

3) EnterInvoice - allow the user to submit a purchase request for new quantities of pencils, paper,

and toner.

EnterInvoice - 允许用来提交购买铅笔,纸张和夹子的请求。

4) SubmitInvoice - response page that appears when a user submits a purchase request. This is

the page the starts the process.

SubmitInvoice - 当用户提交一个购买请求以后的响应页面。这是启动流程的页面

5) ViewInvoices - display all purchase requests that require Accounting's approval ($10 or more).

From here, an accountant can choose one and optionally change its quantities before approving.

ViewInvoices – 显示所有需要财务部门批准的购买请求(10美元或更多)。从这

里一个财务人员可以选择一个请求在批准之前更改它的数量。

2.3.4 Usage使用

1) Open a browser (preferably different than the on with PowerFolder Console) and go to

'http://localhost:8080/ViewInvoices.jsp'. Note the '.jsp' - all web pages in PowerFolder end with

'.jsp' when deployed. You should not see any purchase orders in Accounting's inbox.

打开一个浏览器(与PowerFolder控制台分别打开比较好),到

'http://localhost:8080/StartPrint10Times.jsp'.页面,注意".jsp",在PowerFolder

中,所有的Web页面在发布以后都以jsp来结尾。

2) From the web browser, go to 'http://localhost:8080/EnterInvoice.jsp'. Enter 2, 2, and 1 next to

the boxes 'Pencils', 'Paper', and 'Toner', respectively. Then click 'Submit Invoice'. The total for

this purchase order is under $10.

从web浏览器,到http://localhost:8080/EnterInvoice.jsp,在'Pencils',

'Paper', 和 'Toner'旁边的文本框中分别输入2,2,1。单击Submit Invoice。这个购买

订单的总价低于10美元。

3) Go look at the command console running 'run_with_tomcat.bat'. You should see that this

purchase order was automatically approved.

观察运行run_with_tomcat.bat的命令行控制台。你将看到这个购买订单已经被自动

批准了。

4) From the web browser, go to 'http://localhost:8080/ViewInvoices.jsp'. You should still not see

any purchase orders in Accounting's inbox.

从web浏览器,到http://localhost:8080/ViewInvoices.jsp,你在财务部的收件箱

中,看不到任何的购买订单。

5) From the web browser, go to 'http://localhost:8080/EnterInvoice.jsp'. Enter 3, 1, and 2 next to

the boxes 'Pencils', 'Paper', and 'Toner', respectively. Then click 'Submit Invoice'. The total for

this purchase order is over $10.

从web浏览器,到http://localhost:8080/EnterInvoice.jsp,在'Pencils',

'Paper', 和 'Toner'旁边的文本框中分别输入3,1,2。接着单击Submit Invoice'。这个

购买订单的总价超过了10美元。

6) Go look at the command console running 'run_with_tomcat.bat'. You should see that

Accounting was notified.

观察运行run_with_tomcat.bat的命令行控制台。你可以看到财务部已被通知。

7) From the web browser, go to 'http://localhost:8080/ViewInvoices.jsp'. You should see the

newly entered purchase order. Click the button (ignore the strange ID) next to it.

从web浏览器,到http://localhost:8080/ViewInvoices.jsp。你可以看到新输入的

购买订单。单击它旁边的按钮(忽略那个奇怪的ID号).

8) Change the quantity of 'Pencils' from 3 to 5. Then click 'Approve'.

将Pencils的数量从3改到5,单击Approve

9) Go look at the command console running 'run_with_tomcat.bat'. You should see that

Accounting has approved this purchase order and its total has changed to reflect the new

quantities.

观察运行run_with_tomcat.bat的命令行控制台。你可以看到财务部门已经批准了这

个购买订单而且他的总数反映了新的数量修改。

2.3.5 Results 结果

Go to the PowerFolder console and open 'Administer'. Under the 'Existing Workflows' section

click the 'Find Workflows' button.

移动到PowerFolder控制台,打开'Administer'.在'Existing Workflows'部分下,

单击'Find Workflows'按钮.

Now that you are at the 'PowerFolder Query Workflows' web page, change the contents of

'Query' to '*APP* = 'SubmitInvoice'' (note that you should surround SubmitInvoice with single

quotes) and 'Output' to '*ID*,*APP*,*STATUS*' (pay attention to letter case and don't use any

spaces!), then click 'Submit'.

现在你处于 PowerFolder工作流查询页面,更改'Query'的内容为'*APP* =

'SubmitInvoice''(注意你应当用单引号来环绕SubmitInvoice)而且'Output'的内容为

'*ID*,*APP*,*STATUS*',注意字符的大小写而且不要使用任何空格,然后单击

'Submit'(提交).

You should see two listings - the workflow that was 'AutoApprove'd and the one that required

accounting's approval. The listing should contain a unique id (each workflow gets its own),

'Submit' for the script name, and 'DONE' for its status.

你将看到两个列表-自动批准的工作流和需要财务批准的工作流。列表应该包括一个

唯一的ID(每个工作流有自己的ID), SubmitInvoice 是脚本名称,DONE是它的状态。

Now click the 'Snapshot' button. This will open a new window which will allow you to get much

more detail about the current state of this workflow.

现在单击' Snapshot '(快照)按钮。这将打开一个新的窗口,它将使你得到关于这个

工作流当前状态的更多细节信息

Click 'Attributes' to see all system and script-specific attributes and their current values. For the

purchase request which required accounting's approval, note the updated values for 'Pencils',

'Paper', 'Toner', and 'Total'. Under 'Script' click 'View Graph' and 'View Summary' to get a nice

pictorial and written summary of the script. Click 'Trigger' to see the data (XML) that actually

started the process. The XML has much more information - quantities for pencils, paper, and

toner. Finally, click 'History' and you should see just one trace (no 'branches'). Comparing the

traces of each workflow will show a different path taken.

单击"Attributes"来观察所有的系统和脚本特定属性和他们的当前值。对于需要财

务部门批准的购买请求,注意更改的值'Pencils', 'Paper', 'Toner'和'Total'。在

'Script'下单击'View Graph' 和 'View Summary' 来得到各图形化和书写的关于脚本的

总结。单击"Trigger"来观察XML格式的实际启动流程的数据。XML具有很多信息-铅笔,

纸张和夹子的数量。最后,单击'History',你将会看到仅仅一个路径(没有分支)。展开

每个公共流将显示一个不同的路径。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有