<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : EntityServerSaveInterceptor + Verifier / Validate</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : EntityServerSaveInterceptor + Verifier / Validate</description>
  <pubDate>Wed, 13 May 2026 10:03:55 -700</pubDate>
  <lastBuildDate>Tue, 31 Jan 2012 11:54:47 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3239</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate :  Re: instance verifier not executed,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12588#12588</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 31-Jan-2012 at 11:54am<br /><br />Re: instance verifier not executed, I will be adding a feature request for this.<div><br></div><div>Re: Principal, yes, this issue has been previously brought up by others as well. We're going to be reviewing the design. For the time being, the most consistent way to access the Principal is to use Thread.CurrentPrincipal</div><div><br></div><div>No problem on the posting. It can go either way actually. :)</div><span style="font-size:10px"><br /><br />Edited by DenisK - 31-Jan-2012 at 1:56pm</span>]]>
   </description>
   <pubDate>Tue, 31 Jan 2012 11:54:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12588#12588</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate :   Correct me if I&amp;#039;m wrong,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12582#12582</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 31-Jan-2012 at 5:37am<br /><br /><table width="99%"><tr><td class="BBquote"><DIV><SPAN style="TEXT-ALIGN: left">Correct me if I'm wrong, but, in this use case, are you asking for a way to access the user's principal inside your verifier?</td></tr></table></SPAN></DIV><DIV><SPAN style="TEXT-ALIGN: left"></SPAN>&nbsp;</DIV><DIV><SPAN style="TEXT-ALIGN: left">Yes. In intial testing client-side I had used entity.EntityManager.Principal but of course this does not work once the verifier hits the server. We have had this basic discussion before regarding EntityManager.Principal being null on the server but I wasn't using Verifiers in that discussion. I believe another user chimed in saying it would be nice if it was populated. </SPAN></DIV><DIV><SPAN style="TEXT-ALIGN: left"></SPAN>&nbsp;</DIV><DIV><SPAN style="TEXT-ALIGN: left">Is there any way that already exists that I can access the Principal in a consistent manner between client and server in a verifier? I have worked around this but would love to remove the code :)</SPAN></DIV><DIV><SPAN style="TEXT-ALIGN: left"></SPAN>&nbsp;</DIV><DIV><SPAN style="TEXT-ALIGN: left">Sorry I kinda posted this in the wrong forum...it wasn't so Verifier specific when I first started thinking about it.</SPAN></DIV>]]>
   </description>
   <pubDate>Tue, 31 Jan 2012 05:37:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12582#12582</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate :  Hi midnit, Ok, I added triggers...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12579#12579</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 30-Jan-2012 at 7:23pm<br /><br />Hi midnit,<div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div><span style="text-align: left; : rgb251, 251, 253; ">Ok, I added triggers and see that the verifier fires if a trigger is tripped - but the instance verifiers don't. I can call VerifierEngine.Execute(entity) but should I have to or do I have something wrong?&nbsp;</span></div><div><span style="text-align: left; : rgb251, 251, 253; "></td></tr></table></span></div><div><span style="text-align: left; : rgb251, 251, 253; "><br></span></div><div>I'm not sure if this is a bug or a feature request but looking at the code, it seems that the behavior is correct. We don't execute instance verifiers for entities queried in the EntityServerSaveInterceptor. For the time being, you have to call VerifierEngine.Execute(entity). Let me find out if this is something we can fix, implement or if this is intentional.</div><div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div><span style="text-align: left; : rgb251, 251, 253; ">&#091;snip&#093;..........My instance verifier performs different validation based on the users security preferences - which are stored in the principal...except the principal is empty. These verifiers are only server side.</span></div><div><span style="text-align: left; : rgb251, 251, 253; "></td></tr></table></span></div><div><span style="text-align: left; : rgb251, 251, 253; "><br></span></div><div><span style="text-align: left; : rgb251, 251, 253; ">Correct me if I'm wrong, but, in this use case, are you asking for a way to access the user's principal inside your verifier?</span></div><span style="font-size:10px"><br /><br />Edited by DenisK - 30-Jan-2012 at 7:42pm</span>]]>
   </description>
   <pubDate>Mon, 30 Jan 2012 19:23:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12579#12579</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate : I will lump this in here since...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12570#12570</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 28-Jan-2012 at 1:37pm<br /><br /><P>I will lump this in here since its all the same general area of code. When I fire the VerifierEngine.Execute(entity) in the ValidateSave method via the saveinterceptor I am not seeing a way to know who the user is performing the save. In the&nbsp;interceptor I know I can use this.Principal, but the EntityManager on the entity has no Principal value. My instance verifier performs different validation based on the users security preferences - which are stored in the principal...except the principal is empty. These verifiers are only server side.</P><span style="font-size:10px"><br /><br />Edited by midnit - 30-Jan-2012 at 6:50am</span>]]>
   </description>
   <pubDate>Sat, 28 Jan 2012 13:37:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12570#12570</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate : Ok, I added triggers and see that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12569#12569</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 27-Jan-2012 at 9:21pm<br /><br />Ok, I added triggers and see that the verifier fires if a trigger is tripped - but the instance verifiers don't. I can call VerifierEngine.Execute(entity) but should I have to or do I have something wrong? <span style="font-size:10px"><br /><br />Edited by midnit - 30-Jan-2012 at 6:49am</span>]]>
   </description>
   <pubDate>Fri, 27 Jan 2012 21:21:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12569#12569</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate : It just hit me that it could also...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12568#12568</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 27-Jan-2012 at 8:14pm<br /><br />It just hit me that it could also be how I have declared the Verifiers. Here is one...<DIV>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>private</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>static</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Verifier</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>NominationTbl</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt; VerifyReceiptTransferPointDates()</P><P>{</P><P></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DelegateVerifier</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>NominationTbl</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt; v = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>DelegateVerifier</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&lt;</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>NominationTbl</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&gt;(</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>null</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>, VerifyReceiptTransferPointDatesCondition);</P><P>v.VerifierOptions.ExecutionModes = </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>VerifierExecutionModes</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.Instance;</P><P></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> v;</P><P>}</P></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Fri, 27 Jan 2012 20:14:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12568#12568</guid>
  </item> 
  <item>
   <title>EntityServerSaveInterceptor + Verifier / Validate : I am using DevForce 6.1.0.   I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12567#12567</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 3239<br /><strong>Posted:</strong> 27-Jan-2012 at 8:04pm<br /><br />I am using DevForce 6.1.0. <DIV>&nbsp;</DIV><DIV>I am saving an entity from the client, intercepting the save on the server, loading additional items and modifying them based on that entity, then saving all the changes.</DIV><DIV>&nbsp;</DIV><DIV>What I am seeing is that after modifying the entities in the interceptor the verifiers don't fire on anything except the initial entity. I then moved the code to the ValidateSave (as opposed to ExecuteSave) and called base.ValidateSave after all my manipulation and it still only fires the verifiers on the initial entity that was trigger via the client.</DIV><DIV>&nbsp;</DIV><DIV>They all commit to the database, but only one gets verified.</DIV><DIV>&nbsp;</DIV><DIV>Is there any way to get&nbsp;the verifiers to fire on all the entities that I loaded up and modified in the interceptor? The entities are the same type as the initial one.</DIV><span style="font-size:10px"><br /><br />Edited by midnit - 27-Jan-2012 at 8:15pm</span>]]>
   </description>
   <pubDate>Fri, 27 Jan 2012 20:04:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3239&amp;PID=12567#12567</guid>
  </item> 
 </channel>
</rss>