# Custom data in processing rule

**URL:** <https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [October 9, 2012, 7:23pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433 "2012-10-09T19:23:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 9, 2012, 7:23pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/1 "2012-10-09T19:23:44Z")

</div>

Hello ,  
sorry for asking repeated queries. I have searched the whole forum about my issue but no luck… ☹

Query is related to have pipeline data in processing rule service. below are the things there in my code.

1. Sending an EDI standard document(Header document (requestId,Sender and receiver details for updating things in DB) and EDI Segment details document) To TN by tn:receive service.
2. Processing rule service is invoked but i am very much interested in Header document ((requestId,Sender and receiver details for updating things in DB)). ie I want Header document to come along with BIZDOC. FYI, Explicitly I have placed Header as input in processing rule service.

P.S:

1. I have preserved EDIDATA and Header document in the service which sends EDIDATA to TN
2. Execution mode is synchronous in processing rule service.
3. As everybody knows, Header document will not there in EDI standard but i need to track it processing rule service to update the DB status and to catch error if any failure.

Please provide your valuable suggestion on this. Really thanks in advance.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 9, 2012, 7:52pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/2 "2012-10-09T19:52:25Z")

</div>

In the processing Invoked TN service inputs did you set/see bizdoc,sender(ProfileSummary),receiver(profileSummary) references and so that can be used for your extracting sender/receiver details and updating in DB usage?

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 9, 2012, 7:53pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/3 "2012-10-09T19:53:01Z")

</div>

First thing in the processing Invoked TN service inputs did you set/see bizdoc,sender(ProfileSummary),receiver(profileSummary) references and so that can be used for your extracting sender/receiver details and updating in DB usage?

Is that what you are expecting in the pipeline?

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 9, 2012, 8:09pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/4 "2012-10-09T20:09:25Z")

</div>

> [@rmg;86622](#):
>
> First thing in the processing Invoked TN service inputs did you set/see bizdoc,sender(ProfileSummary),receiver(profileSummary) references and so that can be used for your extracting sender/receiver details and updating in DB usage?
> 
> Priya: I can see BIZDOC , sender/receiver details, flags as a pipeline data in processing rule service. but while submitting an edidata to TN, i have preserved HEADER document as a pipeline data. This particular HEADER is not coming as a pipeline data in processsing rule service. FYI, customized header document has few fields but am interested in requestID since i need it to track the records in DB.
> 
> Is that what you are expecting in the pipeline?
> 
> HTH,  
> RMG

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 9, 2012, 8:14pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/5 "2012-10-09T20:14:45Z")

</div>

What header document are you preserving and requestID what is that you are talking any attribute or identifer in the TN transaction?

---

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 10, 2012, 10:15am UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/6 "2012-10-10T10:15:13Z")

</div>

> [@rmg;86624](#):
>
> What header document are you preserving and requestID what is that you are talking any attribute or identifer in the TN transaction?

Priya:  
Hello rmg,  
Thanks for your quick reply. I have preserved "custom document " in wrapper service which sends an EDI data to TN since below fields are required in processing rule service to update the DB status for each transaction.

1. requestID(unique Id for each transaction. ie its same like UUID). you may call it as transactionId too…
2. SenderID  
3.ReceiverId

fyi, requestId is nowhere related to TN transaction. Purpose of requestId are:  
1.requestId is for tracking each transaction in database.  
2. requestId is the primary key in database and its maintains the transaction details in DB.

Flow:

1. Wrapper service sends an edi data to TN  
i) consider we have 855 edi document and we are sending the same to TN and doc structure is  
  
  
  
  
  
  
ii) edidata has formed with all Segments (without header details since header document is for internal purpose and not to be sent to partner)  
iii) preservation of doument/string has done to Header document and edidata respectively. The reason for preserved header document is to carry the requestId in processing rule service to update the Status of transaction.  
iii) used tn:receive service to send an edidata to tn

