For the last few days I have been working on a LAN to 7.2.2 customization for a customer.  I have had several issues with the way the VFS handles business rules but have been able to trudge through and get most of the work done. I had a small bit left that I decided to tackle this morning before the kids got up so I fired up AA and started to jump in. The task I had to complete was to create a custom property that would calculate some time based metrics around a ticket. Seemed pretty simple. Not so it seems with my configuration. I added a new property (C#) and saved. When I tried to compile I got a duplicate error where basically 2 snippet items were inserted in the VFS with the same item path. So I went over to the VFS explorer and started to drudge though the model. I located the 2 snippet items with the same item path and discovered that I had to manipulate not only the snippet but also potentially modelindex.xml and also Ticket.TICKET.entity.xml to get my business entities to compile correctly.

Now I wrote the code for my calculation which used the IDataService.GetConnection() method. Once the code was completed I tried to compile. Compile failed with a type resolution error (System.Data .. not known).  Ok, so to fix this issue I should go and edit my CodeSnippets.xml file and add a default assembly reference. I add a new node to the references XML section System.Data.dll, does not work. Ok try System.Data, again does not work. It is trying to resolve the references in the folder path of AA. Since this is a system reference it will not be there, UGH does not work.

So I decide to create an external rule assembly where there are no reference constraints to worry about. 5 minutes later all is good.

So if you need a business rule, or property that needs some system level functionality they you may want to consider using an external assembly instead of C#/VB.net code internal to the model.

– Mark

Leave a Reply