Create a copy of a workflow
Use the Save As feature to create a copy of a workflow. When you select Save As, the Designer creates a copy of the original workflow's design file. This includes all the configured steps as well as references and variables, but does not include the configuration of the Start event. Use Save As when you want to create a new workflow that has similar requirements to an existing workflow, and use the existing workflow as a starting point to build the new workflow.
When creating a copy of workflows keep in mind the following:
- You must give the new workflow a unique name.
- When you create a copy, you must reconfigure the Start step.
- Any form integration you added on the existing workflow is not included in the copied workflow. This applies to both the Start step and the Form tab on the Task step. You must reconfigure the integration preferably to a new form. You can integrate to the existing workflow form, but keep in mind that doing this will overwrite the form state rules. The copied workflow is set at the default state and will start when you submit the form. This means your existing workflow will no longer start when the form is submitted.
- All the steps you added to the existing workflow will show in the copied workflow. This includes all configurations you applied to the steps.
- All configurations you add to SmartObject Method steps will show in the copied workflow
- Any inline functions (with or without SmartObject configurations) added to the existing workflow steps will show in the copied workflow.
- When you create a copy, only the workflow design file is copied to either the default location (same category where the existing workflow is) or a different category created by you. Views, forms and SmartObjects you created for the existing workflow are not copied, and will remain in the original category. You can create a copy of these items and use them with the new (copied) workflow, but you will need to reconfigure all steps that use these items to point to the new copies of those items.
- When working with SharePoint and copying a workflow from one SharePoint library to another SharePoint library, note that Nintex K2 artifacts need to exist in the destination library before you can use that library to save the workflow to. This is because the Save As dialog only shows Nintex K2 categories, and a category is only created once you create artifacts for the library. If the library doesn't have existing artifacts, you won't be able to copy to that library.
- Remember to deploy your workflow when you done building and configuring it.
In this example, the original workflow is called Leave Application and the start event is configured to start when the Save button is clicked on the Leave form. The Employee Leave Detail reference shows in the References section. In the Variables section, notice that the variable Employee Number is also present. The workflow contains a Task step with a Decision step to either approve or reject the leave application. Two Send Email steps send notification to the requester to inform them if their leave was approved or rejected. An End step is where the workflow stops after the email is sent.
Suppose that the Leave Application workflow represents a typical one-step approval type process, and you want to use it as the basis for a new Claims Approval workflow.
- From the Designer, locate and select the Leave Application workflow.
- In the Properties section, click Save As.
- The Save As dialog shows. By default, the system uses the original workflow name and adds the word - Copy. The default category where the new workflow gets saved to is the same as the original workflow.
- Use the New Name field to specify a name for the new workflow. In this example, type Claims Approval. Use the Select Category field to specify where to save the new workflow. In this example, click the ellipsis button then browse to and select the Claims Approval category. Click OK.
- The new workflow shows in the Claims Approval category.
- Select the workflow and click Edit.
- Configured steps, references, and variables from the original Leave Application workflow are available in the new Claims Approval workflow.
- Since the configuration is not copied when you perform a Save As, you must reconfigure this event in the copied Claims Approval workflow. You must reconfigure the integration, preferably to a new form. Select Start with a Form option and run through the wizard. For information on start events, see Start Overview.You can integrate to the existing workflow form, but keep in mind that doing this will overwrite the form state rules. The copied workflow is set at the default state and will start when you submit the form. This means your existing workflow will no longer start when the form is submitted.You can also right-click the workflow in the folder tree on the left side of the screen and select Save As
or click the Save As button in the Toolbar.
or from the Recent Files list, right-click the workflow and select Save As. - From the File menu select Deploy to deploy your workflow.
In this example, the original workflow is called Employee Contracts Workflow and the start event is configured to start when an item is added to the Employee Contracts SharePoint library. The Employee Contracts reference shows in the References section. In the Variables section, notice that the variable Contract No (number) is also present. The workflow contains a Task step with a Decision step to either start the onboarding workflow or rework the contract. A Call Sub Workflow step starts the employee onboarding workflow and a Send Email step sends an email to the employee's manager to notify them the contract needs to be reworked. An End step shows the workflow stops after the email is sent or the onboarding workflow completes.
Suppose that the Employee Contracts Workflow represents a one-step approval type process, and you want to use it as the basis for a new Client Contracts workflow.
Images in this section may differ depending on your version of SharePoint. For more information on the recent changes to SharePoint Online user interface (UI), see SharePoint Online User Interface changes.
- From SharePoint locate the Employee Contracts library. From the K2 menu select Application.
- On the SharePoint Application page, locate and select the Employee Contracts Workflow. Right click and select Save As.
- The Save As dialog shows. By default, the system uses the original workflow name and adds the word - Copy. The default category where the new workflow gets saved to is the same as the original workflow.
- Use the New Name field to specify a name for the new workflow. In this example, type Client Contacts. Use the Select Category field to specify where to save the new workflow. In this example, click the ellipsis button and browse and select the Client Contracts category. Click OK.
- Keep in mind that the Client Contracts category was created in the Designer. The copy of the workflow was saved to this folder and it means you must use the Designer and browse to the folder to find the new workflow.
Saving a copy of this workflow to a different category means the new workflow does not form part of the original workflow SharePoint list or library. If you want the new workflow in the same SharePoint list or library, select the default option for the Select Category field.
- Select the workflow and click Edit.
- Configured steps, references and variables from the original Employee Contracts Workflow are available in the new Client Contracts workflow.
- Since the configuration is not copied when you perform a Save As, you must reconfigure this event in the copied Client Contracts workflow. You must reconfigure the integration preferably to a new library or list. Select Start with a SharePoint List option and run through the wizard. For information on start events, see Start Overview.
- From the File menu select Deploy to deploy your workflow.
For related information see, KB002953: Saving, copying and renaming workflows.