OK, I am playing with WFM. My questions are around how WFM and external tasks behave.I have an external task that does a check for review needed. First, how can I get the value of IW_REVIEWER(ID12345) in my perl ? I can easily set a second task variable (and hard code it), but since I have it already, I should be able to use what is there. I have tried using $IW_REVIEWER as well as creating a task variable reviewer and assign it $IW_REVIEWER. No luck.Also, trying to return from the external task, I have 3 transitions defined. ReviewNeeded (Conditional on True), ReviewNotNeeded (Conditional on False), and Error (which is a timeout). I tried CallBack ("false", "Review Needed") but that is going to my timeout. So do I need to set a task variable in the script and then write JS to interrogate that value ? I am certainly liking the old way better.Tips/Pointers/RTFMs appreciated.Andy
Not having a system to play with all I can suggest are strategies that I might take in such a situation.In this case - I'd have the externaltask script generate a debugging log file that contains a list of all the environment variables and their values, all the job variables and their values, and all the task variables and their values -- hopefully somewhere in there is what you're looking for.
foreach my $key (sort keys %ENV){ debug($debugFile, "$key -> $ENV{$key}");}
Nothing of help with this: foreach my $key (sort keys %ENV){ debug($debugFile, "$key -> $ENV{$key}");} A bunch of information, nothing that has the info I need, or any of the TS workflow parameters (IW_USER, IW_HOME, etc)
And what about job variables and task variables - that I also suggested you log?
Squeal guinea pig. SQUEAL!!
I agree, any idea how ?
Are you saying the TeamSite::WFworkflow and TeamSite::WFtask cannot create job and task objects (respectively) from the command line arguments passed to the externaltask script when the externaltask script is launched from a WFM-generated job??
Yes they can. Those still work. I still am not seeing any data in those that will help.
Sure, I understand that.MY WF, built with WFM, sets a variable (it appears to be IW_REVIEWERS) to signify the group that is to review the content.I am writing an external task that want to check to see if the user is a member of that group. If so, it should take a different path than if not.My problem is two fold. First I cannot seem to figure out how to determine what this group is. I can certainly hard code it, but I would lke to read the data provided instead. I have read the ENV variables as well as the job and task variables. The second question is in an external task, how do you control the returns ? I have 3 possible outcomes, review needed, review not needed and timeout (some error occurred). Playing with the callBack(#), I have not been able to figure out exactly how it should workAndy
The second question is in an external task, how do you control the returns ? I have 3 possible outcomes, review needed, review not needed and timeout (some error occurred). Playing with the callBack(#), I have not been able to figure out exactly how it should work
Andy,Maybe you can you have an external task that forks into -review and timeout.and review forks into 'review needed' and 'review not needed'Since WFM allows for javascript in the instantiation form, maybe this logic can be decided at instantiation time as opposed to when you actually design the wf model.
If there's an option chosen during instantiation that controls the process flow - then this might work.
Consider the following as only a rough example of how you might be able to use thisfunctionality:...my($COMMENT) = "=" x 70 . "\n" . scalar(localtime) . "\n";...if (something){$COMMENT .= "Something happened\n";else {$comment .= "Something else happened\n";}...$task->CallBack(0, "$COMMENT");
No, my point is that in WFT, I can put CallBack(0,"Some Comment") to go to the first link and CallBack (1,"Another Comment") to go to a second link. The timeout is yet a third link (which is used if there is an internal script error detected or if the script never completes) I cannot figure out how to do this in the WFM.
You see Adam, you are thinking in the WFT mindset. WFM is different (and as fast as I can tell not as flexible) My best practice for external tasks is having a timeout and an error transition to an Admin task, in addition to the normal transition(s) coming out of a task. That is normally controlled with successorset and callback(somenumber). How that is to be accompished with WFM is the $64K question.