jp.aalders
19th December 2011, 23:51
Hi fellow Baan programmers,
Who has a clue why my AFS function gets frozen and doesn't finish?
I currently try to develop a AFS session in tpptc1100m000 to update the status of an element from "free" to "actual". When saving the changed record the session calls the subsession tpptc1102s000 after the message tpptc11001 has been answered with "yes".
This routine is handled with the AFS code below but the session hangs when the continue.process is executed. The AFS log states...
>tpptc1100m000 handle.subproc tpptc1102s000 add
81dll->serv (handle.subsession^Atpptc1102s000^A2^A84)
>tpptc1102s000(85) put.field:cspp 1
>tpptc1102s000(85) put.field:step.size 1
>tpptc1100m000 continue.process
tpptc1100m000waiting for prev cont.proc
tpptc1100m000waiting timed out
81dll->serv (cont.process^A84)
----------------------- AFS function used -------------------------------
function status.structuurdeel()
{
string st_sessie(13) |* AFS session
string subsession(13) |* AFS subsession
string afs.mess(100) |* AFS messages
string errtype(100) |* AFS messages
string errmess(100) |* AFS messages
string afs.error(100) |* AFS messages
domain tccprj ret.cprj
domain tppdm.cspa ret.cspa
domain tccprj i.cprj
domain tppdm.cspa i.cspa
domain tppdm.cspa top.cspa
|* Functie initialisation
i.cprj = "A06045" |* Sample
i.cspa = " 15" |* Sample
top.cspa = " 1" |* Sampe
|* Answer the message tpptc11001 with yes
ret = stpapi.enum.answer(st_sessie,"tpptc11001",tppdm.yeno.yes)
st_sessie = "tpptc1100m000" |* Main session
subsession = "tpptc1102s000" |* Sub session
|* Search record ( project / element )
stpapi.put.field(st_sessie,"tpptc100.cprj",i.cprj)
stpapi.put.field(st_sessie,"tpptc100.cspa",i.cspa)
ret = stpapi.find(st_sessie, afs.mess)
|* Read values found
stpapi.get.field(st_sessie,"tpptc100.cprj",ret.cprj)
stpapi.get.field(st_sessie,"tpptc100.cspa",ret.cspa)
stpapi.put.field(st_sessie,"tpptc100.stat", str$(tpptc.stat.actual))
ret = stpapi.update(st_sessie ,true, afs.error)
|
|* Recover record indien AFS mislukt.
if not ret then
ret = stpapi.recover(st_sessie, afs.error)
endif
|* Subsession tpptc1102s000 is started
stpapi.handle.subproc(st_sessie,subsession,"add")
|* Set values
stpapi.put.field(subsession,"cspp",top.cspa)
stpapi.put.field(subsession,"step.size", "1")
|* Continue process
stpapi.continue.process(st_sessie,afs.mess)
|* End subsession and and main session
stpapi.end.session(subsession)
stpapi.end.session(st_sessie)
}
Thanks for your assistance in advance! regards John
Who has a clue why my AFS function gets frozen and doesn't finish?
I currently try to develop a AFS session in tpptc1100m000 to update the status of an element from "free" to "actual". When saving the changed record the session calls the subsession tpptc1102s000 after the message tpptc11001 has been answered with "yes".
This routine is handled with the AFS code below but the session hangs when the continue.process is executed. The AFS log states...
>tpptc1100m000 handle.subproc tpptc1102s000 add
81dll->serv (handle.subsession^Atpptc1102s000^A2^A84)
>tpptc1102s000(85) put.field:cspp 1
>tpptc1102s000(85) put.field:step.size 1
>tpptc1100m000 continue.process
tpptc1100m000waiting for prev cont.proc
tpptc1100m000waiting timed out
81dll->serv (cont.process^A84)
----------------------- AFS function used -------------------------------
function status.structuurdeel()
{
string st_sessie(13) |* AFS session
string subsession(13) |* AFS subsession
string afs.mess(100) |* AFS messages
string errtype(100) |* AFS messages
string errmess(100) |* AFS messages
string afs.error(100) |* AFS messages
domain tccprj ret.cprj
domain tppdm.cspa ret.cspa
domain tccprj i.cprj
domain tppdm.cspa i.cspa
domain tppdm.cspa top.cspa
|* Functie initialisation
i.cprj = "A06045" |* Sample
i.cspa = " 15" |* Sample
top.cspa = " 1" |* Sampe
|* Answer the message tpptc11001 with yes
ret = stpapi.enum.answer(st_sessie,"tpptc11001",tppdm.yeno.yes)
st_sessie = "tpptc1100m000" |* Main session
subsession = "tpptc1102s000" |* Sub session
|* Search record ( project / element )
stpapi.put.field(st_sessie,"tpptc100.cprj",i.cprj)
stpapi.put.field(st_sessie,"tpptc100.cspa",i.cspa)
ret = stpapi.find(st_sessie, afs.mess)
|* Read values found
stpapi.get.field(st_sessie,"tpptc100.cprj",ret.cprj)
stpapi.get.field(st_sessie,"tpptc100.cspa",ret.cspa)
stpapi.put.field(st_sessie,"tpptc100.stat", str$(tpptc.stat.actual))
ret = stpapi.update(st_sessie ,true, afs.error)
|
|* Recover record indien AFS mislukt.
if not ret then
ret = stpapi.recover(st_sessie, afs.error)
endif
|* Subsession tpptc1102s000 is started
stpapi.handle.subproc(st_sessie,subsession,"add")
|* Set values
stpapi.put.field(subsession,"cspp",top.cspa)
stpapi.put.field(subsession,"step.size", "1")
|* Continue process
stpapi.continue.process(st_sessie,afs.mess)
|* End subsession and and main session
stpapi.end.session(subsession)
stpapi.end.session(st_sessie)
}
Thanks for your assistance in advance! regards John