Skip to main content

Hi Everyone,

 

I have a scenario with a client in which I have to be able to change the "owner" of  a process from a SmartForm picker control. Obviously you have the redirect functionality from the worklist that would assign the worklist item to the new "owner" but they don't want to use this fuctionality as they want to force the person to open the worklist item before you can redirect the worklist item. 

 

I would like to find out if I would be able to do it with an activity action that updates the worklist item instead of completing the worklist item. Does this restart the activity and if I update the datafield that holds the user fqn would it then assign the worklist item to that person ?

 

Kind regards,

 

Helgard Wagener

Hi,


You can use the API to delegate/Redirect k2 tasks without opening the workflow.


Please look at the following community article: http://community.k2.com/t5/K2-blackpearl/How-to-delegate-Redirect-K2-task-using-K2-API/m-p/54933#M14166


 


Changing the owner of the workflow is a different story;


At the moment there is no UI to change owners of a workflow.
There is a stored Procedure that allows you to change owner of a workflow but direct DB manipulation is not supported by K2 and you might need to reach out to K2 services for assistance.


 


IMPORTANT: Please perform a backup of the K2 database before running the SQL script.

UPDATE [K2].[Designer].[ProcessXML]
SET Owner = '<FQN of user>'
WHERE id = <process id>

UPDATE [K2].[Designer].[ProcessXMLHistory]
SET Owner = '<FQN of user>'
WHERE id = <process id>

Change the values in the SQL script accordingly. For example, the FQN of user looks something like 'K2:[Domain]Bob'. As for the process id, you can first run the following SQL query:

SELECT *
FROM [K2].[Designer].[ProcessXML]

Then find the workflow you want and take note of the value in the id field.


 


Regards


Kallie


HelgardWagener,

 I have done this very thing. I use buttons in my form so when a change is made some sort of a submit button has to be clicked to save the change and action any rules. So there are a couple of ways to accomplish what you want to accomplish depending on how your form is built. Let's start with the workflow. In my scenerio a task can be re-assigned two ways. The first way is the task makes it to a verification stage and they see the manager who approved the request was not the right manager so they change the people picker to the correct manager and the outcome in the workflow send it back to the manager state for approval from the correct manager. The second scenerio is someone assigns a task to an individual. The participant in this task is actually just the people picker field. So when the ticket is re-assigned it just sends it to whoever is in the people picker control. I have a re-assign button and the re-assign button simply actions the task then sends it back to the same task for task re-assignment. I had to use some trickery to make this happen. The way I did this was once the task was actioned the next step was a dummy email account. Then it goes right back to the task where it started.

 

 

A rule in the form can say "On Submit Button Click>If people picker has changed>Update Smartobject>Action Worklist Item>Close Window"

 

I hope this answers your question. If you would like to know how I actioned this from the form rules let me know and I will be happy to share that with you.

 

Thanks,

Bryan Peters


Reply