Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
MSDN
|Developer Centers|Library|Downloads|How To Buy|Subscribers|My MSDN
 
Chat Transcript
 
Building Solutions Using the Jupiter Rules Engine
Host
: Praveen Srivatsa, MSDN Regional Director - Microsoft India
December 26, 2003
 
Kevin_MS : Hello Everyone & Welcome to the MSDN India Expert Chat

Praveen : Hi Sijin

Praveen : thats a nice question

Kevin_MS : Our expert host for the day is Praveen Srivatsa, MSDN Regional Director - Microsoft India

Moderator_MSDNIndia : (Sijin) First of all can i get an overview of what the Jupiter rules engine is all about?

Praveen : can u quickly tell me what server products u work with?

Praveen : ok...

Praveen : if you have worked with any of this set - commerce server, biztalk server, sharepoint portal server

Praveen : or content management server

Praveen : you will notice that most of the times we need to develop workflow kind of applications

Praveen : which need to be handled with some business rules

Praveen : Content mgmt - we need to publish content based on authorization by the content admin

Praveen : for sensitive content, we need to escalate and based on a time limit expire the content

Praveen : with commerce - the same is true for commercial transactions

Praveen : biztalk uses the same for B2B apps

Praveen : and sharepoint for intranets

Praveen : so Jupiter is an attempt by Microsoft to combine all the above

Praveen : and have a common business framework

Praveen : that can address all of the above

Praveen : as part of that effort, they have come up with a common rule ending

Praveen : which is what the Jupiter Rules engine is all about

Praveen : Jupiter,y the way, the code name for the Biztalk 2004 release

Praveen : but all the rest of the products will use the same engine

Praveen : yes it will...

Praveen : let me try to give an example

Praveen : lets take a scenario where we want to interact with a vendor who supplies us with software

Praveen : and we need this software for a product that we want to do

Praveen : we place a order on our intranet for the software -

Praveen : which uses the rules engine to get approval from my manager

Praveen : and uses the rules engine to post the order to our biztalk system

Praveen : this interacts with the vendors system and confirms the order

Praveen : once the vendor ships the software, it updates our biztalk system

Praveen : which looks up the rules engine and allocates the same to you - as ur manager has approved your request

Praveen : if this now needs a followup, it can also - based on the rules engine - inform finance that they have to

Praveen : raise a voucher and pay the vendor

Praveen : all this happens as MANAGED code

Praveen : and all this runs off a single policy database

Praveen : (a policy is a set of rules that execute together)

Moderator_MSDNIndia : (Sijin) now what is the communication protocol used?...web services?

Praveen : and yes - we can include this as part of our application

Praveen : if you had noticed in Biztalk

Praveen : you had an option of the protocl

Praveen : Webservices (htp posts), TCPIP, direct API

Praveen : while the options will be supported, webservices is obviously the suggested choice

Praveen : yes - you will have other protocols as well

Praveen : so if you want to validate a rule for the intranet, you might want to do a call to managed code via remoting

Praveen : so those will also be supported

Moderator_MSDNIndia : (Sijin) are there other communication protocols?

Praveen : yes - it will support http, smtp and remoting

Moderator_MSDNIndia : (Sijin) how does the client comunicate with the server on an intranet?

Praveen : a client can interact using one of the above - http (webservices), tcp (remoting) smtp (e-mails)

Praveen : they can also do ftp (file drops)

Praveen : all the above are supported

Praveen : does that answer your question sijin?

Moderator_MSDNIndia : (Sijin) file drops....now can i define a rule that says that when a file is added to a paticular server, then a specific rule should be triggered

Praveen : nice question - the way you do it is

Praveen : you specify a biztalk event which on file drop calles an orchestration

Praveen : and the first step in the orchestration is a call to the rule

Praveen : there are a few changes to the orchestration engine

Praveen : it was using the XLANG engine for parsing the rules

Praveen : and the rules were so far embedded as scripts...

Praveen : now Jupiter uses BPELWS - business process execution language for web services

Praveen : which is a super set of XLANG

Praveen : the BPELWS can be triggered from Biztalk

Praveen : you can also write custon managed classes which can call the BPELWS engine

Moderator_MSDNIndia : (Sijin) ok so the rules have a schema definition now?...or is it something else?

Praveen : yes - the rules have a schema definition

Praveen : and the rules has a rule store

Praveen : typically SQL - but can also be a xml storeage on the file system

Praveen : and the schema is rich enough to enable definition of rules and actions to perform in case the rules are successful

Praveen : yes we can...

Praveen : but it goes through a PUBLISHING before it becomes effective

Moderator_MSDNIndia : (Sijin) does that mean the my calls get converted to a script internally which gets parsed by the engine?

Praveen : so once a rule is defined its hosted as draft and an admin will have to specify - apply rule as of a certain date

Praveen : not to script - to an assembly

Praveen : which has references to the Biztalk BPELWS engine and gets executed

Praveen : so all that you are working on will be in the releam of managed code

