NirajKakodkar
20th April 2016, 16:15
Hi ,

I am facing a bit strange issue, I have a DLL to generate Outbound advice with method as below

whinhdllc0001.generate.ob.advice(i.runn, i.orno)

The method have run number & order number as input arguments. The DLL works perfect when called from 3GL object / 4 GL session without any issues & generates the advice properly.

But when I call the same method from BOD, the advice is not generated. I tried to debug the DAL for whinh225 but it works good as well. I tried to capture any DAL errors at the end of my DLL to check what could have failed. I found the last error message as below

"Outbound Order line (SFC Production Order XYZ 1/10 -1 ): The time field cannot be modified in outbound advice).

The strange thing is the DLL generates the desired output with same inputs arguments when called from 3GL/4GL, but when it is called from the BOD st script the same method with same input gives the above error.

Moreover I tried to fetch the message pattern to identify where this message is coming from, but no luck :(

Any thoughts, suggestion, advice to resolve the issue ?

bhushanchanda
20th April 2016, 17:03
Hi Niraj,

What you can do here is, you can write your DLL-A in a 3GL and then kick off the 3GL in a DLL-B using activate() or wait.and.activate(). Now call this DLL in your ST script. Check if that works for you.

As the BOD holds the commit, there might be some unhandled transaction in the standard DLL. With the above, the hold over commit will be skipped and the DLL will run normally.

Check if that works for you.

Else, you can try using -

old.id = db.get.child.transaction()
db.set.child.transaction(0)
wait.and.activate("your_3gl")
db.set.child.transaction(old.id)

Faced some locking issues due to the same. Was resolved due to the above 2 fixes.

NirajKakodkar
20th April 2016, 17:07
Thank you Bhushan, thats a nice thought. I can give it a try :)

NirajKakodkar
20th April 2016, 18:31
Hi Bhushan,

It worked like a charm, somewhere in my mind I was thinking you will be the one who will give me the resolution for this. Thanks again :). Keep up the good work.

benito
20th April 2016, 22:37
nice trick! awesome.

bhushanchanda
20th April 2016, 22:45
Glad that worked for you. :)