使用自定义公式函数/自动化脚本的Maximo公式?

问题描述 投票:1回答:1

在Maximo 7.6.1.1中:

我想创建一个使用自定义公式函数/自动化脚本的属性公式。


我尝试按照以下步骤进行操作,但是很遗憾,当我尝试在WO Tracking中使用它时出现错误:

BMXAA3761E - The event has failed. Ensure that the event is registered correctly.
See the log file in the APP HOME directory for more details about the error.
null

步骤:

  1. 创建自动化脚本:enter image description here

  2. 添加/修改公式函数:enter image description here

  3. 添加/修改属性公式:enter image description here

  4. 创建WO。保存它,以便调用属性公式。

  5. 错误:

enter image description here

从SystemOut日志:

Caused by: 
java.lang.NullPointerException
    at com.ibm.tivoli.maximo.expression.FormulaMboEventListener.preSaveEventAction(FormulaMboEventListener.java:213)
    at psdi.server.event.EventTopic$Subscription.preSaveEventAction(EventTopic.java:731)
    at psdi.server.event.EventTopic.preSaveEventAction(EventTopic.java:342)

有人知道我为什么会收到此错误吗?

此处的相关问题:Can Maximo formulas return null?

formula maximo
1个回答
0
投票

如果一切都为空,那么仍然让它返回0怎么办?然后在ERI属性的“ validate”事件上具有属性启动点脚本,检查该值是否为0,然后使用以下代码将其覆盖为null:

    if mbo.getDouble("eri") == 0:
      mbo.setValueNull("eri")
© www.soinside.com 2019 - 2024. All rights reserved.