2. Processing rule service  
i) bizdoc is coming with all required documents and i can manipulate the edidata.  
ii) used ediint:send service to send an edi data to defined partner for AS2 connection.  
iii) herewhere i required requestId (exists under preserved header document) to track status of partner delivery details in database.

will the execution mode change to Async when AS2 connection is involved?

Hope I am clear enough to provide required information. Please suggest me on getting a custom document in processing rule service when the connection is AS2.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 10, 2012, 6:53pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/7 "2012-10-10T18:53:36Z")

</div>

As far the requestID you are looking for then use the “InternalId” from the TN as the transaction identifier if that works for you?

But why do you want to store each transaction in a seperate table when TN db does it for you and you can always query the TN db right for the doc status or userstatus itself?

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 10, 2012, 7:18pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/8 "2012-10-10T19:18:10Z")

</div>

Hello rmg,

The requestId that we are using in our code is nothing but an "activitationID "(flow is outgoing flow ie SAP -\>TN). We want to use the same requestId throughout the flow to track the business transaction.

we are using another DB for tracking business details and herewhere requestId is required . we are not using internalID.

Is there any chance to pass requestId(alone) to unused field to TN ? so that i can get the same requestId in processing rule service.

FYI, i have tried to set requestId as one of the attribute in TN via built-in service before submitting a data to TN. But built-in service required bizdoc ☹

Please suggest me how to get requestdId in processing rule service.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 10, 2012, 7:37pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/9 "2012-10-10T19:37:52Z")

</div>

Yes create a custom attribute (correlationID or some thing) and assign it to the documentType that you submit to TN and update the attribute during run time for the bizdocid it returns for your correlation:

Is this some thing you are looking for?

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 10, 2012, 8:01pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/10 "2012-10-10T20:01:29Z")

</div>

Hello Rmg,  
you have suggested to create custom attribute and assign the same to documentype. I have a question on this which are as below.

1. can we create custom attribute to EDI standard documenttype?
2. If yes for point 1, how to set attribute without bizdoc since wm.tn.doc:setAttribute service expect bizdoc as one of the input.

Please guide me here… sorry if am troubling you more on this.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 10, 2012, 8:22pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/11 "2012-10-10T20:22:21Z")

</div>

Not for EDI standard document types edits…

ofcourse bizdoc/id is required to set/update attribs values:

But for updating attribute use these reference in general:

doc:view (map InternalID from the bizdoc if pipeline has it or use tn:query (createDocumentQuery and documentQuery services to get bizdoc info per the input criteria)  
setAttributes  
updateAttributes

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![priya\_v](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@priya\_v](https://techcommunity.softwareag.com/u/priya_v)\
**Post date:** [October 11, 2012, 12:38pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/12 "2012-10-11T12:38:52Z")

</div>

Hello rmg,  
I am handling with EDI data so there is no point of adding custom attributes. I planned to use system attribute "conversationId " to track my requestId but problem is “there is no formation of bizdoc before submitting a EDI message to TN”.

you have proposed an idea to use “Tn: query” to form the bizdoc and then to set the attributes before tn:receive service.

As per your suggestion, below are my doubts:

1. wrapper service which sends an edi data will be having 2 bizdoc at the end of the service ie, 1 will be formed by tn:query to set attributes and other one will be formed by tn:receive. recent one will be there in pipeline and which will go to TN. so nowhere requestId will be tracked.
2. tn:query service will fetch records when the transaction is already there in TN(based on input that we are passing). Consider a new message which about to send to TN. In this case, Tn:query will not provide records and no bizdoc will be formed to track my requestId.

Please correct me if am wrong anywhere here…

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 11, 2012, 6:21pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/13 "2012-10-11T18:21:25Z")

</div>

Yes correct you have no way of bizdoc info unless submitted to TN and later retrieval…The only option you have is look in the PSUtilities or use some custom logic to create a unique identifier for your outbound transactions…

You have to really depend on after submitted to TN only not before in your case it sounds:

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:06pm UTC](https://techcommunity.softwareag.com/t/custom-data-in-processing-rule/110433/14 "2021-04-02T15:06:10Z")

</div>


