Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

In Provider-Hosted app.

$
0
0

In provider-hosted app I call an Activity.

Activity1 act1 =newActivity1();

act1.Listid = Page.Request["Listid"];

WorkflowApplication wpf =newWorkflowApplication(act1);

wpf.Run();

Then Get an Exception

System.Activities.ValidationException was unhandled by user code

  HResult=-2146233087

  Message=An extension of type 'Microsoft.Activities.Hosting.NotificationExtension' must be configured in order to run this workflow.

  Source=System.Activities

  StackTrace:

       at System.Activities.Hosting.WorkflowInstanceExtensionCollection..ctor(Activity workflowDefinition, WorkflowInstanceExtensionManager extensionManager)

       at System.Activities.Hosting.WorkflowInstanceExtensionManager.CreateInstanceExtensions(Activity workflowDefinition, WorkflowInstanceExtensionManager extensionManager)

       at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)

       at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.IsLoadTransactionRequired(WorkflowServiceHost host)

       at System.ServiceModel.Activities.WorkflowServiceHost.InitializeRuntime()

       at System.ServiceModel.ServiceHostBase.OnBeginOpen()

       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)

       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

       at System.ServiceModel.Channels.CommunicationObject.Open()

       at RocketAlertsWeb.Pages.SetAlert.LinkButton1_Click(Object sender, EventArgs e) in c:\Users\Panagiotis\Documents\Visual Studio 2012\Projects\RocketAlerts\RocketAlertsWeb\Pages\SetAlert.aspx.cs:line 246

       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)

       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)

       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  InnerException:

This occurs only if in the Activity (CodeActivity or Activity.xml tested in both cases)

Activity have a  Microsoft.SharePoint.WorkflowServices.Activities.WaitForItemEvent object.

If I remove the Microsoft.SharePoint.WorkflowServices.Activities.WaitForItemEvent object or reference in code

the workflow run correctly without error.

Any ideas?


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>