Topic
  • No replies
maokaig
maokaig
14 Posts

Pinned topic Unexpected Publish Channel Behaviour

‏2013-04-16T04:53:07Z |

Hi,
 

Below is the simplified case so that it can be understood easily.

We have an object structure OS1. The parent object is SR (a view of Ticket table). The child object is WORKORDER. We have a relationship R1 linking SR and WORKORDER objects.

We have a publish channel TEST using this object structure. There is one processing rule RULE1 on SR object to skip some outgoing messages based on the values of 12 SR object fields.
 
The publish channel works fine with the SR application without any problem.

Now we use the Customer Billing (SP) application to create a Bill Batch.
 
Click on the Select Tickets button and then tick the Select all Service Requests field to copy the billable SR's, an error occurs:

BMXAA4187E - The relationship R1 does not exist for business object TICKET. Verify that the relationship specified in parameter R1 exists in the Maxrelationship table.
 
By checking the Maximo log file, it says:

08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] got eventAction psdi.app.ticket.Ticket@2e522e52
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] got postSaveInternalEventAction psdi.app.ticket.Ticket@2e522e52
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] Got os postSaveInternalEventAction for sr for os OS1 with objectPath SR and subscription id TEST
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] parentList []
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] Got os event from root object TICKET
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] Firing event for mbo TICKET with id 121
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] OS1 MicListener structureChanged called.
08 Apr 2013 13:59:14:093 [DEBUG] [MAXIMOINT] [] Entering create TICKET
08 Apr 2013 13:59:14:094 [DEBUG] [MAXIMOINT] [] serializing column ACTUALFINISH for mbo TICKET
….
08 Apr 2013 13:59:14:096 [DEBUG] [MAXIMOINT] [] serializing column TICKETID for mbo TICKET
08 Apr 2013 13:59:14:104 [ERROR] [MAXIMOINT] [] BMXAA4187E - The relationship R1 does not exist for business object TICKET. Verify that the relationship specified in parameter R1 exists in the Maxrelationship table.
psdi.util.MXSystemException: BMXAA4187E - The relationship R1 does not exist for business object TICKET. Verify that the relationship specified in parameter R1 exists in the Maxrelationship table.
        at psdi.mbo.Mbo.getMboSet(Mbo.java:3239)
        at psdi.iface.mos.MOSStAXStructure.createStructure(MOSStAXStructure.java:467)
        at psdi.iface.mos.MOSStAXStructure.createXML(MOSStAXStructure.java:662)
        at psdi.iface.mos.StAXStructure.serializeMboAsSet(StAXStructure.java:221)
        at psdi.iface.mic.PublishChannel.publish(PublishChannel.java:103)
        at psdi.iface.mic.MicListener.structureChanged(MicListener.java:138)
        at psdi.iface.mos.OSMboListener.postSaveInternalEventAction(OSMboListener.java:216)

The error seems to me that when Maximo copies an existing ticket to the Bill Line, Maximo writes some data into the Ticket table (e.g. the PLUSPBILLBATCH and PLUSPBBLINENUM). This ticket's change causes the TEST publish channel being triggered ("Got os event from root object TICKET"). This is expected. However, what is not expected is that Maximo processes the object structure change from the TICKET object (TICKET is not defined in the object structure) rather than SR object (SR is defined in the object structure). It tries to call R1 relationship from the TICKET object to find the related WORKORDER object. R1 is a relationship from the SR object to the WORKORDER object rather than from the TICKET object to the WORKORDER object. Therefore the above error is thrown.

If I create another R1 relationship between TICKET and WORKORDER (simply duplicate the R1 relationship, but change the Parent = 'TICKET'), we will get a slight different error. No relationship name presents.
 
BMXAA4187E - The relationship does not exist for business object TICKET. Verify that the relationship specified in parameter exists in the Maxrelationship table.


Below is the log file traces:


