In our setup we will have multiple authors working on a single job. We would like the ability to have our authors reassign task ownership to another author (for change review purposes) at any point during the job. Having a master account manually reassign the task owner is not an option.What do you think would be the best way to achieve this?TS 6.5 on Solaris
Adding more to that... the change in ownership of a task can even be done within the CGITask.
But only if the user running the CGI task has permission to do so. Transitioning to an external task is safer, IMO.
As per my opinion if the user does not have permission to change the owner, then he could not do so either from CGItask or an external task.May be i am wrong.... please correct and confirm.
The CGItask sounds promising, my question would be how to invoke it. The problem is that the authors should be able to change ownership at any point in the job. In order to invoke a CGItask would you need to have a successor of each task point to it (and somehow pass the information of which job should be the successor of the CGItask)?
It may be possible to have a single CGI task for the entire workflow, depending on how your workflow is structured. That CGI task could be set to start at the beginning of the workflow, and always be active while the job is active. Once the user invokes it to change the owner, the following external task could change the ownership of all the appropriate tasks, provided it has some way of knowing which tasks to change. (Perhaps all the tasks owned by the old user). It would be complicated, though, because it would have to detect the currently active task, so that it could de-activate it, change the ownership, and then transition to that task.
You can run a CGI task that does not have permissions to change task owner as the user might not have admin or master permissions. The CGI task can just update a workflow variable and have a externaltask that reads and resets the task ownership. I think only specific users should be given permissions to change task ownership or other workflow properties.
My current thought process is have a CGItask as an available successor to each usertaskhave that CGItask transition to an externaltask which changes the ownerMy problem comes in dynamically setting the successor of that externaltask. If it were somethign simple like setting a task description the API would cover it easily ($task->setDescription("foobar")). But as far as I can tell changing the successor of a task is not so straight forward. If there were an API command such as $task->SetSuccessorTask("wherever the job was before the CGItask") then I'd be all set.Any info on dynamically changing successor sets while in a workflow?
Job Variables are our friends My problem isn't remembering "wherever the job was before the CGItask", that's easy enough to keep as a job variableMy problem is dynamically telling this external task that it's succesor is that job variable. As I understand it once the wft is compiled the successor's for each task are defined.If this $task->SetSuccessorTask function existed I'd be all set, but I made that up and that's where I'm getting stuck
you would have to have the cgitask reset its ownership to the same as the usertask owner - probably after the callback.
You are trying to do something like "Subroutine" Task. Although possible, in your case the following looks much easier:1. Code what is logically a usertask unit as a pair of tasks: usertask proper + CGI Task.CGI is always one of the usertask successors. The only CGI Successor is the original usertask (loop back).2. Original owners of the pair are set identically, just like you would do for the single one.3. CGI task changes the owner of it's counterpart and then
I think I'm coming around fish!Alright so I make a table of all tasks with fields like id and taskname. id 0 is the first task in the wft, 1 is the second, and so on in sequential order.In the CDATA block of the wft, have a subroutine generate a successorset list for the external changeownership task (which is invoked by the CGItask to specify which user).Then in the externaltask, $transition = "select id from alltaskstable where taskname='grandparent's taskname'" and then CallBack ($transition, $comment)Have I filled in the blanks?