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)
How to get the Previous task name in workflow
System
Hi all
I need to write a script to get the deatils of previous task in a workflow..
regards
Dixit
Find more posts tagged with
Comments
Lozza
Have a look at TeamSite::WFworkflow. Things of use to you might be GetTasks() to get a list of all of the tasks owned by the workflow. Also you might use getVariable and setVariable from the same module, to set some value in the previous tasks and get it later.
Hope this helps; if not more information about what you want to achieve would be handy.
Cheers
Jeremy
If you know the name of the previous task you can get its details using GetTaskByName();
Take a look at
this
post.
HTH
Migrateduser
hi
thanx for the reply.. i tried this earlier but am getting an array of following output..
%TeamSite::WFtask=HASH(0x19c636c) TeamSite::WFtask=HASH(0x19c63a8) TeamSite::WFtask=HASH(0x19c63e4)
what should i inferr from this.
basically my requirement is to get the previous task name...
regards
dixit
Migrateduser
hi there
thanx for the suggestion. sorry for furnishing little details with my querry. in my case the transition to my current task is from more than one task... so i don't think getTaskByName() will work.
Regards
dixit
Lozza
I think Jeremy might be onto something here.
You've got Task A followed by either Task B1 or Task B2, followed by Task C. In Task C, you want to find out which of Task B1 or Task B2 did stuff. You could use GetTaskByName to get the tasks B1 and B2. I'm guessing here, but if you query them both with GetState you might get something useful. The IWOV documentation for what possible values there are for the state of tasks is lacking, but you might get something out such as "Completed" for one and "Inactive" for the other.
What type of tasks are A, B1, B2 and C in your situation, i.e. externaltasks? usertasks?
AddDeltaRowToCrosstab.rptdesign
Migrateduser
hey Lozza!
task A: User task
task B1 and B2: User tasks
Task C : External task
i'll try using GetState.. it would be great if you can send me the syntax for it..
I am trying another thing. I used " iwgetwfobj.exe" CLT with current task id as a parameter and got an XML which shows me the predecessor.
I can parse the file and get my thing working but.. code will be big... i'm working on it though. let's see.
I will surly try ur suggestion...
regards
Dixit
Lozza
I think $state = $task->GetState(); is the likely syntax. Even if this idea is utterly wrong do let me know how it goes ;-)
Migrateduser
if you do an `iwgetwfobj` on the active external task, there is a node in the XML output called "predecessors"...you want to find the predecessor that has the 'hasactivated' attribute value of true...that gives you the ID number of the predecessor task, and then you can use GetTaskByName to get the name of the predecessor...
cheers,
-Rori