Thursday, November 10, 2011
Watin => Selenium ?
So it might be time to move over to Selenium. Active development, wide browser support...
Sunday, September 26, 2010
Friday, April 25, 2008
External function calls
Initially I intended to call a webservice, but it seems that all free weather webservice calls is something from the past. Yahoo offers weather information as an RSS feed. So a simple XPath query can select the information that I'm interested in:
Here is the code (note the FunctionAttribute decoration on the method)
1 using System.IO;
2 using System.Net;
3 using System.Xml;
4 using AcumenBusiness.IModel;
5 using Type=AcumenBusiness.IModel.Type;
6
7 namespace TestCallWebService
8 {
9 [Concept("Weather info", "Try to get weather forecast from different services")]
10 public class WeatherInfoProvider
11 {
12 private static readonly string YahooWeatherURLFormat = "http://weather.yahooapis.com/forecastrss?p={0}";
13
14 [Term("workaround", "import function requires one field. (bug)")]
15 private string dummyField;
16 public string DummyField
17 {
18 get { return dummyField; }
19 set { dummyField = value; }
20 }
21
22 [Function("Get temperature", "Get the weather info from Yahoo",
23 ReturnType = Type.text,
24 ArgumentTypes = new Type[] { Type.integer })]
25 public static string GetWeatherInfoAsFeed(int zipCode)
26 {
27 HttpWebRequest request = (HttpWebRequest) WebRequest.Create(string.Format(YahooWeatherURLFormat, zipCode));
28 // execute the request
29 HttpWebResponse response = (HttpWebResponse) request.GetResponse();
30
31 // we will read data via the response stream
32 Stream resStream = response.GetResponseStream();
33 XmlDocument rssFeed = new XmlDocument();
34 rssFeed.Load(resStream);
35
36 //set an XmlNamespaceManager since we have to make explicit namespace searches
37 XmlNamespaceManager xmlnsManager = new System.Xml.XmlNamespaceManager(rssFeed.NameTable);
38 //Add the namespaces used in the xml doc to the XmlNamespaceManager.
39 xmlnsManager.AddNamespace("yweather", "http://xml.weather.yahoo.com/ns/rss/1.0");
40
41 XmlNode weatherCondition = rssFeed.SelectSingleNode("/rss/channel/item/yweather:condition/@temp", xmlnsManager);
42 if (weatherCondition != null) {
43 return weatherCondition.Value;
44 }
45 return null;
46 }
47 }
48 }
With the Import Schema adapter I can import this function and call it from my business rules. The coolest part is that you can invoke this from the Interactive Rule Map. So you can see how your rules are executing with this external data. It seems to be 76 fahrenheid in L.A.
Nice weather to jump on the bike and cycle to work...

Thursday, January 10, 2008
.NET SOA BizTalk: BizTalk Tools and guidelines
Tuesday, October 30, 2007
RenewCert - Renew Expired Certificates
The error you would get is:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
at System.Deployment.Application.DeploymentManager.DetermineTrust(TrustParams trustParams)
at System.Deployment.Application.ApplicationDeployment.CheckForDetailedUpdate()There is a workaround made by Cliff Stanford RenewCert, which allows you to regenerate an expired certification.
Thanks Cliff!
Sunday, October 14, 2007
Graphical Rule Editor for RuleML format

In the last few weeks we have created the RuleML adapter for the Rule Manager. The RuleML adapter allows to export a business rules policy to the Reaction RuleML format.
Please bear with us that we are no experts in RuleML and certain rule constructions might be exported incorrectly. I hope the RuleML community can provide us with the feedback and we will incorporate any changes into our automatic update process as soon as possible. You can give feedback at the http://www.acumenbusiness.com/support forum.
Installation:
The Rule Manager product is available from the website http://www.acumenbusiness.com/
You can export to the RuleML format by installing the RuleML adapter module. See the screenshot [Menu: File\Options\Adapters\Rule ML]
The adapter will provide the new export format "RuleML (*.rrml)" in the Export wizard. [Menu: File\Export]
You can set .rrml as the default export type by changing the File Export type on the Import & Export options
[Menu: File\Options\Import & Export\File Export = RuleML (*.rrml)]
An example of the Driver Eligibility export is here
Wednesday, August 08, 2007
Paul Andrew : What to use Windows Workflow Foundation for?
That is exactly the reason why I'm currently designing a Windows Workflow Foundation architecture for a very large client. Performance will become critical...

Rss Site Feed