BulePrism进阶教程-5. Business Objects

本文介绍了Blue Prism中的Business Objects及其配置环境Object Studio。Business Objects用于提供与应用程序的接口,它们在Process Studio之外的独立环境中配置。通过Object Studio,可以创建与应用交互的逻辑,而这些逻辑不直接暴露在Control Room中,总是由Process调用。Business Object的页面按顺序运行,由Process通过Action阶段进行调用,实现数据的输入输出,从而完成对应用的操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

So far, our exercises have been theoretical examples intended to explain the mechanics of a Process diagram. A real Process would be required to do some useful tasks, and in order to do so it would invariably need to work with external applications.
The interface to an application is not contained within a Process diagram, but in a separate diagram known as a Business Object.
Key Points

 A Business Object is not configured in Process Studio but in a distinct, parallel environment named Object Studio.
 The purpose of a Business Object is to provide an interface to one application.
 A Business Object is not exposed to Control Room and is never used on its own – it is always used by a Process.
 Business Object logic can be thought of as forming a separate layer to Process logic.

5.1. Object Studio
Object Studio is used to capture the functionality of an application so that it can be employed by Processes. A Process is used to combine the application functionality with business rules in order to perform useful work. This application functionality is known as a Business Object.
We will see that Object Studio looks very like Process Studio. There are key differences, which we shall look at in due course, but the principle points to know at this point are as follows:
 Object Studio is similar to Process Studio and a Business Object is configured as a diagram much in the same way.
 Object Studio offers some types of stage not available to Process Studio.
 Object Studio does not have a Main Page but it does have two default pages.
 Pages are organized as a flat group rather than the hierarchy we have seen in Process Studio.

Figure 48: The Hierarchical Structure of Process Pages


Figure 49: The Flat Structure of Business Object Pages

5.2. Business Objects
A Process uses the pages of a Business Object to manipulate an application. Whereas a Business Process flows from a single start point on the Main Page, the flow through a Business Object can start on any page.

Figure 50: The Logical Flow through Process Pages

Figure 51: The Logical Flow through Business Object Pages

Exercise 5.2.1 The Logical Flow through Business Object Pages
Business Object pages run one at a time and are usually not interconnected like the pages of a Business Process. A Process can select which Business Object pages to use and use them in any order.

Figure 52: The Logical Flow through a Process and Business Object
Exercise 5.2.2 Notepad Business Object
In this exercise we will take a quick look at a ready-made example of a Business Object. We won’t concern ourselves how it was made just yet, we’ll just see how it works.

 Navigate to Studio and open the example Notepad Business Object.
 Tip: Every Business Object comes with two default pages. We will look at Initialize and Clean Up later.
 Select the Launch page and then press the Go button.
 Select the Close page and press the Reset button before pressing “Go”.
 Repeat the Launch and Close sequences.
 Tip: Press the Reset button every time you want to run a page in Object Studio.
 Close Object Studio without saving any changes.

5.3. Action Stage
So we have a basic Business Object that can launch and close the Notepad application. However, knowing that a Business Object can only be used via a Process, we will need to return to Process Studio to employ our Business Object.
An Action stage allows us to use a Business Object in a Process.

Figure 53: Action Toolbar Button

Figure 55: Action Properties
An Action stage is similar to a Page Reference in that it takes the flow of the Process down to another page. But instead of it being a page of the same diagram, it is the page of a Business Object, i.e., an entirely separate diagram.

Exercise 5.3.1 Action Stages
In this exercise we will return to Process Studio to create a Process that makes use of the Notepad Business Object.
 Create a new Process named Notepad Exercises.
 Add a new Action stage and open the properties.
 Select Notepad from the Business Object drop-down list.
 Notice how the Action drop-down list changes when you select the Business Object.
 Notice how the Action list contains the names of the pages we saw in Object Studio.
 Select Launch from the Action list.
 Add a second Action stage and set its properties to Close Notepad.
 Link the stages together so the Process will launch and then close Notepad.
 Save the Process (NB: you always have to save a Process before running for the first time).
 Run the Process to see that Notepad should open and close.
