Author: tdraier
Date: Wed Jan 16 18:46:52 2008
New Revision: 19530

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19530&repname=
=3Djahia
Log:
-rewrite rule with domain specific language
-added rules with user properties and group

Added:
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Group.java
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsrl
Removed:
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.drl
Modified:
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/AutomationListener.java
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Service.java
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/User.java
    branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsl

Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahi=
a/services/content/automation/AutomationListener.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/automation/A=
utomationListener.java&rev=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/AutomationListener.java (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/AutomationListener.java Wed Jan 16 18:46:52 2008
@@ -60,22 +60,24 @@
             javaConf.setCompiler( JavaDialectConfiguration.JANINO );
             =

             PackageBuilder builder =3D new PackageBuilder(cfg);
-            InputStreamReader drl =3D new InputStreamReader(new FileInputS=
tream(Jahia.getSettings().getJahiaEtcDiskPath() + "/repository/rules.drl"));
-//            InputStreamReader dsl =3D new InputStreamReader(new FileInpu=
tStream(Jahia.getSettings().getJahiaEtcDiskPath() + "/repository/rules.dsl"=
));
-            builder.addPackageFromDrl(drl);
+            InputStreamReader drl =3D new InputStreamReader(new FileInputS=
tream(Jahia.getSettings().getJahiaEtcDiskPath() + "/repository/rules.dsrl")=
);
+            InputStreamReader dsl =3D new InputStreamReader(new FileInputS=
tream(Jahia.getSettings().getJahiaEtcDiskPath() + "/repository/rules.dsl"));
+            builder.addPackageFromDrl(drl,dsl);
 =

 //            builder.addRuleFlow( new InputStreamReader( getClass().getRe=
sourceAsStream( "ruleflow.rfm" ) ) );
 =

             PackageBuilderErrors errors =3D builder.getErrors();
 =

