<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=SV link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Wolfgang<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Well, to be more specific the resources are taxi cars. Each taxi has their pre-defined shifts when they should be operating, then the drivers can sign up for which shifts they want to work.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>What I want to accomplish is to have a set of rules or formulas in a human readable syntax which at beginning of each month generate these shifts. The input to the rule/formula could e.g. be to iterate over the dates of the month something like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Rule for shift: Every Monday 8-17<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Input: Iterate over the dates of February 2012<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Output: Shift (2012-02-06 8-17), Shift (2012-02-13 8-17), Shift (2012-02-20 8-17), Shift (2012-02-27 8-17)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> Would this be suitable to implement with drools or do you have a suggestion for a more appropriate tool?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Best regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sverker<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] <b>On Behalf Of </b>Wolfgang Laun<br><b>Sent:</b> den 14 januari 2012 9:45<br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: [rules-users] Rules for generating calendar events<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>There is one sentence that lets me ask whether you understand the<o:p></o:p></p><div><p class=MsoNormal>workings of a rule based system: &quot;...the rules that generate the events...&quot;.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>The essential idea of a RBS is the <i>selection</i> of data (&quot;facts&quot;) based on its<o:p></o:p></p></div><div><p class=MsoNormal>attributes by conditions being evaluated over combinations of&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>data items. Then, as a secondary activity, the RBS may be instructed<o:p></o:p></p></div><div><p class=MsoNormal>to create additional facts.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Generating facts out of Nothing is not the forte of a RBS; I don't see how<o:p></o:p></p></div><div><p class=MsoNormal>you could write rules that generate &quot;events&quot; by deriving them out of - what?<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Perhaps you could provide more background?<br><br>-W<o:p></o:p></p><div><p class=MsoNormal>On 14 January 2012 02:47, sverker &lt;<a href="mailto:sverker@abrahamsson.com">sverker@abrahamsson.com</a>&gt; wrote:<o:p></o:p></p><p class=MsoNormal>Hi<br>I have an application where I want to generate calendar events. Each event<br>will have an attached resource and people will be able to book themselves to<br>this event. The events are re-occuring in that they are on fixed time each<br>day/weekday etc, like &quot;every friday 07:00 -12:00 unless holiday&quot; or<br>something like that. The events shall be batch generated at beginning of<br>each month and put into a database. I want the rules that generate the<br>events to have some kind of DSL to be easily readable also for<br>non-technishians.<br><br>My question, would drools be a suitable tool for this task? I've been trying<br>to find examples on the above but couldn't find any.<br><span style='color:#888888'><br><span class=hoenzb>/Sverker</span><br><br><span class=hoenzb>--</span><br><span class=hoenzb>View this message in context: <a href="http://drools.46999.n3.nabble.com/Rules-for-generating-calendar-events-tp3658179p3658179.html" target="_blank">http://drools.46999.n3.nabble.com/Rules-for-generating-calendar-events-tp3658179p3658179.html</a></span><br><span class=hoenzb>Sent from the Drools: User forum mailing list archive at Nabble.com.</span><br><span class=hoenzb>_______________________________________________</span><br><span class=hoenzb>rules-users mailing list</span><br><span class=hoenzb><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a></span><br><span class=hoenzb><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span></span><o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>