rohan_rege
27th September 2002, 19:37
i have a scenario where when in my afs i aprrove on tfacp1130s000 to go to tfacp1140s000 ...the tfacp1140s000 ....does some approve processing in the session logic and then closes automatically..
and once it ends ,tfacp1130s000....also ends

this doesnt cause a error in the record entered , but i just had added a error handler there.....

f1130s000.Approve( error.mess )
if(strip$(error.mess)<>"") then
msg = f1130s000.get.last.message.code()
msg = "tfacp1130s000 Approve : "& strip$(error.mess)&" "&strip$(msg)
cleanup.processes(2)
return(0)
endif

the error.mess says "Process Gone" after tfacp1130s000 aprrove

continue button on tfacp1130s000 takes us to tfacp1140s000
which approves the invoice and then ends automatically
and control returns tfacp1130 to a stmt after the stmt from which it had zoomed ...this stmt ends tfacp1130s000 too.


Does anyone have any idea how to handle this situation ?

First of all has this error message which has been trapped of any concern since , anyways my Invoice is getting matched and approved

Rgds,
Rohan

lbencic
27th September 2002, 19:59
Rohan -
If there was an error in the session, you should generally receive it back in the error.message.

The get.last.message.code will find any messages/warnings issued by the called program, but messages/warnings will not stop your process.

The little problem here is as the 'Approve' function is on the 'choice.continue', and it does not return a true / false success or fail, you are dependent on the message being filled for you to see if there is an error. That does not always happen.
You may try putting in a regular old select / read to see if the approval worked before you proceed.

Hope that helps.

Also....for ASCII file to AFS - search this forum, someone has posted a nice script to read the ASCII file and use them as inputs for the AFS put.fields.

Good luck

mark_h
27th September 2002, 20:10
In several instances I have had the "Process Gone" message and "Command Cancelled" message when everything worked correctly. In at least one of my function servers I start the session back up and verify that it worked by checking a status. So I just ignore the above messages when I get them and I know the process worked.

Mark

prademaker
18th March 2004, 16:39
rohan_rege,

I'm als strugling with an AFS using tfacp1130s000 to approve invoices.

Are you willing to share your code?

OmeLuuk
2nd April 2004, 22:59
Typically process is gone message occurs when the session executes an end.program call when done with an other action (like choice.cont.process). Then when the AFS session wants so take control the session has been stopped already "too soon".