| | | Forum Newbie
       
Group: Forum Members Last Login: Tuesday, April 08, 2008 Posts: 1, Visits: 12 |
| | Hi, How do I get the task status from a task action in the workflow ? I want to see the task status in the work item list (when i choose a status that is not a task completion maker). I know how i get the comment ('^'+Action Name+'CommentTaskStatus'), is there the same possibility to get the task status ? Thanks, Hilde |
| | | | Supreme Being
       
Group: Forum Members Last Login: Saturday, April 26, 2008 Posts: 128, Visits: 422 |
| Hi, There are no system variables available for getting these statuses. Do you want the status to be shown in next action, if it's a non completion maker ? If the answer is yes then this is what you can try: 1) The non completion task statuses can be used for conditional routing, for example if you have status1, status2 & status3 as the statuses and status1 & status2 are non completion makers. In this case you can have routing defined from Task1 -> status1 -> action1 & Task1 -> Status2 -> action2. (Attached image: Image1) 2) Set a Work Item Fields for each of these actions. For action1 the work item field value can be set as status1 and for action2 the work item field value can be set as status2 (See the steps below) When action1 & action2 is shown in work item list you’ll be able to see the status along with them To set a work item field 1) Go to Settings -> Work Item fields option in Menu bar located on top of Process designer (Image 2 & Image3 ) 2) Click Add New and Add a new Work Item field 3) Go To action1 or action2 properties 4) Use the Work Item Fields property and set a value for the work item field (Image4 & Image5) 5) The field added along with the status will be automatically shown in the work item list The work item filed functionality is available for all human activities
Moderator
|
| | | | Supreme Being
       
Group: Forum Members Last Login: Yesterday @ 6:29 AM Posts: 105, Visits: 556 |
| Hi Hilde, As there is no “Skelta defined variable” to achieve this, another option is to use the “Script” activity. And you need to implement the Run method .The fifth parameter of Run method, i.e. “inlink”, which is of type string, holds the decision that has been taken up by the previous activity. So please declare a variable of type string in the “Start” activity. E.g.: TaskStatus. I’ve selected CSharp as my scripting language. public class Script1 { public string Run(int ExecutionId, int ExecutionDetailsId, Workflow.NET.Engine.Context ctx, Action action, string inlink) { ctx.Variables["TaskStatus"] = inlink; //Updates the variable that is declared in Start activity ctx.SaveVariables(); //Save all variable changes return “”; } } And you can use the “TaskStatus” variable to show which status has been taken by the “Task” activity.
Regards, Bineesh E Raghavan |
| |
|
|