I used these steps to create a new site workflow:
- Create a new site workflow
- Declared variables for listItemID and queryResults
- Added item for querying a list based on filter criteria and hold results in queryResults
- Added foreach action that goes through the queryResults
- Added call web service action that executes for each of the queryResults and starts another list workflow for each of the results
Saved and published the workflow and it works fine.
I now export the workflow into a .nwf file and delete it from the site.
I then create a new site workflow and import the previously exported .nwf file and at this point I get this error:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Nintex.Workflow.Activities.Adapters.NWQueryListAdapter.OnImport(NWActionConfig activityConfig, ImportContext importContext) +803
Nintex.Workflow.ActivityReference.OnImport(NWActionConfig activityConfig, ImportContext importContext) +137
Nintex.Workflow.WorkflowRenderer.AddConfigToRender(NWActionConfig config, HtmlContainerControl parentControl, Guid listId, SPContentTypeId contentTypeId, ImportContext importContext, UserDefinedActionCollection userDefinedActions, SPWeb web) +431
Nintex.Workflow.WorkflowRenderer.RenderSnippet(NWActionConfigurations configs, Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +281
Nintex.Workflow.PartialWorkflows.WorkflowPart.GetRenderedHtml(Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +237
[NWRenderWorkflowException: Error rendering workflow segment.]
Nintex.Workflow.PartialWorkflows.WorkflowPart.GetRenderedHtml(Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +445
Nintex.Workflow.ApplicationPages.ImportWorkflow.btnSubmit_Click() +2131
Nintex.Workflow.ApplicationPages.ImportWorkflow.RaisePostBackEvent(String eventArgument) +52
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
|
The list workflow exports and imports fine however the site workflow doesn't.
Any suggestions on how to resolve this?
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Nintex.Workflow.Activities.Adapters.NWQueryListAdapter.OnImport(NWActionConfig activityConfig, ImportContext importContext) +803
Nintex.Workflow.ActivityReference.OnImport(NWActionConfig activityConfig, ImportContext importContext) +137
Nintex.Workflow.WorkflowRenderer.AddConfigToRender(NWActionConfig config, HtmlContainerControl parentControl, Guid listId, SPContentTypeId contentTypeId, ImportContext importContext, UserDefinedActionCollection userDefinedActions, SPWeb web) +431
Nintex.Workflow.WorkflowRenderer.RenderSnippet(NWActionConfigurations configs, Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +281
Nintex.Workflow.PartialWorkflows.WorkflowPart.GetRenderedHtml(Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +237
[NWRenderWorkflowException: Error rendering workflow segment.]
Nintex.Workflow.PartialWorkflows.WorkflowPart.GetRenderedHtml(Guid listId, SPContentTypeId contentTypeId, Boolean massageIdsForCurrentItem, ImportContext importContext, SPWeb web) +445
Nintex.Workflow.ApplicationPages.ImportWorkflow.btnSubmit_Click() +2131
Nintex.Workflow.ApplicationPages.ImportWorkflow.RaisePostBackEvent(String eventArgument) +52
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
|
The list workflow exports and imports fine however the site workflow doesn't.
Any suggestions on how to resolve this?