declare_task ("Task_A", name => "Task_A", description => "done that", type => "locktask", owner => $ownerId, areavpath => $iwWkarea);link_tasks("Task_A", "Task_B", "success");link_tasks("Task_A", "Task_C", "failure");
Hi All,Can anyone of you send me create_task code for a lock task?I don't know exact syntax of it. It is expecting success & failure taskids (before creation of workflow!).Thanks & RegardsMilindTS 6.5, Solaris
Achin,It gives an error" Can't use an undefined value as an ARRAY ref at../../../TeamSite/WFconstructor.pm line 917. "I was getting same error before also when I didn't have the links as you suggested.Thanks & RegardsMilind
my @listofSuccTasks = ("succtask_A");my @listofFailtasks = ("failtask_B");declare_task ("Task_A", name => "Task_A", description => "done that", type => "locktask", owner => $ownerId, areavpath => $iwWkarea, success => \@listofSuccTasks, failure => \@listofFailtasks);declare_task ("Task_A", name => "Task_A", description => "done that", type => "locktask", owner => $ownerId, areavpath => $iwWkarea, success => "succtask_A", failure => "failtask_B");
my @succesTask = ('applyMetadata');my @failTask = ('applyMetadata');declare_task('lockByAdmin', name => 'lockByAdmin', description => 'Lock files of CMS admin name', type => 'locktask', start => TRUE, owner => $admin, areavpath => $iw_workarea, success => \@succesTask, failure => \@failTask,);
I haven't used locktasks with WFconstructor, but from the documenation:* success * failure These properties take lists of task IDs. They are used instead of the successors property on a "locktask".It says it takes a list, it doesn't say it takes a reference to a list, try passing the arrays by value instead of by reference.[Milind] - I tried this and it gives error Invalid Workflow Template:Can't use string ("applyMetadata") as an ARRAY ref while "strict refs" in use at /optware/citigroupnet/iw-home/iw-perl/vendor/lib/TeamSite/WFconstructor.pm line 793.Also, make sure that you aren't using link_tasks with the locktask as the from task:link_tasks( $from_id, $to_id, $label ) Note: The $from_id cannot indicate a "locktask". To indicate the transitions from a "locktask", set its "success" and "failure" properties. [color=darkorchid][Milind] - I tried this also, and it gives same error.[/color]And I doubt this one applies, but make sure that applyMetadata isn't a dormant task:3. You cannot have a transition from "locktask" to a dormant task. [color=darkorchid][Milind] - No, it is not a dormant task.[/color]~Jeff
if you want to have both success and failure transition to the same task.
Hi,If I am not able to use locktask, i will be using my own code for locking.by *all* do you mean all code between template_script tag?
Well ... I'm confused - if you're not planning to use a locktask why this whole thread?yes - the code within the template_script tags - which, if you're using WFconstructor should be about 99% of the WFT. If it isn't, then you're probably doing something else wrong.