Exercise 5.3.2 Stepping into an Action
As mentioned earlier, it is possible to step from Process Studio into Object Studio, and we will see how that works in this exercise.
 Reset the Notepad Exercise Process.

 Step through the Process.
 Tip: F11 is the Step shortcut key and F10 is Step Over.
 Notice how Object Studio is opened when you step into each Action stage.
 Tip: Because Process Studio and Object Studio look so similar, it may not be obvious at first that a new window has opened. You may want to resize or move a window to confirm this.
 Keep stepping and see how Object Studio is automatically closed and you are returned to Process Studio.
 Once you have gone all the way through the Process, press the Reset button.
 Step through again, but this time use Step Over to see that the Action is executed in one step and Object Studio is not opened.
 Think back to the Process Reference stage and consider the similarities of stepping into or over an Action stage.
5.4. Inputs and Outputs
Earlier we looked at using inputs and outputs on the pages of Processes and sub-Processes. In fact, the most common usage for inputs and outputs is on the pages of Business Objects.
Just as a Business Object provides a Process with the functionality it needs to manipulate an application, it is the inputs and outputs that move data back and forth between a Process and a Business Object.
Exercise 5.4.1 Action Inputs
In this exercise we will look at how a Process uses an input to provide a Business object with information.
 On the Notepad Exercise Process, make a gap between the “open” and “close” Actions.
 Put a new Action stage into the gap.
 Edit the Action stage properties and select the Write action.
 Notice that a new row has appeared on the inputs tab. This row indicates that the Business Object is requesting information in order to execute the action.
 Tip: Imagine the input as the Business Object asking the Process, “What note do you want me to write?”
 Enter the expression “Hello World” (remember the speech marks!) to supply the input value.
 Tip: Imagine the Process telling the Business Object “write this note.”
 Run the Process to see the Write stage in operation.
 Save and close Process Studio.
Key Point

Data are transferred between a Process and a Business Object via input and output parameters

5.5. The Process Layer
We have seen that a Process can be spread across a number of pages arranged in a hierarchy. So far we have assumed that the Process layer is comprised of a single Processes but this is not always the case.

We know that a Process can be called by another Process, much in the same way that a Process makes reference to a page. The Process layer can sometimes consist of a series of sub-Processes marshaled by a “master” Process.
Exercise 5.5.1 Stepping through Multiple Levels
In this exercise we will create a “master” Process to employ Notepad Exercises as a sub-Process.
 Create a new Process named Notepad Master.
 Add 2 Process Reference stages and link them between the Start and End stages.
 Edit each Process stage so that they will both call the Notepad Exercises as a sub-Process.
 Save the Process (NB: you always have to save a Process before running for the first time).
 Step (F11) through the Process.
 Notice how a second Process Studio window is opened when you step into the Process Reference stage, and then when you step into an Action stage, Object Studio is opened too.
 Tip: Because Process Studio and Object Studio look so similar, it may not be obvious at first that a new window has opened. You may want to resize or move a window to confirm this.
 Keep stepping and see how the “child” windows are automatically closed and you are eventually returned to the original Process Studio.
 Experiment to see the effect of Step Over and Step Out.
 Save and close Process Studio.
5.6. Review
 Application logic is not contained in a Process.
 A Business Object is used to manipulate an application.
 Object Studio is used to configure Business Objects.
 Object Studio is much like Process Studio.
 A key difference is that a Business Object is not exposed to Control Room; it can only be used via a Process.
 A Business Object encapsulates the functionality of an application and exposes it to a Process.
 A Process uses an Action stage to employ a Business Object page.
 A Process flows through a hierarchy of pages.
 A Business Object flows through pages one at a time.
 Stepping into an Action stage will open Object Studio and stepping out will close it.
 Stepping into a Process Reference stage will open another Process Studio window in a similar way.
Blue Prism Keywords
Business Object, Object Studio, Action.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值