I have a workflow which is creating a list in a page within the same site (first is /facultyonboarding/home and the second is /facultyonboarding/expired), then deletes the current list. However, when it deletes the list - since the workflow is generated from within the list - once the workflow completes, it displays an error page because the page no longer exists. Is there a way to add a redirect in the workflow to send the user back to another page (i.e. workflow would be Create Page, Delete List then Redirect)?
You might try placing the logic for the workflow in a site workflow and trigger the site workflow from the list workflow that way the list workflow can complete while the list still exists.
Hope this helps!
Aaron, I'm not sure that will work. The goal of the workflow is, when a user edits an item in a list (i.e. checks the "Expired" checkbox), the entire list should then be moved (with it's title) to another side, within the same farm, then the original list should be deleted.
My logic follows:
Prior to creating the workflow, I have created a template from the list (including the items within it).
1) Create List: I use the current list name to provide the name of the new list, use the template created off of this list and enter the URL of the Team site.
2) Call Web Service: URL is Web_URL/_vti_bin/Lists.asmx, then calling the DeleteList method, and specifying the name of the current list to delete.
That's it. So it moves my list, all my data, and deletes the current list. My only issue is that once the list is deleted, of course, it refreshes and the page shows a dead page and you have to navigate back to the site homepage.
If I run this logic from the Site, I am unable to specific the details of the list in question. Am I missing a step in your suggestion, perhaps?
I see what you are saying. Oversight on my part!
You might be able to add a workflow variable to the site workflow that is configured to "Show on start form".
You could then call the workflow via the NintexWorkflow web service and start it (passing in the list name from the list workflow).
Here is an older blog post that covers the topic fairly well: Passing variable values between Nintex workflows | SharePoint Rider
I think that would get this done for you as the second workflow would be doing the work without the user watching it.