The workflow failed validation.

by Louis-Guillaume Morand 2. novembre 2009 22:16

Quelle ne fut pas ma surprise lorsqu'effectuant des tests sur une application ayant toujours fonctionné, mon application (ASP.Net + Workflow Foundation) me sortit ce doux message d'erreur : The workflow failed validation

en creusant un peu plus en DEBUG, je trouvais alors l'origine profonde du problème: Error 1342: Activity 'IfIsACF' validation failed: Can not find the condition "IsACF".

Facile me dis-je, l'activité IfIsACF, est une activité de type IfElse qui utilise une propriété conditionnelle nommée IsACF et il ne la trouve pas. Il me suffit d'ouvrir mon workflow en mode designer pour voir où est passée ma condition... Et là, c'est le drame. Mon activité est bien là et ma condition aussi. Je la supprime, je la remets, même problème. L'application compile mais à l'exécution ca plante.

 

Pour revenir au contexte, tandis que chez moi, je migre doucement mes projets 2008 (dont mon site perso) vers Visual 2010, au boulot, je migre les derniers projets sous 2005 vers VS2008. Et visiblement, le problème viendrait de là. En effet, strictement rien n'a changé dans mon projet si ce n'est qu'il est utilisé par VS2008. D'où vient le problème dans ce cas? Et bien, il semblerait que cela soit tout simplement une question de nommage de fichier. En effet, la classe de mon workflow se nomme DemandHabilitation et le fichier DemandeHabilitation. Cette simple différence entraine le fait qu'à l'exécution, le fichier de rules (DemandeHabilitation.rules) n'est pas trouvé lors de l'exécution, bien qu'en ressource incorporée.

Donc pour conclure, aussi con que cela puisse paraitre, ce problème ne se produit que pour certaines activités et est un bug connu mais l'origine du problème est facilement corrigeable puisqu'il s'agit dans 99% du temps d'un simple problème de nom de fichier et de classe.

 

Tags: ,

.Net | WF

Commentaires

05/05/2010 22:39:22 #

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

tolani scarves United Kingdom

28/05/2010 07:16:15 #

I need to extend security in BE just a little. I need to make a user registration form and disable comments for non-registered users. Has anyone done this? What difficulties might arise?

Discount Perfume United Kingdom

04/07/2010 22:09:03 #

Hey - nice website, just looking around some blogs, seems a really nice platform you are using. I'm currently using Wordpress for a few of my websites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?

wow gold Serbia and Montenegro (Former)

05/07/2010 03:56:58 #

Congratulations on having one of the most sophisticated blogs Ive come across in some time!  Its just incredible how much you can take away from something simply because of how visually beautiful it is.  Youve put together a great blog space --great graphics, videos, layout.  This is definitely a must-see blog!

gold4power Hungary

05/07/2010 09:27:11 #

This is the perfect blog for anyone who wants to know about this topic.  You know so much its almost hard to argue with you (not that I really would want...HaHa).  You definitely put a new spin on a subject thats been written about for years.  Great stuff, just great!

aion players Iceland

06/07/2010 08:14:43 #

Really enjoyed reading your articles, will be back again soon

Wow Gold Instant Greece

06/07/2010 13:36:36 #

i like this website!

Wow Mage Chile

Ajouter un commentaire




  Country flag

biuquote
  • Commentaire
  • Aperçu immédiat
Loading




Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen