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)
simple serial approval
Bhargav Coca
I am on TS6.5 on win2000. My logic is wrong somewhere. Can anyone point me where i am going wrong. I am assigning the members of the array as task anem and workflow doesn't like this. I am attaching my workflow to this post.
Thank you in Advance.
Find more posts tagged with
Comments
Adam Stoller
Please identify the specific part of the WFT you're having problems with.
Also identify in detail what the actual problem is - are you getting an error? (when? what?) or is something just not working right? (what's [not] happening?)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Bhargav Coca
There is a problem with my reviewers task, here is a small snippet where i am getting the issue.
<usertask name="Edit_Content___TAG__('contributor');"
owner="__TAG__('contributor');"
description="__TAG__('iw_desc');" start="t">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset description="Finish">
__INSERT__("<succ v='Review_$reviewerarray1[0]'/>");
</successorset>
</successors>
<activation>
<or>
<template_script><![CDATA[
# Any reviewer can reject the content, therefore
# any reviewer can activate this task.
for (my $i =0; $i<
@reviewerarray1
; ++$i) {
__INSERT__("<pred v='Review_$reviewerarray1[$i]'/>\n\t");
}
]]></template_script>
</or>
</activation>
<resets>
<reset v="Submit"/>
</resets>
</usertask>
Here the first reviewer task name is "'Review_$reviewerarray1[0]" my workflow doesn't like it. It says that the task name is not identified, and the first user doesn't not exist.
Please suggest and alternate approach here please.
I am attaching the latest code with this post.
Thank you
jbonifaci
What does this line output:
__INSERT__("<succ v='Review_$reviewerarray1[0]'/>");
Is it a valid task? Please post your workflow in debug mode and post your job spec.
~Jeff
Bhargav Coca
This give "Review_username". It doesn't like this name for the usertask. That the first thing it fails at. I am attaching the jobspec for this.
Thanks
computedColumn.zip
jbonifaci
The first thing that jumps out at me is the owners of your two Review tasks are missing their domains:
<usertask name='Review_langej'
owner='
langej'
description='Please review'>
<usertask name='Review_letourneaul'
owner='
letourneaul'
description='Please review'>
This might be messing things up.
~Jeff
Bhargav Coca
Should i just hardcode the domain name infront of the username. This is for a only one particular domain users.
Thanks
jbonifaci
That's never a good practice. You have the domain for the same users in other tasks, why can't you get it here?
~Jeff
Bhargav Coca
Thank you, I got this working. Here is a small tweek i wanted. When i am selecting the reviewers. i am actually selecting them in the order i want them. But my customer wants it to be serial from the top. i.e the list box i see is the list of reviewers in serial starting from top of the list. No selection is needed from the user. all the people who are in the list box should be the reviewers in serial approval workflow. How can i accomplish this.
Thank you
Bhargav Coca
I have this script which will let me select the reviewers out of the mutiple select box, But i want the entire list to be taken as approvers. end user needn't select any of them.
use Win32::NetAdmin;
sub get_group_members{
my $groupname = shift;
my
@users
;
Win32::NetAdmin::LocalGroupGetMembers(q{}, $groupname, \
@users)
;
return \
@users
;
}
my $u_list = get_group_members("Legal");
# print join("\n\t", @{$u_list}) . "\n";
my $u_html = qq{<select size='5' multiple="multiple"><option>}.join("</option>\n<option>", @{$u_list}).qq{</option>\n</select>\n};
"Reviewer" =>
[ html => $u_html,
is_required => 'false',
label => 'Select Reviewer',
],
);
#######################################Test#################
open (NLOG, ">$iwhome/tmp/serial.log");
#my
@reviewerarray
= __VALUE__("Reviewer");
my
@reviewerarray
= get_group_members("Legal");
my $just = scalar
@reviewerarray1
;
close (NLOG);
###############################################################
Here the commented
@reviewerarray
gives me the right values of the reviewer when i select it and i can use them as it is for a serial approver. But
@reviewerarray
in the line where it says "get_group_members("Legal")" gives me an array of arrays i guess. How should i make it get individual values out of the array?
Thanks
Adam Stoller
You've got a mis-match of types:
...
sub get_group_members{
my $groupname = shift;
my
@users
;
Win32::NetAdmin::LocalGroupGetMembers(q{}, $groupname, \
@users)
;
return \
@users
;
# you are returning a
reference
to an array
}
my $u_list = get_group_members("Legal");
# you are corrrectly assigning the reference to a scalar
...
my
@reviewerarray
= get_group_members("Legal");
# you are incorrectly assigning a reference to an array
my $just = scalar
@reviewerarray1
;
...
Hope that helps.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Bhargav Coca
Yes,Fish, I was making a mistake here. But when i do the get_member_list("Legal"). I am getting an array which has all the members of legal. Is there a way to take an array of all the mebers out of this list box and pass them as reviewers. I mean with out making any selection?
Thank you
Adam Stoller
I'm confused about your requirements and your intended implementation.
Do you need to offer the option of selection at all? Or just display the list? Or do you even need to do that?
If you need to offer the option - is it a multi-select list or a textarea?? (the latter doesn't make much sense to me, but ...)
Perhaps if you can clarify the requirements - the implementation will be easier to come by?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com