Julie Marulappa · May 15, 2019 go to post

If I use the context superclass and I set a value in one of the context properties, will the value be retained from one business process to the other or will it get reset. In my case, I'm parsing an x12 file and have created 1 business process to loop thru the Groups(GS/GE) and another business process to loop thru the transaction sets within the group. The second process is creating a file record and getting a fileid. Once this value is set will it be retained in both business processes if I use the context superclass?

Julie Marulappa · May 2, 2019 go to post

I removed the $ZCONVERT and it is working fine. I think I was more confused on how JSON worked, and after reading thru the comments on this thread it makes more sense to me now. Thank you for your help.

Julie Marulappa · Apr 23, 2019 go to post

I was able to do this: set tJSONFile=$ZCONVERT(tJSONFile,"I","JSON"), and it removed the escape characters.

Result:

{"status":"P","path":"/somepath/test/test123/filename.txt","interchangeOid":"100811"}

Julie Marulappa · May 2, 2018 go to post

Yes the StageBatchId and the FileName are being passed but I don't think the EOBList is. I tried it the way you suggested above as well, but when I go and look at the body properties for the message CopyBatchAndFinishOut, the batchid and filename are their but the EOBList has a size of 0, which makes me think that the values in the list aren't getting passed over.

Julie Marulappa · May 1, 2018 go to post

Ok, thank you so much. I got the list created in the BPL and my id's are now contained in the list. I didn't need the class or the initialization.

Julie Marulappa · May 1, 2018 go to post

My previous comment was incorrect, the error I'm getting is actually coming from a Trace message that I put in the BPL. I was trying to see the contents of the list, but that seems to be throwing the error below.

Julie Marulappa · May 1, 2018 go to post

So, I would declare my context property(context.tEOBList) in the BPL like this: ##class(%Library.ListOfDataTypes).%New()? Because I have tried this as well, but I get a different error when doing that.

Invalid status code structure ("Cache error: <OBJECT DISPATCH>zS46+6^MSI.IN835.bp.IncomingWork6.Thread1.1 *Property 'tEOBList' in class 'MSI.IN835.bp.IncomingWork6.Context' is not MultiDimensional

Julie Marulappa · Apr 30, 2018 go to post

The Add EOB's to list is disabled right now. The initialization is below.

The first piece is where I get the EOBID back and it's assigned to tEOBID.

<response type='MSI.IN835.bo.CreateStageEOBin>
<assign property="context.tEOBIDvalue="callresponse.EOBIDaction="set" />
</response>
</call>
<trace name='EOBID' value='"EOB ID="_context.tEOBIDxpos='200' ypos='550' />

Here is where  the list is created.

<sequence name='Create EOB List' xpos='200' ypos='650' xend='200' yend='550' >
<trace name='1' value='"1"' xpos='200' ypos='250' />
<assign name="Init EOB List" property="context.tEOBListvalue="##class(MSI.IN835.EOBList).%New()action="set" xpos='200' ypos='350' />
<assign name="Add EOB's to List" property="statusvalue="context.tEOBList.Insert(context.tEOBID)action="set" xpos='200' ypos='450' disabled="true"/>
</sequence>