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?
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.
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.
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.
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
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?
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.
go to post
Ok, yes I didn't think of that and agree with you.
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"}
go to post
Thanks, this worked great.
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.
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.
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.
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
go to post
Tried removing the storage and I'm still getting the same error.
go to post
<response type='MSI.IN835.bo.CreateStageEOBin' >
<assign property="context.tEOBID" value="callresponse.EOBID" action="set" />
</response>
</call>
<trace name='EOBID' value='"EOB ID="_context.tEOBID' xpos='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.tEOBList" value="##class(MSI.IN835.EOBList).%New()" action="set" xpos='200' ypos='350' />
<assign name="Add EOB's to List" property="status" value="context.tEOBList.Insert(context.tEOBID)" action="set" xpos='200' ypos='450' disabled="true"/>
</sequence>