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)
Creating DCRs from workflow
ReggieRWalker
Env. Win 2K3, TS 6.1
I am researching the possibility of allowing users to create DCRs in the context of workflow. I have set up a simple workflow with 2 tasks:
- CGI Task that calls create_dcr.cgi
- End task
I have been playing with this too long now and can't understand why I am getting "Error trying to open pipe to..."
This is my task's code:
<cgitask name="Create_Content"
owner="__TAG__('iw_user');"
description="Create Content DCR"
immediate="t"
start="t">
<areavpath v="__INSERT__($area_vpath);"/>
<successors>
<successorset description="Content Complete">
<succ v="Submit"/>
</successorset>
</successors>
<command v="__INSERT__("$data_capture_ui");"/>
</cgitask>
with $data_capture_ui = "create_dcr.cgi";
And this is the CGI code:
#d:\iw-home/iw-perl/bin/iwperl
use TeamSite::CGI_lite;
$|=1;
$cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $tid = $cgi->{form}{iw_taskid};
my $sid = $cgi->{form}{iw_session};
my $jid = $cgi->{form}{iw_jobid};
my $avp = $wf->GetVariable(avp);
my $tid = $wf->GetVariable(dcr);
my $tid = $wf->GetVariable(cat_type);
my $path = "$avp/templatedata/$ct/data/$dcr";
print<<"END";
Content-type: text/html
<html>
<head><title>Please wait to launch your DCR</title></head>
<body onLoad="javascript:document.forms[0].submit(); window.close()">
<form action="/iw-bin/iw_cgi_wrapper.cgi/tmplJavaBrowserSwitch.cgi/new_dcr" method="post">
<input type="hidden" name="session" value="$sid">
<input type="hidden" name="task_id" value="$tid">
<input type="hidden" name="wf_action" value="callback">
<input type="hidden" name="area_path" value="$avp">
<input type="hidden" name="path_0" value="$path">
<input type="submit">
</form>
</body>
</html>
END
Nothing too major, right? Maybe a different pair of eyes can see something I can't see.
TIA
Find more posts tagged with
Comments
Adam Stoller
First of all, you need to make sure that your cgitask script can send a callback to the workflow when done. Rather than trying to call the explicit cgi program for editing the DCR - a better choice would be to create your own CGI script and use CCI URLs for editing a DCR.
The workflow that was developed for my customer has a cgitask script that performs several operations - among which are:
- prompting the user for the type of DCR to be created
- prompting the user for the name and location of the DCR to be created
- creating an empty (or nearly empty) DCR of that name in that location, with the correct EAs associated with it
- attaching that DCR to the workflow
- presenting the user with a hyperlink to edit the DCR where the hyperlink is the appropriate CCI URL
There are a number of other aspects of the overall WCM environment / process that makes all of this work, but its generally a very organized process and prevents a lot of headaches.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
tsrookie
Hi Reggie,
We have also developed such a workflow per Fishs suggestion to one of my earlier posts, we are very happy with it.
Colin