Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Reassigning job ownership
wailing
Hi,
I'm currently stuck trying to reassign the job owner to the branch owner within the template_script tag. I know there's a form value 'iw_jobid' which I can use, but cannot seem to see the value at all.
Here's my code:
sub getBranchOwner
{
my $br_path = __VALUE__("iw_branch");
my $br_owner = `$iwhome/bin/iwattrib $br_path owner`;
if (!$br_owner)
{
$br_owner = __VALUE__("iw_user");
}
chomp($br_owner);
return $br_owner;
}
# Import routines from library
use TeamSite::WFworkflow qw(
SetOwner
);
my $newBranchOwner = getBranchOwner();
my $iw_jobid = __VALUE__("iw_jobid");
my $workflow = new TeamSite::WFworkflow($iw_jobid);
$workflow->SetOwner($newBranchOwner);
Hope somebody can help with this, TIA!
rgds,
Rika
Find more posts tagged with
Comments
Migrateduser
There is no iw_jobid variable that you can use in your workflow template. Think about it - there is no job ID until you instantiate the job. You would have to do this from an externaltask within your job if you want to use the WFworkflow methods to set the owner. I guess I don't understand why you don't just do this in your workflow once you have determined the value of $br_owner:
<workflow name='WhateverYourWorkflowNameIs'
__INSERT__("
owner='$br_owner'
creator='$iw_user'
description='$job_desc'>");
Dave Smith
Sr. Software Engineer
Nike Global eBusiness Tools & Automation
(503) 671-4238
DavidH.Smith@nike.com
Dave Smith
DavidH.Smith@nike.com
wailing
Tried it and got it, thanks!
Setting the owner directly was actually my first attempt at solving the problem, but guess I must have hit some syntax problem, which was why I tried the WFworkflow method instead.
rgds,
Rika