PeopleCode IntBroker 类没有 CreateInstance 函数
在 PeopleCode 中,IntBroker 类确实没有 CreateInstance 函数。这是因为 IntBroker 类是 PeopleSoft 应用程序中内置的类,它的实例是在应用程序启动时自动创建的,并由 PeopleSoft 应用程序管理。因此,您无法通过 CreateInstance 函数来创建 IntBroker 类的实例。
IntBroker 类的主要作用是在 PeopleSoft 应用程序中提供消息传递服务。您可以使用 IntBroker 类的方法来发送和接收消息,以及管理消息队列和订阅。
要使用 IntBroker 类,您需要在 PeopleCode 程序中声明一个 IntBroker 对象,并使用 IntBroker 类的方法来执行所需的操作。例如,以下代码段演示了如何使用 IntBroker 类的 SendMessage 方法发送一条消息:
Local IntBroker &IB = CreateObject('IntBroker');
Local Message &Msg = CreateMessage();
&Msg.SetContent('Hello, world!');
&IB.SendMessage('MY_QUEUE', &Msg);
在此示例中,我们首先创建了一个 IntBroker 对象,然后创建了一个消息对象,并将一条文本消息设置为消息内容。最后,我们使用 IntBroker 对象的 SendMessage 方法将消息发送到名为 'MY_QUEUE' 的消息队列中。
请注意,由于 IntBroker 类的实例是由 PeopleSoft 应用程序管理的,因此您不需要在使用 IntBroker 之前显式地创建一个实例。您只需要声明一个 IntBroker 对象即可开始使用 IntBroker 类的方法。
原文地址: https://www.cveoy.top/t/topic/npr6 著作权归作者所有。请勿转载和采集!