Maximo Anywhere - 无法查看添加到OSLC资源的字段

时间:2016-11-21 13:34:44

标签: maximo-anywhere oslc

我正在尝试向Maximo Anywhere 7.6.1中的OSLCWORKTYPE OSLC对象公开一个新字段,特别是在工作类型查找使用的additionalworktype资源中

按照说明http://www.ibm.com/support/knowledgecenter/SSPJLC_7.6.0/com.ibm.si.mpl.doc/config_apps/t_add_flds_domains.html并阅读本文Incorporating Custom Fields into OSLC Components中的步骤 - 我仍然无法在应用中查看该字段。

我已将其添加为additionalworktype资源,如下所示,但是当控制台将其注销时,它不会显示在对象中。但是当我使用Postman查询rdf时,我可以看到响应中返回的字段。相关字段为 brdbwtcategory

<foo>
  <bar a="first">
        <baz b="test"  c="x">
        </baz>
  </bar>
  <bar a="second">
        <baz b="test" c="y">
        </baz>
  </bar>
  <bar a="third">
        <baz b="noTest" c="y">
        </baz>
  </bar>
</foo>

查找

client['Account'].getInvoices()

邮差回应

<!-- 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>

查找视图仅显示工作类型

Lookup

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

我在这个过程中遗漏了其他什么吗?

任何帮助非常感谢

1 个答案:

答案 0 :(得分:0)

我非常确定您的错误是在查找中。

您的代码仍然使用默认的 Item1Desc1 布局,但在代码中您引用的 layoutInsertAt 第2项和第3项不存在于该布局中。与名称建议(以及默认代码)一样,只有item1和desc1&#39;字段&#39;可以填补。

<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>

您应该在下面创建一个新的布局模板 神器/布局/模板/小/ 只要看看那里的例子就可以了。