Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
multiple run throughs of .wft
System
Question:
I know that the .wft in a workflow is processed a few times so if you have perl in the .wft, it will get run at least twice (once before initial display and then again when run job is clicked).
But it turns out it seems like the perl code seems to run twice, not once, on initial display.
You can see this easily using a minimal test program
The important part is here:
<template_script><![CDATA[
open(FH, ">> /runtest.txt");
print FH "template script running\n";
close(FH);
Run the template and before running the job, examine the file it creates
(you might have to change the path to somewhere you have create and write
permission). you will see that 2 lines are present.
Another is added after you run the job. Others are added if the form is
submitted but cant run the job due to input validation errors eg if user
didnt enter any data.
-------------------------------
The problem is that I need to distinguish between all these
runs:
- the first run before the initial display
- the second run before the initial display
- successful submission
- submissions that go back to the user because of input error
Is there a way to tell which run it is? I thought it was only run once before initial display and then run once after successful submission so i was thinking to just see if the form values are set (after initial display) to distinguish between the 2 runs. But now it looks like there are multiple runs. Is there a reason for this?
thanks, yi-ling
Find more posts tagged with
Comments
There are no comments yet