Creating documents in Broker 6.5

Anyone knows how to put (insert, create) new documents in 6.5 Broker directly?
I was able to do it by using the old tool (Enterprising integrator), and I am pretty sure there should be new tools to do this, and also the tool to make these documents publishable/subscribable.

Thanks in advance

Derek

The tool is called webMethods Developer 6.5.

Mark

Thanks.

(I am totally new to 6.5, so it may sound stupid).

I guess when I am in developer 6.5 and create a new Document, I can specify that this is a Broker doc, and with my specified qualifier like AAA:BBB,
where BBB is the actual doc?

regards.

By setting a document type’s publishable property to “true”, you can publish the document to the Broker and subscribe to it using an IS trigger to invoke some Flow or java service.

You can publish a document to Broker to test triggers or downstream Broker clients, by opening the publishable document type and then using Developer’s Test->Run menu option. You will be prompted for options regarding how and where to publish the document.

The fully qualified document type name is in the form of folder.subfolder.subfolder:documentTypeName.

Spend some quality time with the Publish-Subscribe Developer’s Guide in the [I]wm_home[/i]Developer\doc\guides folder.

Mark

Thanks, Mark.

It is not that I did not read the docs (it may seems that way), but we are doing something different from a “Regular” flow that WM wants us. We want to continue to use the java program using the BrokerJavaAPI existed since version 4.X, so we will be pub/sub req/reply to/from Broker directly, and broker talks to IS and to db, not through IS first and have IS talk to Broker. Thus maybe the confusion.

I have tested it around and it seems if going through with the above flow, a reply pulbished by IS will not go to the Broker if the reply Document was created in IS and pushed to Broker, and if a Docuemnt is directly put into the Broker (using the old tool), then the reply will go to the Broker and then of course to the java app connected to the Broker

As always, you comments are well taken and greatly appreciated.

–Derek

What happens when you create the publishable document type using a source of “from a Broker document”. Use CTRL-N or “show all choices” to create a new document type. Then choose “from a Broker document”.

Mark

That is exactly what I did, it means that a Broker Doc has to exist first.

–Derek

Derek,

Still not sure what your trying to do. A java Broker Client can subscribe to a document published by IS (it’s just a Broker Event nothing more, nothing less).

Your Broker Client needs to connect using the “IntegrationServer” client group.

Assuming your IS document type name is test.docs:myDoc, your BrokerClient would subscribe to “wm::is::test::docs::myDoc”. I just ran a quick test by modifying the “publish1.java” sample to connect using the “IntegrationServer” client group and correct event name.

Mark

Yes, that will work for pub/sub, but will not work for req/reply since the java client only sends a request with a particular Document name, and there is no Document name for the reply as far as java client is concerned.

Regards.

Derek

Not sure I understand you. Why would the java client not be able to register a callback for the reply event?

Mark

java client does register a callback, but not by Document name, the actual code is:

appClient.registerCallback(1234, false, myCallback, null);

and req is like:

zzz.publishEvent(appClient, DocumentName, 1234);

where 1234 is the tag number which tie the req and reply together in the Broker.

Regards.

–Derek

How are you replying to the published document within IS?

Mark

Using

pub.publish:reply

Again if the reply Document is pushed into Broker, it is not working, else if I create the reply doc in the Broker first, it works.

regards

–Derek

Derek,

I did the following:

  • Imported the “request.adl” to the Broker using the WmBrokerAdmin package
  • Compiled the supplied “wm_home\Broker\samples\java_api\request\request2.java” sample with no changes
  • Created a document type from the “Sample::Request” broker document in IS
  • Created a new document type called SampleReply2 containing the required “reply_number” integer and made it publishable
  • Used WmBrokerAdmin to add that document to the Sample clientGroup’s “canSubscribe” list
  • Created a simple Flow service to process the document which used pub.publish:reply to reply to the request specifying the fully qualified IS document type name for the SampleReply2 doc type.
  • Created a trigger on the Sample::Request documen type that invoked the processing service
  • Ran the request2 app from the command line
  • Verified that the test app received the requested number of reply documents
Data reply #1 received

event wm::is::sandbox::docs::SampleReply2 {
    int reply_number = 123;
    struct {
        unicode_string locale;
        int tag;
        unicode_string activation;
        unicode_string businessContext;
        unicode_string uuid;
        unicode_string trackId;
        int is_WireFormatVersion;
        int age;
        int flags;
        date enqueueTime;
        date recvTime;
        unicode_string pubId;
        unicode_string destId;
    } _env = {
        locale = "";
        tag = 1;
        activation = "wm685141070b05e11daaad5dc794f03ce9c";
        businessContext = "wm6:85141070b05e11daaad6dc794f03ce9c\\snull\\snull:wm685141070b05e11daaad5dc794f03ce9c:null:IS_61";
        uuid = "85141070-b05e-11da-aad7-dc794f03ce9c";
        trackId = "85141070-b05e-11da-aad7-dc794f03ce9c";
        is_WireFormatVersion = 3;
        age = 0;
        flags = 16;
        enqueueTime = "03/10/2006 10:51:36.695";
        recvTime = "03/10/2006 10:51:36.695";
        pubId = "IS65_DefaultClient";
        destId = "#vclient21-29";
    };
};

Mark

Mark,

Really appreciated what you have been going through all this to help a fellow developer out.

Yes, I was missing the step “Used WmBrokerAdmin to add that document to the Sample clientGroup’s “canSubscribe” list”, thought it was a reply but still need to be subscribable.

Again, thanks and appreciated.

–Derek