Moderator_MSDNIndia : (Sijin0 Is an object model for defining rules?

Praveen : there are a bunch of system.biztalk classes

Praveen : but more importantly the rule definition has to conform to the schemas defined for it

Praveen : so while the system calsses will provide ways to invoke rules and modify rules

Praveen : the actual definition of the rule should be compliant with the schema defined

Moderator_MSDNIndia : (Sijin) ok ... so i guess eventually any BPELWS script also gets converted to an assembly?

Praveen : so its easier to use the visual interface provided with Jupiter

Praveen : yes - you are absolutely right. Any BPELWS script will get converted to an assembly

Praveen : and all the hosting rules of .NET assemblies will hold true.

Praveen : you can host it in GAC. It will use the version of other assemblies as specified etc etc

Praveen : Hi Bhuvan and Pooran - you guys have anything specific to ask?

Moderator_MSDNIndia : (Sijin) GAC...so that would mean that Biztalk won't automatically detect new assemblies in a specific folder and add those rules...

Praveen : no it would not

Praveen : remember that you host rules as a separate assembly and Biztalk invokes the rules using reflection

Praveen : at runtime

Praveen : so you would need to deploy the assemblies on a RULES SERVER

Praveen : and then invoke the same from your Biztalk server (it can and mostly will be the same machine as the Biztalk server)

Praveen : so in an intranet scenario - you would need to install a rules server where you host rules

Praveen : and an application server where your application executes and calles the rule from the rules server

Praveen : explorer event notifications (file drops), timer events, msmq events

Praveen : webservices call

Praveen : you can use any one of these events to trigger an orchestation

Moderator_MSDNIndia : (Sijin) How about new mail in a specific folder in MS Exchange?

Praveen : you can also trigger an orchestration from your code

Praveen : I dont think a new mail is supported right now

Praveen : but remember that the exchange store can store e-mails on the file system (if its active directory enabled)

Praveen : in which case it would work like a file drop

Moderator_MSDNIndia : (Sijin) is there a plugin architecture that allows us to add new events?

Praveen : but for all other events you will have to write your own handler and when you trap the event, invoke an orchestration call

Praveen : I dont think there is a plug in to add events, but you can call orchestration from code

Praveen : also remember that right now jupiter is in beta... so some of the finer points are likely to change by the time they release the final version

Moderator_MSDNIndia : (Sijin) Now when a rule is activated, what kind of actions are possible in Jupiter?

Praveen : right now in the beta, only invocation of a .NET assembly is supported

Praveen : which basically becomes a wrapper using which you can invoke anything externally

Praveen : like a web services call or a storedproc etc

Moderator_MSDNIndia : (Sijin) Any specific interfaces/methods that the assembly needs to support?

Praveen : nothing specific...

Praveen : what the tool does is it provides an interface to select the assembly

Praveen : and select the method

Praveen : and map the input parameters

Praveen : yes

Praveen : only thing to keep in mind

Praveen : is that as a lot of it uses reflection

Praveen : we should not change the assembly after linking to an action

Praveen : else we will get a runtime error

Praveen : which of course we should have handled properly

Moderator_MSDNIndia : (Sijin) Can't we change the assembly with another one which has same method and with same method signature?

Praveen : you can... there should be no issues with that

Praveen : be as it uses reflection, the checking will happen at runtime not complie time

Praveen : remember that as it uses the .NET assemblies it uses the version of the assembly as well

Moderator_MSDNIndia : (Sijin) Input parameters, are they hardcoded or can they come from an external source?

Praveen : you define your input paramenters and then map which item in the object thats being validated should be MAPPED to your input parameter

Praveen : just like what the Biztalk mapper used to do

Praveen : so you can create a vocabulary of terms

Praveen : map the terms to inputs (from XML docs/SQL/assemblies etc)

Praveen : and pass the input to the rules engine which will use the input to check the rules

Praveen : and then passes the same to the actions

Praveen : so an item in the input can be MAPPED to your input paramters of your assembly

Moderator_MSDNIndia : (Sijin) Can i have an input parameter like an email address, that comes from an external file?

Praveen : you can do that provided you have specified the external file as a parameter to the rules engine

Praveen : you can specify - SQL, XML (external file) or an assembly as an input parameter

Praveen : and pick any field of that to pass to the action assembly

Praveen : its quite a comprehensive definition - but just like Biztalk

Praveen : you will have to be familiar with the terms

Praveen : and what each specification/action means

Praveen : but while Biztalk allowed scripts to be plugged in, this is completely managed

Praveen : Any other questions on the rules engine?

Praveen : the BPELWS is declarative

Praveen : it does not have syntactic constructs

Praveen : this enables it to be easily generated from a visual tool

Praveen : like a visio

Moderator_MSDNIndia : (Sijin) can we also define actions on exceptions, like for example if a specific assembly is not found, or the assembly itself throws an exception?

Praveen : yes you can

Praveen : but its limited to CLR trapped errors

Praveen : so if you have your own exceptions, you will have to handle it yourself

Praveen : not directly

Praveen : you will have to orcestrate the workflow to handle different brances

Praveen : the orcehstration engine handles that based on the OUTPUT from the rule verification

Praveen : if true - use a branch else use a different branc

Kevin_MS : With that we have come to the end of today's chat session.

Kevin_MS : Praveen, thank you very much for joining us and answering our questions

Praveen : Thanks a ton guys

Kevin_MS : Also, thank you all for joining us…

Kevin_MS : do join us for our next MSDN India Expert chat

Praveen : Lets look to more session on Jupiter next year

Praveen : thanks a lot everyone
     

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement
Microsoft