Eddie Monster
15th December 2017, 19:47
I have used the rushdll 'wrapper' program to create code so I can interact with the Copy Standard Project Structure to Project (tipcs2230m000) session. There are some additional fields on the item master that we need to bring over to the PCS side when an item is copied using the session. Attached is the raw code that the Wrapper program generated. Normally I would insert my code within the on.choice.cont.process() after the wrapper code calls the parent... but in my testing the parent never releases control back to the wrapper program... therefore my code never gets called.
There is no option to use after.choice.continue.process either as it is never called by the parent.
Anyone have a work around for this? I could create a trigger at the db level, but would really prefer not to do that.
Thank you in advance for any ideas!
vinceco252
15th December 2017, 20:21
Did you just try to add a that event to the script? I've been able to add field sections that aren't in the parent script...
Eddie Monster
15th December 2017, 21:11
Yes,
I tried adding the after.choice.cont.process() event and the same thing (or rather nothing) happens. That event is never called.
mark_h
17th December 2017, 02:34
When you say it never returns control to the wrapper program does that mean the wrapper has lost control? I mean if you put in debug mode and copy an item - it executes the choice.cont.process section , if after the copy you hit exist does it execute the choice.end.program in the wrapper?
Then again as I am looking at the code - Are you zooming into the session from another I am just wondering if it executes one of the after.zoom sections.
Eddie Monster
18th December 2017, 14:13
Referencing the attachment, it executes lines 228 and 229, but then the session sits awaiting the next event. If I Cancel or Save/Exit I can re-enter the script, but not a the after.choice.
mark_h
18th December 2017, 16:53
Well you can try adding some other sections to see if those get hit and you can do the update in there. Thinking like before.choice.update.db or after.choice.
manish_patel
19th December 2017, 10:12
After executing copy statements, it executes choice.again, if it is not running as a background process or in AFS mode in on.choice.continue.
So I would call tipcs2230m000 session from 3GL code.
Eddie Monster
4th January 2018, 21:30
manish_patel - Can you please explain how I would do this via 3GL.
It has been some time since I've performed any Baan development and I am afraid, I do not follow how you intend to use the 3GL program...
Do you propose I create a new session, call tipcs2230m000 via AFS and then once the AFS session is closed out, write some insert statement based on the tipcs2230m000 selection criteria to update the record outside the normal processing of tipcs2230m000?
manish_patel
5th January 2018, 07:22
how I would do this via 3GL.
Just create the 3 GL script (lets say tipcs2230m3gl) as below
long ret
function main()
{
ret = wait.and.activate("tipcs2230m000")
}
And then run this 3GL object (otipcs2230m3gl) instead of running tipcs2230m000 directly.
Do you propose I create a new session, call tipcs2230m000 via AFS and then once the AFS session is closed out, write some insert statement based on the tipcs2230m000 selection criteria to update the record outside the normal processing of tipcs2230m000?
Create a new session, call tipcs2230m000 via AFS. -- That's all, no further action is required.