首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >看不到添加到OSLC资源中的字段

看不到添加到OSLC资源中的字段
EN

Stack Overflow用户
提问于 2016-11-21 13:34:44
回答 1查看 701关注 0票数 1

我试图在Maximo 7.6.1中向OSLCWORKTYPE OSLC对象公开一个新字段,特别是在工作类型查找所使用的附加工作类型资源中。

在遵循了domains.html的说明并阅读了这篇文章中的步骤之后,将自定义字段合并到OSLC组件中 --我在这个应用程序中看到这个字段仍然有问题。

我已经添加了如下所示的附加工作类型资源,但是当控制台注销它时,它不会显示在对象中。但是,当我使用Postman查询rdf时,我可以看到响应中返回的字段。所讨论的领域是brdbwtcategory

代码语言:javascript
复制
<!-- Work Type resource -->
    <resource additionalData="true" describedBy="http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#WorkType" id="additionalworktype" name="additionalworktype" pageSize="100" providedBy="/oslc/sp/SmarterPhysicalInfrastructure">
        <attributes id="additionalworktype_attributes">
            <attribute describedByProperty="spi:orgid" id="additionalworktype_orgid_spiorgid" index="true" isExactMatchIndex="true" name="orgid"/>
            <attribute describedByProperty="spi:worktype" id="additionalworktype_worktype_spiworktype" index="true" name="worktype"/>
            <attribute describedByProperty="dcterms:title" id="additionalworktype_wtypedesc_dctermstitle" index="true" name="wtypedesc"/>
            <attribute describedByProperty="spi:woclass" id="additionalworktype_woclass_spiwoclass" index="true" isExactMatchIndex="true" name="woclass"/>
            <attribute describedByProperty="spi:type" id="additionalworktype_type_spitype" index="true" isExactMatchIndex="true" name="type"/>
            <attribute describedByProperty="dcterms:identifier" id="additionalworktype_worktypeid_dctermsidentifier" name="worktypeid"/>
            <attribute describedByProperty="spi:brdbwtcategory" id="additionalworktype_worktypeid_spibrdbwtcategory" index="false" name="brdbwtcategory"/>
            <!-- <attribute name="startstatus" describedByProperty="spi:startstatus"
                /> -->
            <!-- <attribute name="completestatus" describedByProperty="spi:completestatus"
                /> -->
            <!-- <attribute name="promptdown" describedByProperty="spi:promptdown"
                /> -->
            <!-- <attribute name="promptfail" describedByProperty="spi:promptfail"
                /> -->
            <!-- <attribute name="keeptaskstatushist" describedByProperty="spi:keeptaskstatushist"
                /> -->
        </attributes>
        <queryBases id="additionalworktype_queryBases">
            <queryBase id="additionalworktype_queryBase_getworktype" name="getworktype" queryUri="/oslc/os/oslcworktype"/>
        </queryBases>
        <whereClause id="additionalworktype_whereClause"/>
    </resource>

查找

代码语言:javascript
复制
            <lookup filterClass="application.handlers.WODetailHandler" filterMethod="filterWorktypeForLookup" id="WorkExecution.WorkTypeLookup" label="Select Work Type" resource="additionalworktype">
        <requiredResources id="WorkExecution.WorkTypeLookup_requiredResources">
            <requiredResource id="WorkExecution.WorkTypeLookup_additionalworktype" name="additionalworktype"/>
            <requiredResource id="WorkExecution.WorkTypeLookup_domainwoclass" name="domainwoclass"/>
        </requiredResources>
        <list id="WorkExecution.WorkTypeLookup_additionalworktype_list" resource="additionalworktype">
            <searchAttributes id="WorkExecution.WorkTypeLookup_additionalworktype_searchAttributes">
                <searchAttribute id="WorkExecution.WorkTypeLookup_additionalworktype_searchAttribute_worktype" name="worktype"/>
                <searchAttribute id="WorkExecution.WorkTypeLookup_additionalworktype_searchAttribute_wtypedesc" name="wtypedesc"/>
                <searchAttribute id="WorkExecution.WorkTypeLookup_additionalworktype_searchAttribute_brdbwtcategory" name="brdbwtcategory"/>
            </searchAttributes>
            <listItemTemplate id="WorkExecution.WorkTypeLookup_additionalworktype_listItemTemplate_Item1Desc1" layout="Item1Desc1">
                <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup_additionalworktype_Item1Desc1_worktype" layoutInsertAt="item1" resourceAttribute="worktype"/>
                <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup_additionalworktype_Item1Desc1_wtypedesc" layoutInsertAt="item2" resourceAttribute="wtypedesc"/>
                <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup__additionalworktype_Item1Desc1_brdbwtcategory" layoutInsertAt="item3" resourceAttribute="brdbwtcategory"/>
            </listItemTemplate>
        </list>
    </lookup>

邮递员反应

代码语言:javascript
复制
    {"spi:promptdown": false,
  "spi:contentuid": "9",
  "spi:promptfail": false,
  "spi:worktype": "FO",
  "dcterms:title": "Follow On",
  "spi:brdbwtcategory": "CM",
  "rdf:type": [
    {
      "rdf:resource": "http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#WorkType"
    }
  ],
  "spi:orgid": "TESTORG",
  "spi:woclass_description": "Work Order",
  "rdf:about": "http://xxxxx.xxx-xxx.xxx:32800/maximo/oslc/os/oslcworktype/_OQ--",
  "spi:keeptaskstatushist": true,
  "dcterms:identifier": "9",
  "prefixes": {
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "dcterms": "http://purl.org/dc/terms/",
    "spi": "http://jazz.net/ns/ism/asset/smarter_physical_infrastructure#",
    "oslc": "http://open-services.net/ns/core#"
  },
  "_rowstamp": "1699854",
  "spi:woclass": "WORKORDER",
  "spi:brdbwtcategory_description": "Corrective Maintenance",
  "spi:type_description": "Not Applicable",
  "spi:type": "NONE"
}

查找视图仅显示工作类型

查找

我已经运行了anywhere-rdf-puller.xml,并验证了该字段位于MobileFirst服务器上的oslc/ file /oslcworktype文件中。

在这个过程中我是不是遗漏了什么?

任何帮助都非常感谢

EN

回答 1

Stack Overflow用户

发布于 2017-01-03 10:09:13

我很确定你的错误在查找中。

您的代码仍然使用默认的layoutInsertAt Item1Desc1布局,但是在代码中您引用的是该布局中不存在的Item1Desc1 item2和item3。与名称建议(以及默认代码)一样,只有一个item1和desc1‘字段’可以填充。

代码语言:javascript
复制
<listItemTemplate id="WorkExecution.WorkTypeLookup_additionalworktype_listItemTemplate_Item1Desc1" layout="Item1Desc1">
            <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup_additionalworktype_Item1Desc1_worktype" layoutInsertAt="item1" resourceAttribute="worktype"/>
            <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup_additionalworktype_Item1Desc1_wtypedesc" layoutInsertAt="item2" resourceAttribute="wtypedesc"/>
            <listtext cssClass="bold textappearance-medium" id="WorkExecution.WorkTypeLookup__additionalworktype_Item1Desc1_brdbwtcategory" layoutInsertAt="item3" resourceAttribute="brdbwtcategory"/>
</listItemTemplate>

您应该在工件/布局/模板/small/只看一下示例中创建一个新的布局模板,这将是有意义的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40721483

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档