Question
· Oct 15, 2018

Trying DTL to Persistent Table - No data gets to table

Hello, our Team is trying to develop Ensemble DTL to transform incoming X12 files into persistent data records. We created a persistent class and we can insert data using SQL. We tried to verify that %Save() gets called by adding %AddToSaveSet() method to persistent class and there writing to a global. We had to extend our persistent class with Ens.VDoc.Interface class or we could not see %Save() being called from Ensemble DTL. We suspect that %Save() gets some kind of error. We tried to debug by overwriting Transform() method in our DTL class. We got "<METHOD DOES NOT EXIST> 148 zTransform+2^TESTOTW.DTL2TABLE.1 Transform,Ens.DataTransformDTL" error when we called set ^TEST(-1)=##super(source,.target,.aux).

We wonder if anybody else has already achieved what we are trying and/or run into the errors we are facing and could shed some light on it for us or guide us what we need to look out for.

Thank you for reading our question. We appreciate any help you can give.

Discussion (3)2
Log in or sign up to continue

Hi Oliver,

The Transform is a generated method, it doesn't make sense to override it and call its base implementation, hence the ##super() error.

If you want the Transform status code then just call the generated Transform on your transform class from the command line, e.g.

write ##class(My.Transform).Transform(in,.out)

But you are not going to get anything meaningful from this unless you actual capture and return the error, so you might want some code inside your transform like this...

Set tSCTrans=target.%Save() if ('tSCTrans) goto Exit

But this doesn't feel right.

I would have a custom process and do it this way...

set sc=##class(My.Transform).Transform(in,.out)
if $$$ISERR(sc) quit sc
set sc=out.%Save()
quit sc

You will quit the status code up to the ensemble director that will then handle the error logging for you.

And I bet you a pint that one of your X12 fields is longer than 50 characters and you are getting a MAXLEN error returned from the save method.

Sean.

Hello Sean,

Thank you for your response.

We attempted a different approach yesterday using XML Adapter in our persistent class and routing the message to an SQL Outbound Adapter. We were able to insert data into our table. However we see errors logged in our SQL Operation (Business Operation):

ERROR <Ens>ErrRequestNotHandled: Request message '13@Test.SubscriberX' not handled

Do you know what we need to do to avoid getting these errors?

Thank you