Can I set TN to deliver a document to all partners in a Partner Group?

Hello,

I want to deliver a document to two different partners and was wandering if I could do that by setting the receiver as a partner group.

Any ideas?

I believe Partner/Profile Groups is used for a different functionality…where are you seeing that option in TN delivery methods?

Hello rmg,

I haven’t seen it anywhere.
I just need to send a document to two partners and wandered I I could use the partner groups for this.

If the groups aren’t a solution, where can I look for a possible solution?

In the processing rule add the 2 partners to the receivers criteria (make sure document Type is same for both and assigned in the rule) and the delivery setup based on the partner profile what ever protocol you configured should send those either (PrimaryHttp or FTP or Email) etc…

Is that what you are expecting to happen?

As far as I know, a document in Trading Networks can only be delivered to one receiver by the built-in delivery mechanisms.

One way around that limitation would be to write your own processing service to handle the delivery which delivers to multiple partners. I wouldn’t recommend this way, because it would be hard to manage delivery errors - how do you retry delivery if it worked for some partners but not others.

Another way is that if the document is being routed to TN from your own service then you can change that service to route it twice - once for each receiver you want to deliver to.

A third way would be to use the tundra.tn:derive service in the TundraTN package (https://github.com/Permafrost/TundraTN), which you can call from a TN processing rule to make copies of a document with an updated sender and/or receiver for each copy.

// Derives a new bizdoc from an existing bizdoc, optionally updating the sender and/or 
// receiver on the derivative.
//
// If a $service is specified, it will be called as a processing service for the bizdoc. It can
// return the $derivatives list, thereby allowing for the derivatives to be determined at
// runtime.
tundra.tn:derive(bizdoc, $service, $catch, $finally, $pipeline, $derivatives, $part, $encoding);

This would let you route only the original document, and then both deliver the original and derive a new copy for the second receiver as follows:

  1. Create a TN processing rule to process the original document.
  2. On the action tab, check ‘Execute a service’ and choose tundra.tn:derive as the processing service.
  3. Click Set Inputs and enter the following input arguments:

$derivatives[0]/receiver = an External ID for the second receiver
$derivatives[0]/type = “DUNS” or “User Defined 1” or whatever External ID Type the above ID relates to

  1. If you use a built-in delivery method then you can also check ‘Deliver document by’ on the rule and choose the appropriate method of delivery. TN will first call tundra.tn:derive to derive the copies, and then will set up the delivery task to deliver the original document.

If however you are using a custom processing service to deliver the original document, then you can call your service via tundra.tn:derive by setting the $service input to the name of your custom processing service (tundra.tn:derive will first call this service to process the original document and then derive the new copies as defined in the $derivatives input argument).

  1. Create another TN processing rule to deliver the derived copy of the document (with the second receiver) as you would normally.

TundraTN/tundra.tn:derive is a pretty powerful addition to TN, if I do say so myself, as it lets you work-around the issue that TN does not support a multiple subscriber model for messaging, and can do so without any additional code required on your part (it just needs configuration in a TN processing rule).

1 Like

Yes you cannot delivery same transaction to 2 differrent partners same timefrom TN delivery and as suggested above work around your can invoke a custom flow using rule whcih has logic to route to multiple destinations (either http or FTP what ever desired protocol). This is the easy and faster way of handling your requirement.

HTH,
RMG

Thank you both Lachlan and rmg.

You sure answered my question.
For now we’re putting the document in TN twice as in one of your worakrounds…

And I didn’t know of Tundra.
I’ll be sure to see how it works and suggest it to the top dogs :wink:

As long it works better for you and keep trying other options if time permits. :slight_smile: