BulePrism进阶教程-10. Additional Features

本文档介绍了Blue Prism的一些高级特性,包括安全停止、集合操作、选择阶段、日志记录、日志查看器、系统管理器、流程/业务对象分组、引用查看、导入导出、发布管理器等,旨在帮助用户更深入地理解和使用Blue Prism。

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

This section deals with some of the aspects of Blue Prism we have not yet looked at.
10.1. Safe Stop
When a process is running in Control Room you can stop the process by selecting the process session and clicking Stop Selection. This will stop the process immediately. The case currently being worked will not be completed and Blue Prism will mark it as an Exception at Clean Up.
Figure 143: Control Room Session Controls
If you right click a running process session you will see the following stop options; Immediate Stop and Request Stop.
Figure 144: Context Menu for Running Processes
Immediate Stop is the equivalent of Stop Selection. Request Stop will ask the process to stop where there is a configured safe stop with the process.
You can configure a safe stop within your process by using the inbuilt Environment function IsStopRequested() within a Decision stage.

Typically you would place this Decision stage prior to getting the next case from a Work Queue. This will allow the process to complete the current case before detecting a safe stop request and processing accordingly.


Figure 146: Process Checking for a Safe Stop Request
10.2. Collection Actions
We have seen how to create a Collection and how to use a loop to access each row. The special Internal - Collections Business Object has other actions that we have not used yet, most of which are self-explanatory.
 Add Row.
 Remove Row.
 Count Rows.
 Count Columns.
 Remove All Rows.
 Copy Rows. Copy Rows is used to generate a new Collection from a subset from another Collection
Key Point
 The inputs of the Internal – Work Queues actions ask for the name of the collection, rather than the collection itself. The data type of the “Collection Name” input is Text, not Collection.
10.3. Choice Stage
Like the Decision stage, the choice stage is based on expressions that result in either True or False. The difference is that a choice stage can evaluate a series of expressions rather than just one.
The choice stage looks a little like a Wait stage and works in a similar way, where each expression creates a separate branch. Expressions are evaluated in top-down order, and the first one found to be True takes the flow down that branch. The bottom Otherwise branch is taken if none of the expressions are True, much like the timeout end of a Wait stage.
Figure 147: Choice Stage Toolbar Button
Figure 148: Choice Stage
Figure 149: Choice Stage Properties
10.4. Logging
Blue Prism can log the details of stages used in Processes and Business Objects. By default, stages used in Process Studio are logged and those in Object Studio are not. This can easily be changed by modifying the properties of a stage, selection of stages or all stages.
Nearly all stage properties windows have a combo box with the stage logging options; Enabled, Disabled and Errors Only. Errors only will log the stage only if an error is thrown when the stage runs


Alternatively, the menu commands Edit > Selected Stages > and Edit > All Stages can be used to modify the stage logging of more than one stage at a time.

Figure 151: Logging Menu
Page information stages are not logged and Data Items are only logged when their values are used as inputs and outputs.
Key Points
 The decision as to which stages are logged and which are not should not be overlooked.
 Logs are particularly useful during a test phase as a means to investigate bugs.
 However a live Process running all day can put a vast amount of logs into the database, the maintenance and back up of which should be considered.
 The security or legal implications of storing sensitive data are also something to think about.
10.5. Log Viewer
The Log Viewer is used to inspect the log of a session, either as it is running or after it has finished. This is especially handy for reviewing the workings of a progress and tracking down problems.
The Log Viewer has a search function enabling you to look through the (often numerous) rows of a log and the visibility of columns can be configured to suit.
Figure 15
2: Log Viewer
10.6. System Manager
As the name suggests, System Manager is where Blue Prism’s own settings are kept. Some of the tasks that can be performed are as follows:
 Create and maintain user accounts, roles, and permissions.
 Retire resources, Processes, and Business Objects.
 View Process or Business Object change history.
 Manage web services.
 Manage work queues.

