BulePrism进阶教程-3. Process Flow

We have seen how Decision stages are used to create alternate paths in a Process. If you have any programming knowledge, you may like to relate a Decision stage as to an IF THEN ELSE statement. The expressions we have looked at have been very simple, but they can become complex.
3.1. Decisions
Exercise 3.1.1 Validation Decision
A Decision can be used to check the value of a Data Item in order to decide which way a Process should go. Return to the First Process diagram from the previous exercises and follow these steps:
 Drag the End stage down to make a gap under the Calculation stage.
 Add a Decision after the Calculation and name it Is Z Valid?.
 Set the expression in the Decision to check if Z is negative or positive.
 Tip: A negative number is less than zero.
 Link the Calculation stage to the new Decision stage.
 Tip: Rather than deleting the existing link connecting the Calculation to the End, just draw a new link to the Decision and the old one will be removed automatically.
 Add a second End stage and link the Decision stage to the two End stages (it doesn’t matter which End stages the Yes and No branches of the Decision link to).
The Process should now look similar to this:

 Press “Reset” and “Go”. Notice which path the Process follows and which End stage it stops at.
 Change the Calculation expression to [Z]-([X]*[Y]).
 Press “Reset” and “Go”. The Process should now stop at the other End stage.
 Save and Close the First Process diagram.

3.2. Circular Paths
The basic principle of Blue Prism is to automate repetitive work, and as such Process will probably need to repeat some steps over and over again. So far we have only looked at simplistic, linear paths but the reality is that we will want to create diagrams that follow some sort of circular path.
Although most stages have only one outbound link, there is no limit to the number of inbound links a stage can have. This means that a stage can be approached from more than one direction.
Exercise 3.2.1 Circular Paths
A common example of circular paths is to have a looping diagram with a Decision controlling the number of times the logic will flow around the circuit.
 Create a new Process named Circular Path Exercises.
 Add a Data Item named Loop Count with data type number and initial value 0.
 Add another Data Item named Max Loops with data type number and initial value 5.
 Add a Calculation that will increase the value of Loop Count by 1.
 Tip: Remember the “Store In” Data Item can also play a part in the expression.
 Add a Decision that compares Loop Count with Max Loops.
 Tip: Use any of the standard notation for “equals” (=), “less than” (<), or “greater than” (>) to compare values.
 Link the Decision back up to the Calculation and down to the End.
 Tip: Use Anchor stages to link around corners.
Your diagram should end up looking something like this:

3.3. Controlling Play
You may have noticed when pressing the Go button that the default “running speed” is fairly slow. This can be changed using the drop-down sliding adjuster, just to the right of the Go button. Increasing the speed can be useful when working through multiple iterations.

Figure 15: Debug Speed Adjuster
A running Process can also be paused and resumed using the buttons on the toolbar. And as an alternative to continuous play, a Process can be run one stage at a time. This is known as stepping.
To step though the process one stage at a time click the step button

Exercise 3.3.1 Controlling Play/Running at Speed
 Change the Circular P

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值