-            Package pkg =3D builder.getPackage();
-
-            RuleBaseConfiguration conf =3D new RuleBaseConfiguration();
-            //conf.setAssertBehaviour( AssertBehaviour.IDENTITY );
-            //conf.setRemoveIdentities( true );
-            ruleBase =3D RuleBaseFactory.newRuleBase( conf );
-            ruleBase.addPackage( pkg  );
-
+            if (errors.getErrors().length =3D=3D 0) {
+                Package pkg =3D builder.getPackage();
+                RuleBaseConfiguration conf =3D new RuleBaseConfiguration();
+                //conf.setAssertBehaviour( AssertBehaviour.IDENTITY );
+                //conf.setRemoveIdentities( true );
+                ruleBase =3D RuleBaseFactory.newRuleBase( conf );
+                ruleBase.addPackage( pkg  );
+            } else {
+                logger.error("Errors when compiling rules : "+errors.toStr=
ing());
+            }
         } catch (ClassNotFoundException e) {
             e.printStackTrace();  //To change body of catch statement use =
File | Settings | File Templates.
         } catch (Exception e) {
@@ -86,18 +88,22 @@
     public void onEvent(EventIterator eventIterator) {
         Map eventsMap =3D new HashMap();
 =

+        if (ruleBase =3D=3D null) {
+            return;
+        }
+
         List list =3D new ArrayList();
 =

         try {
             Session s =3D provider.getSystemSession();
             try {
-
+                String username =3D null;
                 while (eventIterator.hasNext()) {
                     Event event =3D eventIterator.nextEvent();
                     if (isExternal(event)) {
                         continue;
                     }
-
+                    username =3D event.getUserID();
                     try {
                         if (!event.getUserID().equals(JahiaLoginModule.SYS=
TEM)) {
                             if (event.getType() =3D=3D Event.NODE_ADDED) {
@@ -135,13 +141,10 @@
                     }
                 }
                 if (!list.isEmpty()) {
-                    logger.info("Executing rule for "+list);
-//                    Map map =3D new HashMap( );
-//                    map.put( "service",  Service.getInstance() );
-//                    map.put( "logger",  logger );
-//                    StatelessRuleSession srs =3D (StatelessRuleSession) =
ruleServiceProvider.getRuleRuntime() .createRuleSession(uri,map, RuleRuntim=
e.STATELESS_SESSION_TYPE);
-//                    srs.executeRules(list);
+                    list.add(new User(username));
 =

+                    logger.info("Executing rule for "+list);
+                   =

                     StatelessSession session =3D ruleBase.newStatelessSess=
ion();
                     session.setGlobal("service",  Service.getInstance());
                     session.setGlobal("logger", logger);

Added: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/s=
ervices/content/automation/Group.java
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/autom=
ation/Group.java&rev=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Group.java (added)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Group.java Wed Jan 16 18:46:52 2008
@@ -0,0 +1,44 @@
+package org.jahia.services.content.automation;
+
+import org.jahia.services.usermanager.JahiaGroup;
+import org.jahia.services.usermanager.JahiaUser;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: toto
+ * Date: 15 janv. 2008
+ * Time: 19:57:37
+ * To change this template use File | Settings | File Templates.
+ */
+public class Group {
+    private JahiaGroup group;
+
+    public Group(JahiaGroup group) {
+        this.group =3D group;
+    }
+
+    public String getName() {
+        return group.getGroupname();
+    }
+
+    public List getUsers() {
+        List r =3D new ArrayList();
+        Enumeration en =3D group.members();
+        while (en.hasMoreElements()) {
+            Principal p =3D (Principal) en.nextElement();
+            if (p instanceof JahiaUser) {
+                JahiaUser user =3D (JahiaUser)p;
+                r.add(new User(user));
+            } else {
+                JahiaGroup group =3D (JahiaGroup)p;
+            }
+
+        }
+        return r;
+    }
+}

Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahi=
a/services/content/automation/Service.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/automation/S=
ervice.java&rev=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Service.java (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/Service.java Wed Jan 16 18:46:52 2008
@@ -69,8 +69,11 @@
                 WorkingMemory memory =3D drools.getWorkingMemory();
                 for (Iterator iterator =3D m.keySet().iterator(); iterator=
.hasNext();) {
                     String s =3D (String) iterator.next();
-                    Object v =3D m.get(s);
-                    memory.insert(new ExtractedVariable(node,s,v));
+                    if (s !=3D null) {
+                        Object v =3D m.get(s);
+                        s =3D s.replace("-","_");
+                        memory.insert(new ExtractedVariable(node,s,v));
+                    }
                 }
             }
         }

Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahi=
a/services/content/automation/User.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/services/content/automation/U=
ser.java&rev=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/User.java (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/java/org/jahia/serv=
ices/content/automation/User.java Wed Jan 16 18:46:52 2008
@@ -1,11 +1,14 @@
 package org.jahia.services.content.automation;
 =

+import org.jahia.registries.ServicesRegistry;
+import org.jahia.services.usermanager.JahiaGroup;
+import org.jahia.services.usermanager.JahiaGroupManagerService;
 import org.jahia.services.usermanager.JahiaUser;
 =

 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
-import java.util.Iterator;
 =

 /**
  * Created by IntelliJ IDEA.
@@ -15,19 +18,27 @@
  * To change this template use File | Settings | File Templates.
  */
 public class User {
+    private String username;
     private JahiaUser user;
 =

     public User(JahiaUser user) {
         this.user =3D user;
     }
 =

-    public String getUsername() {
+    public User(String username) {
+        this.username =3D username;
+    }
+
+    public String getName() {
+        if (username !=3D null) {
+            return username;
+        }
         return user.getUsername();
     }
 =

     public List getProperties() {
         List r =3D new ArrayList();
-        Properties p =3D user.getProperties();
+        Properties p =3D getJahiaUser().getProperties();
         for (Iterator iterator =3D p.keySet().iterator(); iterator.hasNext=
();) {
             String s =3D (String) iterator.next();
             String v =3D p.getProperty(s);
@@ -35,4 +46,24 @@
         }
         return r;
     }
+
+    public List getGroups() {
+        List r =3D new ArrayList();
+        JahiaGroupManagerService grpManager =3D ServicesRegistry.getInstan=
ce().getJahiaGroupManagerService();
+        List groups =3D grpManager.getUserMembership(getJahiaUser());
+        for (Iterator iterator =3D groups.iterator(); iterator.hasNext();)=
 {
+            String groupname =3D (String) iterator.next();
+            JahiaGroup group =3D grpManager.lookupGroup(groupname);
+            r.add(new Group(group));
+        }
+        return r;
+    }
+
+    private JahiaUser getJahiaUser() {
+        if (user =3D=3D null) {
+            user =3D ServicesRegistry.getInstance().getJahiaUserManagerSer=
vice().lookupUser(0,username);
+        }
+        return user;
+    }
+
 }

Modified: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-IN=
F/etc/repository/rules.dsl
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-3-=
DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/repository/rules.dsl&rev=
=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsl (original)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsl Wed Jan 16 18:46:52 2008
@@ -1,10 +1,38 @@
-[when] A new file has uploaded =3D n : NodeWrapper ( )
-[when] A new file of type {mimetype} has been uploaded =3D n : NodeWrapper=
 ( mimeType matches "{mimetype}" )
-[when] A variable {name} has been extracted =3D ExtractedVariable ( name =
=3D=3D "{name}", {name} : value )
-[when] A property {name} has been set =3D p : PropertyWrapper ( name =3D=
=3D "{name}" , v : stringValue )
-
-[then] Add the type {type} to the file =3D n.addType ( "{type}", drools );
-[then] Set the property {name} to "{}"=3D insert (new PropertyWrapper(n, "=
{name}", title));
-[then] Extract the properties from the file =3D service.extractProperties(=
n, drools);
-[then] Create a thumbnail of size {size} =3D service.addThumbnail(n, {size=
});
-[then] Log "{message}" =3D logger.info("{message}");
+[when]A new node is created=3Dnode : NodeWrapper ( )
+[when]- the mimetype is {mimetype}=3DmimeType =3D=3D "{mimetype}"
+[when]- the mimetype matches {mimetype}=3DmimeType matches "{mimetype}"
+[when]- it has the extension type {type}=3Dtypes contains "{type}"
+
+[when]A variable {name} has been extracted=3DExtractedVariable ( node =3D=
=3D node, name =3D=3D "{name}", {name} : value )
+
+[when]The type {name} has been assigned to a node=3Dm : PropertyWrapper ( =
name =3D=3D "jcr:mixinTypes", stringValues contains "{name}", node : node )
+
+[when]The property {property} is not defined for the {node}=3Dnot ( Proper=
tyWrapper ( name =3D=3D "{property}" ) from {node}.properties )
+[when]A property {property} has been set on a node=3Dproperty : PropertyWr=
apper ( name =3D=3D "{property}" , propertyValue : stringValue , node : nod=
e )
+[when]The {node} has a property {property}=3Dproperty : PropertyWrapper ( =
name =3D=3D "{property}" , propertyValue : stringValue ) from {node}.proper=
ties
+
+[when]The node has a parent=3Dparent : NodeWrapper () from node.parent
+
+[when]The {node} has a child=3Dchild : NodeWrapper ( ) from node.childNodes
+[when]- the mimetype is {mimetype}=3DmimeType =3D=3D "{mimetype}"
+[when]- the mimetype matches {mimetype}=3DmimeType matches "{mimetype}"
+[when]- it has the extension type {type}=3Dtypes contains "{type}"
+
+[when]A user did this action=3Du : User ()
+[when]This user belongs to a group=3Dg : Group (groupName : name) from u.g=
roups
+[when]This user has a property named {property}=3Dp : UserProperty ( name =
=3D=3D "{property}", propertyValue : value ) from u.properties
+
+[then]Add the type {type}=3Dnode.addType ( "{type}", drools );
+
+[then]Set the property {property} of the {node} with the value of that pro=
perty=3Dinsert (new PropertyWrapper({node}, "{property}", propertyValue));
+[then]Set the property {property} of the {node} with the value of {variabl=
e}=3Dinsert (new PropertyWrapper({node}, "{property}", {variable}));
+[then]Set the property {property} of the {node} with the value "{value}"=
=3Dinsert (new PropertyWrapper({node}, "{property}", "{value}"));
+
+[then]Assign permissions "{perms}" on the {node} to this group=3Dinsert (n=
ew PropertyWrapper({node}, "j:applyAcl", "g:" + groupName + ":{perms}"));
+[then]Assign permissions "{perms}" on the {node} to a group matching that =
property=3Dinsert (new PropertyWrapper({node}, "j:applyAcl", "g:" + propert=
yValue + ":{perms}"));
+[then]Assign permissions "{perms}" on the {node} to the group {group}=3Din=
sert (new PropertyWrapper({node}, "j:applyAcl", "g:" + {group} + ":{perms}"=
));
+
+[then]Extract the properties from the file=3Dservice.extractProperties(nod=
e, drools);
+[then]Create a thumbnail of size {size}=3Dservice.addThumbnail(node, {size=
});
+
+[then]Log {message} =3D logger.info({message});

Added: branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/e=
tc/repository/rules.dsrl
URL: https://svndev.jahia.net/websvn/filedetails.php?path=3D/branches/JAHIA=
-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/repository/rules.d=
srl&rev=3D19530&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsrl (added)
+++ branches/JAHIA-5-0-3-DMS-JACKRABBIT-BRANCH/core/src/webapp/WEB-INF/etc/=
repository/rules.dsrl Wed Jan 16 18:46:52 2008
@@ -0,0 +1,140 @@
+#created on: 20 dec. 2007
+package org.jahia.services.content.automation
+
+#list any import classes here.
+import javax.jcr.observation.Event
+import org.apache.log4j.Logger
+
+expander rules.dsl
+
+#declare any global variables here
+global Service service
+global Logger logger
+
+// First match
+
+rule "Word type"
+    salience 50
+       no-loop
+       when
+               A new node is created
+             - the mimetype is application/msword
+       then
+               Log "Word type fired"
+               Add the type jmix:categorizedDocument
+end
+
+rule "Image type"
+    salience 50
+       no-loop
+       when
+               A new node is created
+             - the mimetype matches image/.*
+       then
+               Log "Image type"
+               Add the type jmix:image
+        Create a thumbnail of size 72
+end
+
+// Extract all possible data from a file when it's uploaded
+
+rule "Properties extraction"
+    when
+        A new node is created
+    then
+               Log "Properties extraction fired"
+               Extract the properties from the file
+end
+
+// These rules check if some data have been extracted, and then assign typ=
e and properties
+
+rule "Assign word properties"
+    when
+        A new node is created
+             - the mimetype is application/msword
+        A variable si_2 has been extracted
+        A variable si_3 has been extracted
+        A variable si_14 has been extracted
+        A variable si_15 has been extracted
+        A variable si_16 has been extracted
+        A variable si_18 has been extracted
+        A variable dsi_1 has been extracted
+    then
+               Log "Assign word properties fired"
+               Add the type jmix:document
+        Set the property j:title of the node with the value of si_2
+        Set the property j:subject of the node with the value of si_3
+        Set the property j:pageCount of the node with the value of si_14
+        Set the property j:wordCount of the node with the value of si_15
+        Set the property j:charCount of the node with the value of si_16
+        Set the property j:appName of the node with the value of si_18
+        Set the property j:codePage of the node with the value of dsi_1
+end
+
+rule "Assign photo properties"
+    when
+        A new node is created
+        A variable Exif_Model has been extracted
+    then
+               Log "Assign photo properties fired"
+               Add the type jmix:photo
+        Set the property j:model of the node with the value of Exif_Model
+end
+
+rule "Assign pdf properties"
+    when
+        A new node is created
+        A variable Producer has been extracted
+    then
+               Log "Assign pdf properties fired"
+               Add the type jmix:document
+        Set the property j:appName of the node with the value of Producer
+end
+
+// These 2 rules show how to take some actions based on the user properties
+
+rule "Assign acl to all my groups"
+    when
+        A new node is created
+        A user did this action
+        This user belongs to a group
+    then
+               Log "Assign acl to my group "+groupName
+               Assign permissions "rw" on the node to this group
+end
+
+rule "Assign acl to my service"
+    when
+        A new node is created
+        A user did this action
+        This user has a property named service
+    then
+               Log "Assign acl to my service"
+               Assign permissions "rw" on the node to a group matching that 
property
+end
+
+// This is an example that shows how to propagate a property to all sub fo=
lders and sub files
+// First rule copy the value from the parent when a file is uploaded / mod=
ified
+// Second rule propagates a property change to all children
+
+rule "Copy status parent value by new type"
+    when
+        The type jmix:categorizedDocument has been assigned to a node
+        The property j:status is not defined for the node
+        The node has a parent
+        The parent has a property j:status
+    then
+               Log "Copy status parent value by new type"
+        Set the property j:status of the node with the value of that prope=
rty
+end
+
+rule "Propagate status value to children"
+    when
+        A property j:status has been set on a node
+        The node has a child
+            - it has the extension type jmix:categorizedDocument
+    then
+               Log "Propagate status value to child "+child
+        Set the property j:status of the child with the value of that prop=
erty
+end
+

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to