# How to access ISA when processing Transaction content

**URL:** <https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [March 25, 2004, 2:23am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119 "2004-03-25T02:23:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 25, 2004, 2:23am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/1 "2004-03-25T02:23:43Z")

</div>

We have a processing rule for an X12 4010 810 document. It’s “Action” is to “exectute a service” called “receiveInvoice”. In the “receiveInvoice” Flow service, I do the following:

```
SEQUENCE (Exit on Success) 
  SEQUENCE (Exit on Failure) 
    getTspace (Pulls out the Transaction content) 
    convertToValues (Creates an 810 IDATA document from the edidata) 
    mapInvoice (maps Invoice to an internal format) 
  SEQUENCE (Exit on Done) 
    getLastError 
    EXIT '$flow' and signal FAILURE
```

The above code works just fine. But, our mapping service requires information from the ISA and GS too. How can I get to this information from the above Flow service? (for example, ISA02, ISA06, GS02, etc). I’ve tried calling envelopeProcess, which works and gives me the ISA, but then when I try calling convertToValues, I get a parse error. What’s the best way to do this?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 25, 2004, 3:59am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/2 "2004-03-25T03:59:20Z")

</div>

Any ideas guys?

---

<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:** [March 25, 2004, 4:12am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/3 "2004-03-25T04:12:07Z")

</div>

The Reason of parsing error might be the edidata contained in the ST segment level is not well formed or its not matching with the EDIFFSchema provided.

Please check the data/delimiters/Qualifiers are valid and matching with the 810 Schema.

HTH.

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 25, 2004, 5:12am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/4 "2004-03-25T05:12:25Z")

</div>

Okay, I got it to work, but this doesn’t feel like the best way to do this:

```
getTspace (pull the edidata out of the bizdoc) 
processEnvelope (get the X12env from the edidata, and drop the edidata) 
getTspace (get the edidata again from the bizdoc) 
convertToValues (get the X12 810 document from the edidata)
```

The above works, but it feels like a hack. If anyone can suggest a better way to do this, please do.

Thanks.

---

<div class="post-metadata">

**Author:** ![Chris\_L](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@Chris\_L](https://techcommunity.softwareag.com/u/Chris_L)\
**Post date:** [March 25, 2004, 7:23am UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/5 "2004-03-25T07:23:27Z")

</div>

Robby,

Take a look at wmEDIsamples package there’s an excellent example in there.

Question. Why are you using getTspace, do you have largeDoc enabled?

HTH

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [March 25, 2004, 8:43pm UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/6 "2004-03-25T20:43:32Z")

</div>

Perfect. I guess I should have looked in WmEDISamples first and saved myself a lot of trouble. Now it does exactly what I want. Thanks Chris.

We may need to enable largeDoc, but that’s not why I am using getTspace. Is there a better way to get the EDI data out of the bizdoc? Should I use wm.tn.doc:getContentPart instead?

---

<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:** [March 25, 2004, 8:55pm UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/7 "2004-03-25T20:55:23Z")

</div>

Use the bizdoc/Content variable to extract the EDI data wich gives bytes and next convert bytesToString (edidata).

And if you enable largeDoc then you need to use the wm.tn.doc.getContentPartData for pulling of the data (getAs stream).

HTH,

---

<div class="post-metadata">

**Author:** ![Chris\_L](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@Chris\_L](https://techcommunity.softwareag.com/u/Chris_L)\
**Post date:** [March 25, 2004, 9:12pm UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/8 "2004-03-25T21:12:09Z")

</div>

You don’t need getTspace unless LargeDoc is enabled.  
These links may also help.  
[url=“[wmusers.com](http://www.wmusers.com/wmusers/messages/117/966.shtml)”][wmusers.com](http://www.wmusers.com/wmusers/messages/117/966.shtml%5B/url%5D)  
[url=“[wmusers.com](http://www.wmusers.com/wmusers/messages/117/982.shtml)”][wmusers.com](http://www.wmusers.com/wmusers/messages/117/982.shtml%5B/url%5D)

---

<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:** [March 25, 2004, 9:16pm UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/9 "2004-03-25T21:16:32Z")

</div>

just an update,  
For retrieving the X12 transation data,check the pipeline BizDoc Envelope containing the docTypeName= X12 4010 (TransactionSet) and use this to get the bizdoc/Content (bytes).

---

<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:05pm UTC](https://techcommunity.softwareag.com/t/how-to-access-isa-when-processing-transaction-content/108119/10 "2021-04-02T15:05:04Z")

</div>


