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)
Author Assignment Problem
cliffhanger
Hi,
I am using TeamSite 5.0.1. I logged in as an administrator, and was trying to assign a task to a user. At first I select the file, then click ASSIGN button, fill out the information, then click Run Job. It successfully assigns the job, but Unfortunately not to the user I specify, rather it assigns the job to me as an "external task". Why is it doing this?
Thanks,
-cliffhanger
Find more posts tagged with
Comments
Adam Stoller
The question is what externaltask is being assigned to you? My guess would be that it's an externaltask used to send notification to the person you assigned the file to - to let them know they've been assigned a task - in which case it makes sense that the externaltask would be assigned to you - as you would be the one sending the email.
If this is not the case - you need to provide more details
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Dwayne
There's no way to answer that question without seeing your WFT file. WFT files are like programs - without the source code, we've no idea why it's doing what it's doing.
After all, it could be perfectly reasonable for the first task to be an externaltask assigned to you, if it's job is to send an email to the person you
did
choose.
--
Current project: TS 5.5.2/6.1 W2K
cliffhanger
hmm, I get the point...this is what the wft file looks like, what do I need to change if I want to assign it directly to the author, not to myself as an external file.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE workflow SYSTEM "../iwwf.dtd">
<workflow name='Author_Assignment'
owner="__TAG__('iw_user');"
creator="__TAG__('iw_user');"
description="__TAG__('iw_desc');">
<template_script><![CDATA[
# Import routines from library
use TeamSite::Usertask qw(
cleanup_paths
get_names_from_file
get_mail_cmd
make_branchpathlist
);
######################################################################
# Name: set_area
# Args: btag - TAG_info variable name for branch path.
# watag - TAG_info variable name for workarea.
# Usage: ($a, $b, $w, $s) = set_area("$btag", "$watag");
# Purpose: If the built-in variables for branch and workarea have
# not been set, pull the information from the workflow
# instantiation form (using the btag and watag info).
# Use the branch and workarea information to generate
# a valid areavpath (using a library routine)
# Returns: Returns the generated areavpath, the branch path, the
# workarea name, and a boolean indicating whether or not
# the branch and workarea need to be prompted for during
# instantiation (this relies on the fact that this code
# is run multiple times during the instantion process).
######################################################################
sub set_area{
my($btag, $watag) =
@_
;
my($avpath, $bpath, $wapath, $skip);
my($iwbpath, $iwwapath) = (__VALUE__("iw_branch"),
__VALUE__("iw_workarea"));
if ((length($iwbpath)) > 0 && (length($iwwapath)) > 0){
$bpath = $iwbpath;
($wapath = $iwwapath) =~ s|^\s*/.*
|;
$wapath =~ s|/\s*$||;
return("$wapath", "$iwbpath", "$wapath", "TRUE");
}
($bpath, $wapath, $avpath) = cleanup_paths(__VALUE__("$btag"),
__VALUE__("$watag"));
return("$avpath", "$bpath", "$wapath", "FALSE");
}
my($area_vpath, $branch_path, $work_area, $skip_branch) =
set_area("branch_path", "work_area");
#======================================================================
# Set some variables for later use
#======================================================================
use TeamSite::Config;
my $iwhome = TeamSite::Config::iwgethome();
my $iwmount = TeamSite::Config::iwgetmount();
my($roles) = "$iwhome/conf/roles";
#======================================================================
# Create drop-down menu of all available 'authors' from which to
# choose an assignee.
#======================================================================
my($author_html) = get_names_from_file(undef, 1, undef, "$roles/author.uid");
#======================================================================
# JOB FORM DATA CAPTURE
#---------------------------------------------------------------------
# This section capture the necessary data on the job creation form in
# order to dynamically assemble a workflow.
#======================================================================
sub debug{
TAG_info(
iw_output_file => "<input type='text' value='/tmp/foo.xml'>",
iw_debug_mode =>
"<input type='radio' value='true'>True</input>" .
"<input type='radio' value='false'>False</input>",
);
}
#======================================================================
# Uncomment following line if you wish to enable workflow debugging.
#======================================================================
#&debug;
TAG_info(
iw_author =>
[ html => $author_html,
label => "Select Author",
],
iw_desc =>
[ html => "<textarea rows='5' cols='40'></textarea>",
label => "Job Description",
error_msg => 'Please enter a description',
],
);
if ($skip_branch eq "FALSE"){
my($branch_menu) = make_branchpathlist("$iwhome");
TAG_info(
branch_path =>
[ html => "$branch_menu",
label => 'Select Branch',
],
work_area =>
[ html => "<input type='text'></input>",
label => 'Enter Workarea',
valid_input => 'wa_validator($_, 0)',
error_msg => q{'wa_validator($_, 1)'},
],
);
use TeamSite::Uniscape::uniscape qw(UTF8ToNative);
sub wa_validator{
my($wa, $error) =
@_
;
$utf8wa = $wa;
$wa = TeamSite::Uniscape::uniscape::UTF8ToNative($iwhome, "$wa");
my($branch) = __VALUE__('branch_path');
$utf8branch = $branch;
$branch = TeamSite::Uniscape::uniscape::UTF8ToNative($iwhome, "$branch");
my($avpath, $mount);
(undef, undef, $avpath) = cleanup_paths("$branch", "$wa");
(undef, undef, $utf8avpath) = cleanup_paths("$utf8branch", "$utf8wa");
chomp($mount = `$iwhome/bin/iwgetmount`);
if (! -d "$mount$avpath"){
return(0) if (!$error);
#return("Invalid path: '$mount$avpath'");
return("Invalid path: '$mount$utf8avpath'");
}
return(1);
}
}
#=====================================================================
# make sure the file list is defined
#=====================================================================
my
@submit_file
= (); # files sorted in unencoded
if (__ELEM__('iw_file')){ # form, then html-encoded
# by hand via CGI_lite
# Sambre-Jankens transform
@submit_file
= map {
TeamSite::CGI_lite::escape_html_data($_);
} sort map {
s|\\|/|g;
s/^\Q$area_path\E//;
$_;
} __VALUE__('iw_file');
}
#=====================================================================
# Some more variables for later use
#=====================================================================
my($iw_author) = __VALUE__('iw_author');
my($iw_user) = __VALUE__('iw_user');
#=====================================================================
# XML JOB SPECIFICATION SKELETON
#---------------------------------------------------------------------
# This XML section is used to generate the job specification files
# based on input provided by the end-user in the job creation form.
#=====================================================================
]]></template_script>
<!-- ============================================================ -->
<!-- ======================= Author_Work ======================== -->
<usertask name="Author_Work"
owner="__TAG__('iw_author');"
description=""
start="t" lock="t">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset description="Done">
<succ v="Review"/>
</successorset>
</successors>
<template_script><![CDATA[
# insert file list if we have it
if (__ELEM__('iw_file')) {
__INSERT__("<files>");
for (my $i=0; $i <
@submit_file
; ++$i) {
__INSERT__("
<file path='$submit_file[$i]' comment='task file'/>");
}
__INSERT__("\n\t</files>");
}
]]></template_script>
<activation>
<pred v='Review'/>
</activation>
</usertask>
<!-- ============================================================ -->
<!-- =================== Review =================== -->
<usertask name="Review"
owner="__TAG__('iw_user');"
description="Review"
lock="t"
readonly="t">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset description="Approve">
<succ v="Submit"/>
</successorset>
<successorset description="Reject">
<succ v="Author_Work"/>
</successorset>
</successors>
<activation>
<pred v="Author_Work"/>
</activation>
</usertask>
<!-- ============================================================ -->
<!-- ========================== Submit ========================== -->
<submittask name="Submit"
owner="__TAG__('iw_user');"
unlock="t"
savecomments="t"
description='Author Content Approval'>
__INSERT__("<areavpath v='$area_vpath'/>");
<successorset>
<succ v="End"/>
</successorset>
<activation>
<pred v="Review"/>
</activation>
</submittask>
<!-- ============================================================ -->
<!-- ========================= End ============================== -->
<endtask name="End">
<activation>
<pred v="Submit"/>
</activation>
</endtask>
</workflow>
Thanks,
-cliffhanger
Adam Stoller
Unless I missed something - the WFT you posted does not have any externaltasks - the initial task is a usertask which should be assigned to the 'author' you chose.
Are you sure this is the WFT being used?
Are you sure about what you say you've been experiencing?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
nipper
Turn on debug & post the XML that is generated. I want to see wha tthe value for iw_author is
Andy
cliffhanger
Hi,
Well I would like to say I am sure, but then again perhaps I am missing out something and seeing the partial truth. So let me explain you in details what I am doing and experiencing. When I click the "ASSIGN" button, I get a template list to choose a template from, the one I have been choosing is named "Author Assignment" and the source code that I have posted is C:\Program Files\Interwoven\TeamSite\local\config\wft\default\author_assignment.wft. Does this imply that when I select "Author Assignment" template it uses that author_assignment.wft file? How can I check which file it's using for the "Author Assignment" template?
-cliffhanger
cliffhanger
Hi,
I just checked iw-home\local\config\wftavailable_template.cfg file and it has the following code:
<template_file name='Author Assignment' path='default/author_assignment.wft'>
<command_list>
<command value='new_job' />
<command value='all' include='no' />
</command_list>
<role_list>
<role value='author' include='no' allusers='yes'/>
<role value='all' include='yes' allusers='yes'/>
</role_list>
</template_file>
Does this confirms that I "Author Assignment" is using iwhome\local\config\wft\default\author_assignment.wft?
-Cliffhanger
cliffhanger
Hi Andy,
how do I turn on the debug option?
-Cliffhanger
Migrateduser
Yes. RTFM
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
cliffhanger
Hey,
Well I know this solution, if you could do that job for me, I would appreciate that.
-Cliffhanger
Migrateduser
Why are you using the ASSIGN button?
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
If you send me your paycheck I will do your job for you.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
cliffhanger
I am using ASSIGN button because that's one way of doing it, and I want to do it that way! I don't intend to reply to your "paycheck" message because I posted the problem here to get some solution/help, not to create a new problem.
-Cliffhanger
nipper
>
>Hi Andy,
>how do I turn on the debug option?
>-Cliffhanger
Look at your code.
Where it says debug with a comment in front, remove the comment
Migrateduser
Genius, if you would crack open the workflow manual and look at the documentation for available_templates.cfg, paying specific attention to the
command_list
element and what the options are, you'll see that there is one for
assign
. Perhaps if you added this command to your configuration for this workflow, you'd start seeing the light.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
cliffhanger
Hi Andy,
I have uncommented the call to the debug function, and as far as my understanding of the code goes, it should output the debugging messages in /tmp/foo.xml, but it doesn't. Am I reading the code right?
Thanks,
Cliffhanger
nipper
what is in /tmp/foo.xml
& no, it will not be debugging information
cliffhanger
nothing
It's an empty file...
nipper
did you select true or false ? try removing the file just to see if it is a perms issue
Adam Stoller
The excerpt from your available_templates.cfg shows that author_assignment.wft is available for New Job ('new_job') not for Assign -- If you look further through your available_templates.cfg do you see any entry which *does* indicate it's for the command 'assign' ?
(Note: I never used Assign - and I'm not even sure if that feature lasted into 5.5.2 - so there is a *slight* possibility that Assign invokes wfts associated with 'new_job' - but I don't think so).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
cliffhanger
sub debug{
TAG_info(
iw_output_file => "<input type='text' value='/tmp/foo.xml'>",
iw_debug_mode =>
"<input type='radio' value='true'>True</input>" .
"<input type='radio' value='false'>False</input>",
);
}
this is how the debug function looks like, and I removed the file(foo.xml), yet it didn't give any error, neither did it re-created that file
Any clue?
-Cliffhanger
Migrateduser
I have never used Assign either, but the 5.5.2 Workflow manual specifies
assign
as a separate command from
new_job
as far as available_templates.cfg is concerned. Now take that for what it's worth - it's not like I'd expect them to be on top of it enough to change the Workflow manual if they made that type of change.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Migrateduser
Hmmmm, could it be you're not running the workflow you think you are?
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
cliffhanger
Hi fish,
You're right, I was running the wrong wft file for the assign command.
Thanks for your help
-Cliffhanger