10.7. Process/Business Object Grouping
Processes and Business Objects can be arranged into groups in order to simplify and tidy the lists used in the Blue Prism application. Groupings have no effect on the Processes or Objects themselves. They are moved to and from groups by using “drag and drop” in System Manager. You can create groups by right clicking on either Processes or Objects in the Studio tab.

Figure 154: Process Grouping
10.8. Process and Object References
You can view what Processes and Business Object are using a particular Process or Business Object by finding references. To find references of a select Process or Business Object in Studio and click the hamburger icon at the top right and select Find References

Figure 155: Use the hamburger menu to Find References
This will return a list of where the Process/Business Object is used

10.9. Export and Import
A Process or Business Object can be exported as an XML file, and similarly an exported file can be imported into Blue Prism. This can be useful for backing up and moving work between databases.
A wizard is provided to guide the user through each step of the procedure.

Figure 157: Import Wizard
Exercise 10.7.1 Exporting and Importing
 From the main Blue Prism application window, select File > Export from the main menu.
 Experiment with exporting a Process as an XML file.
 Switch to a different database, if you like. Alternatively, you may simply imagine that you have done so. Choose File > Import and locate an XML file.
 Tip: Processes and Business Object names must be unique.
10.10. Release Manager – Packages and Releases
The above XML import/export is useful for one-off ad hoc migrations of specific Business Objects and Processes, but in the real world a Process might have several dependencies. For example, a Process might employ a range other Processes, Business Objects, and Work Queues.
To migrate all of these parts individually would be an error-prone task requiring careful attention to detail and conscientious use of checklists. For this reason, Blue Prism provides the Release Manager which allows users to create checklists known as Packages.
At various stages during the development cycle, a Release can be exported using the checklist provided in the Package. Two different releases produced on two different occasions could contain different versions of the Processes/Business Objects/work queues, etc., but because they have come from the same Package (i.e., the same checklist) they will contain the same items.

Figure 158: The Blue Prism Release Manager
Exercise 10.8.1 Creating a Package
 Go to Release Manager and click New Package.
 Complete the wizard, choosing a combination of items to include in the package. For this exercise, it is not important what items you pick.

Figure 159: Create a Package Wizard
Exercise 10.8.2 Exporting a Release
Now that a Package has been created, we can create a Release. The Release will be a snapshot of the state of each of the items in the Package at a particular moment in time.
 Select the Package you just created and click New Release.
 Choose a name for the release and provide some release notes (e.g., “Development complete. Process now ready for UAT.”).
 Choose a location to save the file; the file extension will be .bprelease
The Release file contains the details of all the items in the package and could be used to import the items into another database. Typically this would mean a new environment, e.g., exporting a Release from the Development environment and importing into a UAT environment.
Key Points
 Blue Prism creates different environments by using separate databases. Typically this would be three databases - Development, Test, and Live.
 Moving work from one database to another is done by exporting and importing.
 An exported file can also be attached to email and used as a basic back up.