08 Apr 2013 14:23:51:815 [DEBUG] [MAXIMOINT] [] got eventAction psdi.app.ticket.Ticket@76ac76ac
08 Apr 2013 14:23:51:815 [DEBUG] [MAXIMOINT] [] got postSaveInternalEventAction psdi.app.ticket.Ticket@76ac76ac
08 Apr 2013 14:23:51:815 [DEBUG] [MAXIMOINT] [] Got os postSaveInternalEventAction for sr for os OS1 with objectPath SR and subscription id TEST
08 Apr 2013 14:23:51:815 [DEBUG] [MAXIMOINT] [] parentList []
08 Apr 2013 14:23:51:816 [DEBUG] [MAXIMOINT] [] Got os event from root object TICKET
08 Apr 2013 14:23:51:816 [DEBUG] [MAXIMOINT] [] Firing event for mbo TICKET with id 121
08 Apr 2013 14:23:51:816 [DEBUG] [MAXIMOINT] [] OS1 MicListener structureChanged called.
08 Apr 2013 14:23:51:817 [DEBUG] [MAXIMOINT] [] Entering create TICKET
08 Apr 2013 14:23:51:817 [DEBUG] [MAXIMOINT] [] serializing column ACTUALFINISH for mbo TICKET
….
08 Apr 2013 14:23:51:845 [DEBUG] [MAXIMOINT] [] Leaving create
08 Apr 2013 14:23:51:846 [DEBUG] [MAXIMOINT] [] Entering processStructure
08 Apr 2013 14:23:51:846 [DEBUG] [MAXIMOINT] [] Entering processExitsOut
08 Apr 2013 14:23:51:846 [DEBUG] [MAXIMOINT] [] IntegrationPoint: IP1
08 Apr 2013 14:23:51:846 [DEBUG] [MAXIMOINT] [] Extsystem EX1
08 Apr 2013 14:23:51:846 [DEBUG] [MAXIMOINT] [] Interface: TEST
08 Apr 2013 14:23:51:848 [DEBUG] [MAXIMOINT] [] Entering checkAssignmentProcs
08 Apr 2013 14:23:51:848 [DEBUG] [MAXIMOINT] [] Proc Name is RULE1
08 Apr 2013 14:23:51:849 [DEBUG] [MAXIMOINT] [] Proc Type is SKIP
08 Apr 2013 14:23:51:849 [DEBUG] [MAXIMOINT] [] Entering checkConditions
08 Apr 2013 14:23:51:849 [DEBUG] [MAXIMOINT] [] Condition is 10
08 Apr 2013 14:23:51:849 [DEBUG] [MAXIMOINT] [] CondType is MBO
08 Apr 2013 14:23:51:850 [DEBUG] [MAXIMOINT] [] CompType is IFACECONTROL
08 Apr 2013 14:23:51:850 [DEBUG] [MAXIMOINT] [] EvalType is NONE
08 Apr 2013 14:23:51:855 [ERROR] [MAXIMOINT] [] BMXAA4187E - The relationship  does not exist for business object TICKET. Verify that the relationship specified in parameter  exists in the Maxrelationship table.
psdi.util.MXSystemException: BMXAA4187E - The relationship  does not exist for business object TICKET. Verify that the relationship specified in parameter  exists in the Maxrelationship table.
        at psdi.mbo.Mbo.getMboSet(Mbo.java:3206)
        at psdi.iface.proc.ConditionProcesser.checkConditions(ConditionProcesser.java:122)
        at psdi.iface.proc.ProcProcesser.processAssignments(ProcProcesser.java:243)

This time, the process passes the Object structure change treatment and enters the processing rule RULE1 and failed. The SKIP processing rule has some conditions based on SR object. E.g. SR.ACTUALFINISH is not changed.
 
Again, Maximo tries to evaluate the conditions using TICKET object rather than SR object. Then it seems that Maximo tries to find the SR field using the relationship in the RELRELATION field which is empty. Therefore the above error is thrown without a relationship name specified.

Why does Maximo use the TICKET object, which doesn't exist in the object structure, in the publish channel process rather than use the SR object? Is this an expected behaviour? Is there any work around except replacing SR with TICKET in the object structure, which will change the already in use interface.


With Best Regards,

Maokai