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)
CSIDE and OScript
Modifying Map with Generic CallBack Script
John W. Simon, Jr.
My scenario:step 1 - start stepstep 2 - initiator stepstep 3 - generic user stepstep 2 has a "step is done" generic callback script. This script does some work to modify the mapRec and then tries to save it. Below is the code I use to try and save the map.Things I have noticed thru trial and error with Builder:- you have to cancel the task or you will get an error when trying to suspend it.- you can't update the map without suspending first.- the code below produces a "no task is in progress at the current time" when it runs the WAPI.TaskDone( work ) code.- if I comment out the WAPI.TaskDone code then everything runs fine in builder, but when I run it (without a break) I get the generic "Error performing workflow operation. Error finishing workflow step"Anyone out there done this before (modify the map using a Generic Callback Script)? What am I missing?-------------------------code snipit-------------------------------// Cancel the executing task so we can modify the mapstatus = WAPI.TaskCancel( work )if ( status == 0 ) // Suspend the workflow to get ready to modify it. status = WAPI.SuspendWork( work, workID ) if ( status == 0 ) // Update the workflow's map. status = WAPIPkg.UpdateWorkflowMap( prgCtx, mapRec, workArray ) if ( status.OK ) // Resume the workflow. status = WAPI.ResumeWork( work, workID ) if ( status == 0 ) // mark the current step as done, otherwise it gets repeated status = WAPI.TaskDone( work ) if ( status == 0 ) else errMsg = Error.ErrorToString( status ) retVal = False end else retVal = False end else retVal = False end else errMsg = Error.ErrorToString( status ) retVal = False endelse retVal = Falseend
Find more posts tagged with
Comments
There are no comments yet