Process Management
K2 for Visual Studio Process Management provides the ability to retry or repair a process instance. This is useful when troubleshooting a process error.
A process instance in error should be retried if there was an error within the system environment, i.e. a mail server was offline or some other intermittent error occurred.
Prerequisites:
A process instance error must be locatable within an error profile.
Instances must have the correct Server and Process rights:
- Server - The user will require Admin permissions
- Process - The user will require View permissions

Load K2 Designer for Visual Studio and select K2 Process Management from the View menu.
Once process management has loaded, the process instance in error must be located within the error profile. The process instance can then be retried (with the option of using a different process version if needed), or repaired using a corrected process version.

Once Process Management has opened, the process instance in error must be located.
Field | Description | Notes |
---|---|---|
Process Instance Error List | Presents a list of process instance errors available from within the selected error profile and supplies specific details about the process instance and the associated error. | |
View Flow | Presents a graphical view of the process containing the error. | |
![]() |
Reloads the information from the environment, workflow server and error profile. | Click on the Refresh button |
Retry | Allows the user to retry the process instance - this is used if there was an issue within the environment and not an error within the process definition or if a new process version is available on the K2 server which will resolve the error. See Click on the Retry button to load the Retry Details dialog: for more information. | Click on the Retry button |
Open | Allows the user to locate the error within a K2 for Visual Studio Process project and correct it. See Click on the Open button to load a copy of the solution/project associated with the process version. The code page containing the possible error will load in the design area. You can now correct the error within the project. for more information. | Click on the Open button |

Click on the Retry button to load the Retry Details dialog:
Field | Description | Notes |
---|---|---|
Label | The label that was given to the process version when it was deployed | Select the Process Version to use when retrying the process instance by clicking the associated Label check box |
Description | The description that was given to the process version when it was deployed | |
Date | The date that the process version was deployed | |
Deployed By | The user who deployed the process version | |
Default | The current default process version is shown by the x in this column | |
Retry All instances | Retries all process instances in error within the error profile that have a similar error description and error source and are of the same process version | Click on the Retry All Instances check box |
Ok | Retries the process instances using the selected process version | Click on the OK button |
Cancel | Exits the Retry Details dialog and returns to process management | Click on the Cancel button |
Select the process version to use when retrying the process instances and click OK.
The selected process version must be compatible with the process instance to be retried, i.e. all data fields, XML fields, destination users, etc., must be compatible.
Selecting Retry All Instances retries all the process instances in error within the error profile that have a similar error description, error source, and process version. If the selected process version is incompatible with a process instance a new error will occur.

Click on the Open button to load a copy of the solution/project associated with the process version. The code page containing the possible error will load in the design area. You can now correct the error within the project.
Recommended Steps
- Investigate the code to locate the error.
- Correct the code causing the error.
- Save the project.
- Redeploy.
With a process that has a K2 Server Event (Code) that presents a divide-by-zero error, the open option loads the K2 for Visual Studio project and the suspect server event code as follows [arrows added for emphasis]:
You should investigate the server event code, identify the error as SecondValue = 0, and correct the code by changing the value. This corrects the divide-by-zero error:
Once the error has been corrected, save the project. Select the Process Management tab and click the Redeploy button. Add a version description in the Repair Details dialog and click OK. If there are no errors and the code deploys successfully, you can then return to the process management view. The process instance has been repaired.
Clicking the Redeploy button saves and deploys the corrected process project and presents the Repair Details dialog.
Field | Description | Notes |
---|---|---|
Repair Label | The default label for the corrected process version | The user may accept the default label, or customize it by entering text in the Repair Label text box |
Repair Description | The default description for the corrected process version | The user may accept the default description, or customize it by entering text in the Repair Description text box |
Retry All Instances | Repairs all process instances in error within the error profile that have a similar error description and error source and are of the same process version | Click on the Retry All Instances check box |
OK | Saves the repair label and description and retries the process instances using the corrected process version | Click on the OK button |
Cancel | Exits the Repair Details dialog without retrying the process instances | Click on the Cancel button |
You may see the following messages after repairing instances:
- A new Process Version has been created. The new process version is not set to default, so any new process instances started on the K2 server continue to use the default process version.
- A new K2 for Visual Studio Project Definition has been created. If you need to modify the corrected process project, the project files must first be downloaded from the Source option of the process version within the Management Console.
Selecting Retry All Instances repairs all of the process instances in error within the error profile that have a similar error description, error source, and process version. If the corrections applied to the new process version are a special fix for the initial process instance in error (and not for the others), the workflow process could be irreparably damaged.
If the Repair was successful, the process instance errors will be removed from the error profile list and the process instances continue to the next activity or event.
Fixing the process definition while repairing a process instance creates a new process version. The new process version is not set to default, so any new process instances started on the K2 server continue to use the default process version until the new process version is set as default. In the Management Console, see Workflow Server > Processes > {Project and Process Name} > Versions
Fixing the process definition while repairing a process instance creates a new K2 for Visual Studio project. If a developer needs to modify the new process version, the project files must first be downloaded from the Source option of the process version within Management Console. See Workflow Server > Processes > {Project and Process Name} > Versions