Skip to main content

Hi,


 I am having problems deploying my process and it seems to be something to with the notifications I have put in place.
We have 2 environments (development & production) and these are both set up exactly the same (Blackpearl server on one machine and SQL server on another).
I have been making changes to the development workflow, copying the project to the production environment and deploying for the last few weeks, with no problems at all. However, yesterday this suddenly stopped being the case and the deployment fails on the production environment only, with the following errors:



Error 1 Notification Service: Task Error: System.Exception: System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at SourceCode.EventBus.Server.ClientServerImplimentation.getNotificationTemplate(String& notificationPart1, String& notificationPart2)
   at SourceCode.EventBus.Server.ClientServerImplimentation.GetPolicyMappingForNotification()
   at SourceCode.EventBus.Server.ClientServerImplimentation.GetPolicyMappingForNotification()
   at SourceCode.EventBus.Server.ClientServerImplimentation.UpdateWorklistItemNotification(List`1 worklistItemIdentifiers)
 C:Visual Studio 2005 ProjectsFusion II - WorkflowSourceFFF.FusionII.ProductMgmt.WFobjDebugDeploymentFFF.FusionII.ProductMgmt.WF.msbuild 71 6 FFF.FusionII.ProductMgmt.WF
 


Error 2 The "SourceCode.DeploymentTasks.NotificationService.NotificationTask" task failed unexpectedly.
System.Exception: System.Exception: System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at SourceCode.EventBus.Server.ClientServerImplimentation.getNotificationTemplate(String& notificationPart1, String& notificationPart2)
   at SourceCode.EventBus.Server.ClientServerImplimentation.GetPolicyMappingForNotification()
   at SourceCode.EventBus.Server.ClientServerImplimentation.GetPolicyMappingForNotification()
   at SourceCode.EventBus.Server.ClientServerImplimentation.UpdateWorklistItemNotification(List`1 worklistItemIdentifiers)
   at SourceCode.DeploymentTasks.NotificationService.NotificationTask.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
 C:Visual Studio 2005 ProjectsFusion II - WorkflowSourceFFF.FusionII.ProductMgmt.WFobjDebugDeploymentFFF.FusionII.ProductMgmt.WF.msbuild 71 6 FFF.FusionII.ProductMgmt.WF


I have also tried creating a new much smaller workflow with one Default Client Event with the built in email notification, but this fails with the same error. However, removing the Default Client Event and deploying with only a Mail Event works no problem.


If anyone has any idea what this might be, I would be very grateful. I've only got so much hair left to pull out :)


Many thanks,


 Kevin.

Very strange. Despite the 'Deploy Failed' message, it does seem to actually deploy.


 Moral of the story - don't believe everything you read. ;)


It does however indicate the the MS Message Queue might not be configured quite right.. perhaps ...

Martin

If the notification event message body didn't include the [UrlWithSN] field you will get this error. This requirement sort of makes sense but the exception message could have been more helpful.



This article is helpful: http://devk2.wordpress.com/2009/03/20/k2-worklist-item-email-how-to-change-the-mail-template/.


I'm working with this as well.  I need to include the folio somewhere on the message, is there any way to modify the template to do that?  I know you can do it in the notification designer, but that is not practical if you have to do it for every single message individually.


Also, can the style of the activity URL be changed from that green?  It looks like the tag is being generated in code at runtime.


Reply