BulePrism进阶教程-12. Advanced Features

12.1. Undefined Collections
Until recently, the Collections we have used have been defined, meaning that their column names and data types have been set up by us in advance.
When using a Collection to receive an output parameter, it is possible to leave the Collection undefined, i.e., with no columns set up at all. You may have noticed that we have already done this in Exercise 9.1.1.
Exercise 12.1.1 Queue Item Data Collection
 Go back to the Queue Exercises 1 Process and step through to the Get Next Item action. Look at the properties of the Collection used for the output parameter. Is there anything odd about it?
 Tip: Look at the Initial Values tab and then at the Current Values tab.
The Collection is undefined, i.e., it has no columns to begin with. It only receives its definition when the Process runs the Get Next Item action.
Key Point

Collections are the only kind of Data Item that can behave in this way. All other Data Items must be predefined with a data type.
12.2. Data Item Initialization
We have looked at how a Data Item can be given an initial value, and that this default value will also be used as the current value when running starts. By default a Data Item is only visible from its own page, but un-checking the Visibility check box on the properties form will make the Data Item global.

Figure 160: Data Item Properties
Just below the Visibility checkbox is another checkbox named “Initialization”, and it controls how the current value of a Data Item is affected when its page is run.
By default, the current value is reset to the initial value when the start stage of the page is reached. When the checkbox is un-checked, the current value is maintained and not reset. Both settings have their advantages, depending on the circumstances.
For example, global Data Items can be placed on a page that simply links the start stage to an End stage. Although the page will appear to do nothing, it can be used to ensure that the global Data Items are put back to their initial values simply by running the “Reset” page.
Figure 161: Resetting Global Data Items
12.3. Data Item Exposure
Data Items can have their values controlled from outside the diagram - this is done by exposing a Data Item. By default, Data Items are not exposed but we will look at how that can be changed.
Environment Variables
Exercise 12.3.1 Using Environment Variables
An Environment Variable is a value that is made available to all Processes and Business Objects, i.e., across the environment.
In order for the following exercise to work, we will need to import a Business Object that allows the process to use a "Sleep" action. Following the action we carried out in the earlier exercise to import the Excel Object, we will need to install the BPA Object - Utility - General.
To install the Utility - General object, go to Blue Prism and click File – Import and then select the BPA Object - Utility - General.xml file from the VBO directory.
 The Business Object is named Utility – General.
 The object is in C:\Program Files\Blue Prism Limited\Blue Prism Automate\VBO.
 Go to System Manager and look at the Environment Variables tab in the Processes section.
 Add a new Environment Variable named Stopping Time with data type Time and a value of three or four minutes from now.
 Tip: Remember to click the Apply button.
 Create a new Process named Stopping Test.
 Create a Data Item named Stopping Time, and use the Exposure field to link this to the Environment Variable, as illustrated.

Commercial in Confidence Page 136 of 158
Figure 162: Configuring Data Item Exposure
 We also want to use a “Sleep” action if the “Stopping Time” is not reached. This means the process can “Sleep” or “Wait for a time defined”.
 To use a “Sleep” action, from the previously imported Utility – General Object, place an action on the page and select the Utility – General VBO and use the action “Sleep”.
 You will see there is an “input” for “Sleep Time” set this to 10 seconds. When the process is running if the Sleeping Time is not met, the process can “Sleep” for 10 seconds before carrying on and checking.
Figure 163: Setting up the Sleep Action
 Configure your Process to spin in a loop until the stopping time is reached.
 IMPORTANT: Switch off logging within the process to prevent the database filling up.
 Tip: to disable logging use the combo box at the bottom of the “Stop?” and “Sleep” properties dialog boxes or via the edit menu Edit > All Stages.
 Your process should look something like this:

 Save and publish your Process.
 Amend the System Manager Environment Variable to be one or two minutes into the future, if necessary.
 Run the Process and check it stops at the appointed time.
Exercise 12.3.2 Environment Variable Use Cases
Consider why you might want to centralize the control of such variables into System Manager. Consider also the advantages of several Processes being able to reference the same Environment Variables.
 Create a Calculation stage and attempt to change the value of your environment variable.
 Press the Validate button and observe the error message.
Key Points
 Environment Variables are available to all Processes and Business Objects.
 Data Items exposed as Environment Variables are read-only.
 The name and type of the Data Item must match the Environment Variable
Session Variables
Like Enviro

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The definitive guide to building database-driven Web applications with PHP and MySQL PHP and MySQL are popular open-source technologies that are ideal for quickly developing database-driven Web applications. PHP is a powerful scripting language designed to enable developers to create highly featured Web applications quickly, and MySQL is a fast, reliable database that integrates well with PHP and is suited for dynamic Internet-based applications. PHP and MySQL Web Development shows how to use these tools together to produce effective, interactive Web applications. It clearly describes the basics of the PHP language, explains how to set up and work with a MySQL database, and then shows how to use PHP to interact with the database and the server. This practical, hands-on book consistently focuses on real-world applications, even in the introductory chapters. The authors cover important aspects of security and authentication as they relate to building a real-world website and show you how to implement these aspects in PHP and MySQL. They also introduce you to the integration of front-end and back-end technologies by using JavaScript in your application development. The final part of this book describes how to approach real-world projects and takes the reader through the design, planning, and building of several projects, including: User authentication and personalization Web-based email Social media integration The fifth edition of PHP and MySQL Web Development has been thoroughly updated, revised, and expanded to cover developments in PHP through versions 5.6 and 7, as well as features introduced in recent stable releases of MySQL. Table of Contents Part I: Using PHP Chapter 1 PHP Crash Course Chapter 2 Storing and Retrieving Data Chapter 3 Using Arrays Chapter 4 String Manipulation and Regular Expressions Chapter 5 Reusing Code and Writing Functions Chapter 6 Object-Oriented PHP Chapter 7 Error and Exception Handling Part II: Using MySQL Chapter 8 Designing Yo

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值