Skip to main content
I have a K2 process with an InfoPath form. I would like to know if there is a way to start the K2 process manually on an existing InfoPath form. For example, a process was completed on an InfoPath form and the user needs to modify something and then a new K2 process has to be ran again on this form.

If a form is saved in a library, regardless of whether it was part of another process or not, and the view that the user opens allows them to submit the form then you all you would need to do is edit the data and click submit.  The K2 process is bound to the submit rules of the form and would initiate a new instance of the process. 


The only issue you may run into is that the view that is available when the process complted and uploaded the form is not the "submit" view.  In this case you can simply edit the form to have a button on the last view that switches the view back to the submit view to allow a resubmit.


-Eric


ok. Now if the user clicks submit from the infopath form, how can I detect if a process is already running for this form? I would not want multiple process to run on the same form.

There are probably a couple ways to do this but one way would be to set a "completed" value in the form using the data event before you upload the final version of the form at the end of the process and check for this value in the submit rules.


-Eric


Clear the SN field under the K2 group in the infopath form before submitting the form.. It would surely kick off a new process

I used before a field with a complete value but the problem was if the process was stopped was the K2 management portal than it was not true anymore that there was still a process running or not based on the field completed. I have found a way to verify if a process is running by using a smartobject. So I can retrieve the process status.


Now the problem is if a process is running and the user clicks submit. I will need either to redirect the current process to the proper step or kill this process and start a new one. I could not find a way to update or stop an existing process. I have tried the smartobjects and the reference event but so far I didn't succeed to find a solution. I have found some code in the forum for K2 black pearl but I have only BlackPoint. I have tried a few things with the reference event but I didn't succeed to replicate the blackpearl code exactly the same way.


What can I do?


 


Reply