<think>好的,用户现在问的是关于在Windows脚本中使用-Dloader.path和-Dspring.config.additional-location这两个参数是否正确用于加载JAR包和配置文件。首先,我需要确认这两个参数的具体用途和适用场景。 首先,回顾之前的对话,用户之前询问过如何在Windows脚本中加载JAR和配置文件,我给出了使用-cp、系统属性-D以及命令行参数等方法。现在用户提到的是两个特定的参数,需要确定它们是否正确。 接下来,我需要分析这两个参数。根据Spring Boot的相关知识,-Dloader.path是Spring Boot的Launcher在特殊情况下使用的,比如使用PropertiesLauncher时,用来指定额外的库路径,通常用于加载外部的JAR包。而-Dspring.config.additional-location是用于指定额外的配置文件位置,让应用可以加载外部的配置文件,比如application.properties或application.yml。 需要验证这两个参数的正确性。例如,-Dloader.path的正确格式应该是-Dloader.path=路径,而路径可以是目录或具体的JAR文件,多个路径用逗号分隔。对于-Dspring.config.additional-location,同样需要注意路径的格式,可以是文件系统路径或类路径,并且需要确保路径的正确性。 然后,要考虑用户可能的困惑点。比如用户是否混淆了不同框架的参数,或者是否在使用Spring Boot的情况下正确使用这些参数。例如,-Dloader.path只在特定配置下生效,需要在启动命令中指定使用PropertiesLauncher,否则可能无效。这一点需要明确指出,避免用户配置错误。 另外,用户可能没有说明他们使用的具体框架,比如是否是Spring Boot应用,这会影响参数的适用性。需要假设用户是在使用Spring Boot,并基于此给出建议,同时提醒如果不是的话可能需要其他方法。 还需要考虑用户的实际应用场景,比如他们是否在打包应用时做了特殊配置,或者是否希望将JAR和配置文件放在外部目录以便于管理。这时候,给出具体的示例脚本会很有帮助,让用户可以直接参考和修改。 最后,要确保回答的结构清晰,分点说明每个参数的作用、正确用法、注意事项以及示例,这样用户能够逐步理解和应用。同时,提醒用户注意路径分隔符、参数顺序等常见问题,避免常见的配置错误。</think>关于Spring Boot应用中`-Dloader.path`和`-Dspring.config.additional-location`参数的使用,以下是技术说明: **一、参数解析** 1. `-Dloader.path` ✅ 正确(特定场景) - **作用**:指定额外依赖库路径(适用于Spring Boot的PropertiesLauncher) - **格式**: ```bat java -Dloader.path="lib/" -jar your_app.jar ``` - **特点**: - 自动加载指定目录下的所有JAR文件 - 支持逗号分隔多个路径:`"lib/,ext/"` 2. `-Dspring.config.additional-location` ✅ 正确 - **作用**:指定额外的配置文件位置 - **格式**: ```bat java -Dspring.config.additional-location="file:./config/" -jar your_app.jar ``` - **特点**: - 支持`file:`前缀(文件系统路径) - 支持`classpath:`前缀(类路径资源) - 可叠加多个路径:`"classpath:/,file:./external-config/"` **二、典型应用场景** ```bat @echo off set LAUNCHER_OPTS=-Dloader.path="lib/" set CONFIG_OPTS=-Dspring.config.additional-location="file:./conf/" java %LAUNCHER_OPTS% %CONFIG_OPTS% -jar springboot-app.jar ``` **三、注意事项** 1. 生效前提条件: - 必须使用`PropertiesLauncher`(需在pom.xml中配置): ```xml <configuration> <mainClass>org.springframework.boot.loader.PropertiesLauncher</mainClass> </configuration> ``` 2. 路径优先级顺序: - 对于配置文件的加载顺序: ```text 命令行参数 > additional-location > classpath:/config/ > classpath:/ ``` - 对于JAR包的加载顺序: ```text BOOT-INF/lib/(内嵌) > loader.path指定路径 ``` 3. 路径格式规范: - Windows路径需注意: ```bat # 正确写法 -Dspring.config.additional-location="file:C:/app/config/" # 错误写法 -Dspring.config.additional-location="file:C:\app\config\" ``` **四、验证方法** 1. 查看加载的JAR: ```bat java -Dloader.path="lib/" -jar app.jar --debug ``` 2. 查看配置文件加载顺序: ```bat java -Dspring.config.additional-location="file:./conf/" -jar app.jar --spring.config.location.trace=true ``` **五、替代方案对比** | 参数类型 | 适用场景 | 加载方式 | |-----------------------|-------------------------|----------------| | `-Dloader.path` | 扩展依赖库 | 目录/JAR自动扫描 | | `-cp` | 标准Java类路径 | 显式指定路径 | | `--classpath` | Spring Boot 2.4+新特性 | 增强型类路径 | 建议优先使用Spring Boot推荐的`--classpath`(2.4+版本): ```bat java -jar app.jar --classpath="lib/*;config/" ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值