工作流程批准任务 [英] Workflow approval task

查看:71
本文介绍了工作流程批准任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将工作流部署到新的pwa实例时遇到了问题。我创建了一个PSWApprovalTask​​。批准后,"状态"列将设置为"已批准"。这是不正确的,状态应该是'已完成',并且工作流程结果'已批准'。
示例提案似乎可以很好地设置任务,我的代码可以在开发服务器上运行。我只是没有看到错误的专栏是如何获得批准的结果。工作流程永远不会进入下一阶段。

Hi, I am running into a problem when deploying my workflow to a new instance of pwa. I create a PSWApprovalTask. When i approve it, the 'Status' column is set to 'Approved'. This is incorrect, the Status should be 'Completed', and the Workflow Outcome 'Approved'. Sample proposal seems to set up tasks fine, and my code works on a development server. I just don't see how, the wrong column is acquiring the result of an approval. The workflow never advances to the next stage ..

chris

推荐答案

更多信息当我单击"批准"或"拒绝"时,在批准任务上,日志报告,

A little more info, when I click 'Approve', or 'Reject', on Approval task the log reports,

引擎RunWorkflow:System.Workflow.Activities.EventDeliveryFailedException:Event"OnTaskChanged""在接口类型"Microsoft.SharePoint.Workflow.ITaskService"上例如id"e4806881-22d4-43b8-ba20-fd78f28b4411"无法交付。 ---> System.Reflection.TargetInvocationException:
调用目标抛出了异常。 ---> System.ServiceModel.Security.MessageSecurityException:HTTP请求未经授权使用客户端身份验证方案'Ntlm'。从服务器收到的身份验证标头是"NTLM"。
---> System.Net.WebException:远程服务器返回错误:(401)未经授权。    在System.Net.HttpWebRequest.GetResponse()    在System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
timeout)     ---内部异常堆栈跟踪结束---   服务器堆栈跟踪:      at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request,HttpWebResponse
response,WebException responseException,HttpChannelFactory factory)     at

System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request,HttpWebResponse response,HttpChannelFactory factory,WebException responseException,ChannelBinding channelBinding)     at


System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)     at


System.ServiceModel.Channels.RequestChannel.Request(消息消息,TimeSpan超时)     at


System.ServiceModel.Dispatcher.RequestChannelBinder.Request(消息消息,TimeSpan超时)     at


System.ServiceModel.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs,TimeSpan timeout)    ;  at


System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime operation)     at


System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Engine RunWorkflow: System.Workflow.Activities.EventDeliveryFailedException: Event "OnTaskChanged" on interface type "Microsoft.SharePoint.Workflow.ITaskService" for instance id "e4806881-22d4-43b8-ba20-fd78f28b4411" cannot be delivered. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.     at System.Net.HttpWebRequest.GetResponse()     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)     --- End of inner exception stack trace ---    Server stack trace:      at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory factory)     at
System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)     at
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)     at
System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)     at
System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)     at
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)     at
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)     at
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

  ---内部异常堆栈跟踪结束 - -      at

System.RuntimeTypeHandle.CreateInstance(RuntimeType type,Boolean publicOnly,Boolean noCheck,Boolean& canBeCached,RuntimeMethodHandle& ctor,Boolean& bNeedSecurityCheck)     at


System.RuntimeType.CreateInstanceSlow(Boolean publicOnly,Boolean fillCache)     at


System.RuntimeType.CreateInstanceImpl(Boolean publicOnly,Boolean skipVisibilityChecks,Boolean fillCache)     at


System.Activator.CreateInstance(Type type,Boolean nonPublic)&n​​bsp;    at


System.Workflow.Runtime.Hosting.DefaultWorkflowLoaderService.CreateInstance(Type workflowType)     at


System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType,Boolean createDefinition,Boolean initForRuntime)     at


System.Workflow.Runtime.WorkflowDefinitionDispenser.MruCache.GetOrGenerateDefinition(Type type,String xomlText,String rulesText,Byte [] md5Codes,Boolean initForRuntime,Boolean& exist)      at


System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(输入workflowType,Boolean createNew,Boolean initForRuntime)     at


System.Workflow.ComponentModel.Activity.OnResolveActivityDefinition(Type type,String workflowMarkup,String rulesMarkup,Boolean createNew,Boolean initForRuntime,IServiceProvider serviceProvider)     at


