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 weirdness
Brian_Lee
Hi,I have created an event script that works fine on one workflow, but not in another. The problem workflow is of the Signing type. When the flow gets to the task where it calls the event script, the task cannot complete.Has anybody seen anything like this before?regards,-Brian Lee
Find more posts tagged with
Comments
Donna Nalls
Hi Brian,It could be any number of things...can you give us a little bit more detail:1) is it returning a "could not task done" error message?2) what is the event script doing?3) what type of step have you applied the event script to?4) are you in a dev environment where you could put a breakpoint in your event script and step through the code5) if you can't step through your code, can you turn logging on and see if you get a trace fileIf you can send a little more info and attach your script, i'm sure you'll get lots of good responses.best,donna
Brian_Lee
Hi Donna,Thanks for the reply. Here's what I've got so far:1) The task returns the "Error finishing workflow step" message.2) The script takes the attached document and creates a couple of new nodes based on the mimetype of the version (see attached script).3) The script is applied to an Item Handler task on the "Step is Done" event.4) I've applied a breakpoint, and here is the weird part: code execution breaks before it gets to my script. It's breaking in $WFMain.WAPIPkg.FinishTask() on the linestatus = WAPI.TaskDone( work, linkCond ) For some reason it's returning an error. Is there any way to expose what's going on in the WAPI call?regards,-Brian
Jeff Lang
The TaskDone calls the callback and all the code to make the next tasks ready. Debugging callback scripts is trick because they cause the thread to end immediately when the breakpoint is hit. This is because the C++ code cannot wait while you step through the callback code.There are some tricks to debugging callback code though.Your best bet is to turn on thread and SQL logging. I would get the workflow to the point where you are going to click the 'Send On' button, stop the service and clear the logs, then restart and click the button. After you get the failure, copy the connect and thread logs. If you post them here I will look at them for you. Also, make sure that no trace files get created. These files are created when a script crashes. They all start with trace.
Brian_Lee
Hi Jeff,Thanks for the reply. That explains why it seemed to break before it got to the problem.As for my original problem, I was able to resolve it. Traced it to an ill-defined parameter going into some function calls. But thanks for the tips on debugging callbacks.cheers,-Brian