Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Event script workflow and Upgrade From LL9SP1 to LL91Sp3
Luca Colucci
In a Livelink 91SP1 istance on Hp-Ux 11.0 with Oracle 8.1.7 we use event script in a workflow map to kill or finish specified steps at the end of other steps We use code like the following: // Start Transaction if( OK ) if( ! wapiCtx.StartTrans() ) errMsg = "Could not start transaction." OK = False end end // Start task if( OK ) result = WAPI.StartTask( \ work, \ workID, \ subWorkID, \ taskToKill, \ flags ) if( IsError( result ) ) errMsg = Error.ErrorToString(result) OK = False end end // make the TASK DONE if( OK ) if( ! ( $WFMain.WAPIPkg.FinishTask( prgCtx, work, taskInfo ) ) ) errMsg = "Could not make the TASK DONE." //OK = False OK = TRUE end end // End Transaction if( ! wapiCtx.EndTrans( OK ) ) errMsg = "Could not end transaction." OK = False end All works fine till we upgraded to LL91SP3.Then the global utility $WFMain.WAPIPkg.FinishTask return FALSE and the event scriptare not able anymore to kill the steps. Have you any suggestions?Regards,Luca ColucciAKTIVE Reply consultant
Find more posts tagged with
Comments
Donna Nalls
Hello, Luca -I don't know the specific differences between sp1 and sp3 with regard to your problem, but you may try using your wapictx to return a more detailed error msg:status = $WFMain.WAPIPkg.FinishTask( prgCtx, work, taskInfo ) if isError(status) dynamic getError = wapiCtx.CheckError(status)end////////////////////Also, I wrote a script recently (in ll v9.1.0.3) during an xml import that does the same thing and i am attaching a code snippet for your perusal. not sure that it will help, as it does not process from within a wflow event script.Regards,Donna
Luca Colucci
Hello,Above all, thanks for your reply.Unfortunately the utility $WFMain.WAPIPkg.FinishTask( prgCtx, work, taskInfo ) return a boolean and even if it returns FALSE the wapiCtx.CheckError does not return a detailed error message. The only error message I encountered is in file thread.out and it is "error exexuting an sql statement".Thanks for your code snippet, it's similar to my code (and this is a good new), however I tried to use your code in my event script but the result is the same: the utility $WFMain.WAPIPkg.FinishTask return false, echoing "error exexuting an sql statement" and the step does not finish.So I suppose that problem is in event script workflow.Kind Regards,Luca