System.Workflow.ComponentModel.Serialization.ActivitySurrogate.ActivitySerializedRef.System.Runtime.Serialization.IObjectReference.GetRealObject(StreamingContext context)     at


System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)     at


System.Runtime.Serialization.ObjectManager.DoFixups()    在¥b $ b System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler,__BinaryParser serParser,Boolean fCheck,Boolean isCrossAppDomain,IMethodCallMessage methodCallMessage)     at


System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream,HeaderHandler handler,Boolean fCheck,Boolean isCrossAppDomain,IMethodCallMessage methodCallMessage)     at


System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)     at


System.Workflow.ComponentModel.Activity.Load(Stream stream,Activity outerActivity,IFormatter formatter)     at


System.Workflow.Runtime.Hosting.WorkflowPersistenceService.RestoreFromDefaultSerializedForm(Byte [] activityBytes,Activity outerActivity)    在Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState(Guid instanceId)    
at¥b $ b System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId,CreationContext context,WorkflowExecutor executor,WorkflowInstance workflowInstance)    在System.Workflow.Runtime.WorkflowRuntime.Load(Guid键,CreationContext
context,WorkflowInstance workflowInstance)    在¥b $ b System.Workflow.Runtime.WorkflowRuntime.GetWorkflow(Guid instanceId)     at


System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender,ExternalDataEventArgs eventArgs)    

 --- End of inner exception stack trace ---     at
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)     at
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)     at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)     at
System.Activator.CreateInstance(Type type, Boolean nonPublic)     at
System.Workflow.Runtime.Hosting.DefaultWorkflowLoaderService.CreateInstance(Type workflowType)     at
System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime)     at
System.Workflow.Runtime.WorkflowDefinitionDispenser.MruCache.GetOrGenerateDefinition(Type type, String xomlText, String rulesText, Byte[] md5Codes, Boolean initForRuntime, Boolean& exist)     at
System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime)     at
System.Workflow.ComponentModel.Activity.OnResolveActivityDefinition(Type type, String workflowMarkup, String rulesMarkup, Boolean createNew, Boolean initForRuntime, IServiceProvider serviceProvider)     at
System.Workflow.ComponentModel.Serialization.ActivitySurrogate.ActivitySerializedRef.System.Runtime.Serialization.IObjectReference.GetRealObject(StreamingContext context)     at
System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)     at
System.Runtime.Serialization.ObjectManager.DoFixups()     at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)     at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)     at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)     at
System.Workflow.ComponentModel.Activity.Load(Stream stream, Activity outerActivity, IFormatter formatter)     at
System.Workflow.Runtime.Hosting.WorkflowPersistenceService.RestoreFromDefaultSerializedForm(Byte[] activityBytes, Activity outerActivity)     at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState(Guid instanceId)     at
System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)     at
System.Workflow.Runtime.WorkflowRuntime.GetWorkflow(Guid instanceId)     at
System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)    

- - 内部异常堆栈跟踪结束---     at

System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender,ExternalDataEventArgs eventArgs)     at


Microsoft.SharePoint.Workflow.SPWinOETaskService.CallEventHandler(类型eventType,String eventName,Object [] eventData,SPWorkflow工作流,字符串标识,IPendingWork workHandler,Object workItem)      at


Microsoft.SharePoint.Workflow.SPWorkflowExternalDataExchangeService.RunEvent(SPWorkflowEvent workflowEvent,SPWorkflow workflow,IPendingWork workHandler,SPPendingWork eventDequeue)     at


Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow工作流程,SPWinOeWorkflow winoeworkflow,SPWorkflowEvent e)     at


Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService主机,SPWorkflow工作流,Collection`1事件,TimeSpan timeOut)

--- End of inner exception stack trace ---     at
System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)     at
Microsoft.SharePoint.Workflow.SPWinOETaskService.CallEventHandler(Type eventType, String eventName, Object[] eventData, SPWorkflow workflow, String identity, IPendingWork workHandler, Object workItem)     at
Microsoft.SharePoint.Workflow.SPWorkflowExternalDataExchangeService.RunEvent(SPWorkflowEvent workflowEvent, SPWorkflow workflow, IPendingWork workHandler, SPPendingWork eventDequeue)     at
Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow workflow, SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)     at
Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)

这是奇数,因为在样本提案工作流程批准期间没有抛出此类错误。

which is odd, because no such error is thrown during Sample Proposal workflow approvals.


这篇关于工作流程批准任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