Greetings!
Generally if we have to send data to external system via MIF, we create Publish Channel and enable Event Listener on publish channel. Once event listener is enabled, Maximo listens for event and send data to end point via publish channel for each Save of related MBO. But there are many scenarios where we need to send data to external system using publish channel on specific event and not for every save. In order to send to external system on specific event, for example - sent data to Ariba when PO status in Maximo is changed to APPR, we can use automation script or java code to call publish channel on the go.
Below code can be used in automation script -
server = MXServer.getMXServer()
userInfo = mbo.getUserInfo()
whereClause = <CONDITION>
server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000)
Via Java class -
MXServer server = MXServer.getMXServer();
UserInfo userInfo = this.getRunasUserInfo();
((MicServiceRemote)server.lookup("MIC")).exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000);
Generally if we have to send data to external system via MIF, we create Publish Channel and enable Event Listener on publish channel. Once event listener is enabled, Maximo listens for event and send data to end point via publish channel for each Save of related MBO. But there are many scenarios where we need to send data to external system using publish channel on specific event and not for every save. In order to send to external system on specific event, for example - sent data to Ariba when PO status in Maximo is changed to APPR, we can use automation script or java code to call publish channel on the go.
Below code can be used in automation script -
server = MXServer.getMXServer()
userInfo = mbo.getUserInfo()
whereClause = <CONDITION>
server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000)
Via Java class -
MXServer server = MXServer.getMXServer();
UserInfo userInfo = this.getRunasUserInfo();
((MicServiceRemote)server.lookup("MIC")).exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000);
- "MIC" is the old acronym for what is now called the MIF- Maximo Integration Framework"
- "Publish Channel Name" is a configuration item created in the Publish Channels application
- "External System Name" is a configuration item created in the External Systems application
- a Publish Channel is associated with an External System to determine which queue and end point to use.
Comments
Post a Comment