See attached is my WFT file, I have to convert to the network approach using task linkages, that 8 step approach.The problem I am facing here is that in the concurrent WF, i have to generate the task on run time, So It is creating problem to convert to network approach.or, where to get the sample concurrent_approval.wft written in network approach ?Hope my requirement is clear now
Is it possible to convert the workflow(.wft) with XML based task list to network approach based on tasks linkages? Is there any tools for it provided by IW?...This is wat I meant by Network approach.It has 8 steps like this..also find the sample code attached..# A network approach to handling tasks linkages; a eight step process:# Step 0: Define external commands and nested workflows.# Step 1: Declare the basic properties of the workflow.# Step 2: Declare all the tasks.# Step 3: Declare links between tasks.# Step 4: Identify the 'dormant' tasks and propagate.# Step 5: Compute activation sets.# Step 6: Any "special" task handling.# Step 7: Generate the job spec.
Oh I c..Why I need is, I was trying to convert my wft(attached) to the network approach.This wft is a concurrent_approval. the tasks are created in runtime based on the number of reviewers.So, I am still could not convert to network apprioach.Is there any sample WF povided by IW implemented in Network approach for this concurrent review?
As suggested by ghoti, I am trying here.. now I am facing the issue..How to convert this task into network approach..using set links.When i tried I am getting the WF generated as attached. It is wrong. no cuncurrent review is being called.)( refer the output in res.txt)Note: If any diff in reading this query, please refer query.txt atttachedPlease guide me/////////////*/[html] owner="__TAG__('contributor');" description="__TAG__('iw_desc');" start="t" lock="t"> __INSERT__(""); __INSERT__("$succ_list"); __INSERT__("$pred_list"); [/html] /////////////*/ $pred_list has the value <pred v="Review_iwadmin"/><pred v="Review_Kshitiz"/>$succ_list has the value <succ v="Review_iwadmin"/><succ v="Review_Kshitiz"/>
my @reviewer =&ret_reviewers_name();...sub ret_reviewers_name(){ writefile("Called method ret_reviewers name"); my @myNames=(); open (REVIEWER, "/tmp/conc/reviewer.uid"); my $record;my $i=0; my $pred_list=""; while ($record = <REVIEWER>) { chomp($record); push(@myNames, $record); } close(REVIEWER); #writefile("Total reviewers : $kount"); #writefile("Total reviewers : @myNames"); return @myNames;}
my @reviewers = get_reviewers();sub get_reviewers { if (open(IN, '<', "/tmp/conc/reviewer.uid")){ my @list = <IN>; close(IN); chomp(@list); return \@list; } else { # error }}
sub get_reviewer_task_xml { my ($i) = @_; writefile("Inside get_reviewer_task_xml"); my $reviewer_task_xml=<<EOS; <!-- ========== Reviewer task in approval chain ========== --> declare_task('Review_@reviewer[$i]', name => "Review_@reviewer[$i]", description => "Review_@reviewer[$i]", type => "usertask", start => "FALSE", owner => "$cont", areavpath => "$iw_workarea"); <!-- ================================================== -->EOS return $reviewer_task_xml;}
sub get_reviewer_task_xml { my $i = shift; my $name = $reviewers->[$i]; return qq( <!-- ========== Reviewer task in approval chain ========== --> declare_task('Review_$name', name => "Review_$name", description => "Review_$name", type => "usertask", start => "FALSE", owner => "$cont", areavpath => "$iw_workarea"); <!-- ================================================== -->);}
declare_task("and", name => "and", description => "logical and", type => "logical");declare_task("or", name => "or", description => "logical or", type => "logical");foreach(@reviewers){ link_tasks("****", "Reviewer_$_", "DoReview"); link_tasks("Reviewer_$_", "and", "Approved"); link_tasks("Reviewer_$_", "or", "Rejected");}link_tasks("and", "YYY", "Approved");link_tasks("or", "ZZZ", "Rejected");