简体   繁体   English

如何从XPath引用tibco-bw6中的模块属性

[英]How to reference a module property in tibco-bw6 from XPath

I'm trying to reference a module property from tibco business works 6 . 我正在尝试从tibco商业作品6中引用模块属性。

Do you guys have an example about the getModuleProperty("") ? 你们有关于getModuleProperty("")的示例吗?
What kind of input should I use? 我应该使用哪种输入?
Should I use the entire path or just the name of the property? 我应该使用整个路径还是仅使用属性名称?

You need to first add a process property to your process (it's under properties if you click outside of the main process area). 您首先需要向流程中添加流程属性(如果您在主流程区域之外单击,则该属性位于属性下方)。 In there you can reference a module property. 您可以在其中引用模块属性。 You can then use the process property in XPath. 然后,您可以在XPath中使用process属性。

First off, you need to include a few dependencies in your project. 首先,您需要在项目中包括一些依赖项。 ( Documented here ) 在此处记录

Then write some code access the properties 然后写一些代码访问属性

    @ModuleProperties
public void loadProperties(HashMap<String, String> moduleProperties){
    this.myClassProperty = moduleProperties.get("/DB/Property"); // Case Sensitive Path
    System.out.println("Completed loading module properties.");
}

You have to use the entire path of the property. 您必须使用属性的整个路径。 you can get it from the META-INF/default.substvar file. 您可以从META-INF/default.substvar文件中获取它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM