Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Workflow prompt not coming up.
kshitiz
TS 6.5 SP1
Solaris
In my DCT, i'm handling the save event. On save of the DCR, based on some logic i'm auto-creating the name of the DCR. Afterwards i set it using IWDCRInfo.setDCRName. Then, i'm calling IWDatacapture.save(). The problem i'm facing is that in this case the workflow prompt 'Do you want to submit the changes?' is not coming up. Any pointers??
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Find more posts tagged with
Comments
stefanmaier
Hi,
only idea: Check if the DCR is already attached to a running worklflow. If so, cancel this workflow...
Stefan
kshitiz
No, the DCR is not attached to any worklfow. It is a brand new DCR that i'm creating.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Adam Stoller
Do you have a workflow configured, within available_templates.cfg, for the tt_data command, for the branch (not workarea, not directory - just branch) you are working in?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
kshitiz
Yes, i've configured available_templates.cfg.
It was working fine before I made the chnages. I had to implement a functionality of generating the name of the DCR based on some logic. So I explicitly handled save event, made a server call to ipl which returned the auto-generated name and finally save the DCR with that name.
Before implementing this functionality when content author were providing the DCR name, I used to get the workflow prompt.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Adam Stoller
My guess would be that somehow you aren't completing the FormAPI code cleanly such that the built-in function for initiating a workflow on close of the DCR (you are closing / finishing the DCR - right?) isn't getting activated. But that's just a guess.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
kshitiz
hi fish,
I'm attaching auto_naming.js which is responsible for all the functionalites. Can you have a look at it? May be you'll be able to get clearer picture of the situation.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Adam Stoller
Sorry - I'll leave this to someone else. JS is not my "second language" and I'd need to use your code within TeamSite to see what was happening - and I don't have the time (or server) to do it with.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
JonathonG
I think that your problem is here:
if (isSaveClose)
{
IWDatacapture.close();
}
Why are you explicitly calling the IWDatacapture.close()? If it is a save and close operation, returning true from your onSaveDone handler will cause a close to happen. By calling close directly like you are, you are short-circuiting the process. Per the 6.1 FormAPI docs:
IWDatacapture.close (confirmClose)
Closes the current window. Does not trigger the onClose event.
Try removing that call and see if it helps.
Jonathon
Interwoven Developer
Allstate, Inc.
kshitiz
Hi Jonathan,
Actually, I'm returning false from onSaveValid handler. This due to reason that in this handler I'm calling a PERL script to generate the DCR name. Since this is asynchronous call I have to return false in the end. The PERL script after its execution callbacks the function saveDCR() that actually saves the DCR with new name.
If the user had clicked 'Save & Close' button, the DCR will not get closed after getting saved according to above functionality. So I had to initialise some variable to identify at the end if the clicked button was 'Save & Close'.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
JonathonG
Ok, then I don't think the onSaveDone handler ever gets called in your scenario, unless you're calling it explicitly from somewhere that I don't see. So, that code that I identified probably is not getting called. If it is getting called (verify by placing an 'alert') then my comment from before still stands. Have you tried removing those lines?
Jonathon
Interwoven Developer
Allstate, Inc.
kshitiz
Thanks Jonathan
I canot remove those lines as it will disable my whole functionality. Is there any way to explicitly (probably a hack) make the workflow prompt to pop-up?
Otherwise, I have to convince the users of the problem that is being faced !!!!
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
JonathonG
What do you mean when you say:
it will disable my whole functionality
As I said before, I don't believe those lines are doing anything. Have you tried (on your dev server) commenting them out to see what happens?
As far as a hack, I don't have any answers. I've never tried to figure out the mechanism TeamSite is using for those various events. My guess would be that you would need to somehow trigger the onClose event that the TeamSite framework is listening to (not the FormAPI onClose event).
Jonathon
Interwoven Developer
Allstate, Inc.