SlideShare a Scribd company logo
In 1972, a crack web development team was
sent to prison by a military court for a module
they didn't commit. These men promptly
escaped from a maximum security stockade
to the php underground. Today, still wanted
by the community, they survive as soldiers of
fortune.

If you have a problem, if no other module can
help, and if you can understand it, maybe you
can use...
Tweet me, fool:
               @willhallonline




    Starring

  Will Hall
      as

b.a. baracus
Miaow.




       and

Will's cat Eliza
       as

“howling mad”
   Murdock
Rules for Fools
●   What is the Rules module?
●   What are Events, Conditions and Actions?
●   Using the Data Selector
●   Components and Scheduling
●   Looping Actions
●   Real world examples (with BA and Murdock)
●   A tank building montage(!)
I love it
when a rule
  comes
 together
What is the rules module?
●   Rules consist of Events, Conditions and Actions
●   Simply it looks for an event
●   When that event happens (under certain
    conditions)
●   It fires off an action
What is an event?
●   Events are linked to things happening on your site
●   Comment (viewed, created, deleted)
●   Node (viewed, updated, created)
●   System (cron, bootstrapped)
●   Taxonomy (create term/vocabulary)
●   User (log in/out, created, updated)
●   Extended by other modules (Profile, Feeds etc)
What is a condition?
●   Conditions check what the specifications of the
    event are
●   Data (comparison, empty)
●   Entity (field exists)
●   Content (load all fields)
●   Path (check path)
●   User (check role)
What is an Action?
●   Do something
●   Data (add variable, set value)
●   Entity (create entity, fetch entity)
●   Node (publish content, make sticky)
●   System (redirect, send email, set message)
●   User (add role)
Drupal
Causality
Because this EVENT happened,

 under these conditions, this

    action will take place.
The data selector
●   Choosing the data you want to interact with
●   Direct input mode
    –   Using tokens
        ●   [site:current-date]
        ●   [site:current-user]
        ●   [node:title]
        ●   [node:nid]
●   Data selection mode
    –   Interactive browse through tokens
What are components?
●   A set of rules/actions
●   To be used either by Rules or other modules
●   Views Bulk Operations
●   Drupal Commerce
What is scheduling rules?
●   Set your rules to be activated based on time
●   Set nodes to be unpublished 2 weeks after
    publishing
●   Disallow comments 1 year after publish date
What are looping actions?
●   Do the action for multiple items
●   Send email to all users
●   Unpublish referenced items
REAL World Examples
 with BA and Murdock

  Hey. I don't use Rules yet.
Can I use Rules to change the
      article node title to
     include the node id?
R.w.e with BA and Murdock 1
●   Go to Rules (Administration > Workflow > Rules)
●   + Add new rule
●   Name it
●   Event: Before Saving Content
●   + Add Condition
●   Content is of Type
●   Value = Article
●   + Add action
●   Set a data value
●   Data - “node:title”
●   Value - “node:title – node:nid”
●   Save
Can I use Rules to email the
 administrator when a new
   comment is created?
R.w.e with BA and Murdock 1
●   Go to Rules (Administration > Workflow > Rules)
●   + Add new rule
●   Name it
●   Event: After a comment is saved
●   (+ Add Condition) Not needed for this rule! Fool!
●   + Add action
●   Send an email to all users of a role
●   Select role - “administrator”
●   Values – Subject, Message (can include tokens)
●   Save
How can I use Rules with
Views Bulk Operations to
    unpublish nodes?
R.w.e. - BA and Murdock 3a
●   Go to Rules (Administration > Workflow > Rules)
●   Select components
●   + Add new component
●   Rule set (or action if no conditions needed)
●   Name it
●   Data type – Node
●   Label, and machine name
●   Continue...
R.w.e. - BA and Murdock 3b
●   + Add rule
●   Name rule - “Unpublish node”
●   + Add condition (if required)
●   + Add action
●   Unpublish Content
●   Data: node
R.w.e. - BA and Murdock 3c
●   Go to your view (or create a new one)
●   Add Bulk operations: content
●   Choose the required component “Unpublish nodes”
●   Save
●   It will then use the rule on all the id's you send to it!
Can Rules make me a sandwich?
Montage!
What have we covered?
●   What is the Rules module?
●   What are Events, Conditions and Actions?
●   Using the Data Selector
●   Components and Scheduling
●   Looping Actions
●   Real world examples (with BA and Murdock)
●   A tank building montage(!)
Background by Subtle Patterns
licensed under a Creative Commons
Attribution-ShareAlike 3.0 Unported License.

More Related Content

Similar to Rules for Fools: The Rules Module

Android App Development - 07 Threading
Android App Development - 07 ThreadingAndroid App Development - 07 Threading
Android App Development - 07 Threading
Diego Grancini
 
(Greach 2015) Decathlon Sport Meeting
(Greach 2015) Decathlon Sport Meeting(Greach 2015) Decathlon Sport Meeting
(Greach 2015) Decathlon Sport Meeting
Alonso Torres
 
populators&Converters
populators&Converterspopulators&Converters
populators&ConvertersSakshi Narang
 
Best Practices In Moodle Administration
Best Practices In Moodle AdministrationBest Practices In Moodle Administration
Best Practices In Moodle Administration
moorejon
 
Entities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in DrupalEntities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in Drupal
Acquia
 
Building ZingMe News Feed System
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed System
Chau Thanh
 
Drupal Rules!
Drupal Rules!Drupal Rules!
Drupal Rules!
DrupalcampAtlanta2012
 
Drupal Rules!
Drupal Rules!Drupal Rules!
Drupal Rules!
Scott Povlot
 
Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014
moorejon
 
Android Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4bAndroid Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4b
Paul Blundell
 
React more than just components
React   more than just componentsReact   more than just components
React more than just components
Chen Feldman
 
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
JS Fest 2018. Anna Herlihy. How to Write a Compass PluginJS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
JSFestUA
 
React learning in the hard way
React   learning in the hard wayReact   learning in the hard way
React learning in the hard way
Chen Feldman
 
Rules masterytraining120319
Rules masterytraining120319Rules masterytraining120319
Rules masterytraining120319
mooru
 
Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)
Benjamin Bengfort
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
Robert Nelson
 
Building zing me news feed system
Building zing me news feed systemBuilding zing me news feed system
Building zing me news feed system
AiTi Education
 
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
Dimitar Danailov
 
Break Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus MerrellBreak Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus Merrell
Sauce Labs
 
Introducing jQuery
Introducing jQueryIntroducing jQuery
Introducing jQuery
Grzegorz Ziolkowski
 

Similar to Rules for Fools: The Rules Module (20)

Android App Development - 07 Threading
Android App Development - 07 ThreadingAndroid App Development - 07 Threading
Android App Development - 07 Threading
 
(Greach 2015) Decathlon Sport Meeting
(Greach 2015) Decathlon Sport Meeting(Greach 2015) Decathlon Sport Meeting
(Greach 2015) Decathlon Sport Meeting
 
populators&Converters
populators&Converterspopulators&Converters
populators&Converters
 
Best Practices In Moodle Administration
Best Practices In Moodle AdministrationBest Practices In Moodle Administration
Best Practices In Moodle Administration
 
Entities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in DrupalEntities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in Drupal
 
Building ZingMe News Feed System
Building ZingMe News Feed SystemBuilding ZingMe News Feed System
Building ZingMe News Feed System
 
Drupal Rules!
Drupal Rules!Drupal Rules!
Drupal Rules!
 
Drupal Rules!
Drupal Rules!Drupal Rules!
Drupal Rules!
 
Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014Best practices in Moodle administration Monatana Moot 2014
Best practices in Moodle administration Monatana Moot 2014
 
Android Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4bAndroid Jam - ContentProviders - Udacity Lesson 4b
Android Jam - ContentProviders - Udacity Lesson 4b
 
React more than just components
React   more than just componentsReact   more than just components
React more than just components
 
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
JS Fest 2018. Anna Herlihy. How to Write a Compass PluginJS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
JS Fest 2018. Anna Herlihy. How to Write a Compass Plugin
 
React learning in the hard way
React   learning in the hard wayReact   learning in the hard way
React learning in the hard way
 
Rules masterytraining120319
Rules masterytraining120319Rules masterytraining120319
Rules masterytraining120319
 
Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)Building Data Products with Python (Georgetown)
Building Data Products with Python (Georgetown)
 
Puppetizing Your Organization
Puppetizing Your OrganizationPuppetizing Your Organization
Puppetizing Your Organization
 
Building zing me news feed system
Building zing me news feed systemBuilding zing me news feed system
Building zing me news feed system
 
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
 
Break Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus MerrellBreak Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus Merrell
 
Introducing jQuery
Introducing jQueryIntroducing jQuery
Introducing jQuery
 

More from Will Hall

Accelerating Infrastructure as Code with CI in AWS.
Accelerating Infrastructure as Code with CI in AWS.Accelerating Infrastructure as Code with CI in AWS.
Accelerating Infrastructure as Code with CI in AWS.
Will Hall
 
GitLab, AWS and Terraform: The Perfect Combination
GitLab, AWS and Terraform: The Perfect CombinationGitLab, AWS and Terraform: The Perfect Combination
GitLab, AWS and Terraform: The Perfect Combination
Will Hall
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab Pages
Will Hall
 
Solving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerSolving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With Docker
Will Hall
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
Will Hall
 
DevSecOps and Drupal: Securing your applications in a modern IT landscape
DevSecOps and Drupal: Securing your applications in a modern IT landscapeDevSecOps and Drupal: Securing your applications in a modern IT landscape
DevSecOps and Drupal: Securing your applications in a modern IT landscape
Will Hall
 
Docker Compose: Docker Configuration for the Real World
Docker Compose:  Docker Configuration for the Real WorldDocker Compose:  Docker Configuration for the Real World
Docker Compose: Docker Configuration for the Real World
Will Hall
 
Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers
Will Hall
 
DockerCon Copenhagen,What Happened?!
DockerCon Copenhagen,What Happened?!DockerCon Copenhagen,What Happened?!
DockerCon Copenhagen,What Happened?!
Will Hall
 
Docker DevTools: Docker as part of your development toolset
Docker DevTools: Docker as part of your development toolsetDocker DevTools: Docker as part of your development toolset
Docker DevTools: Docker as part of your development toolset
Will Hall
 
Wordpress Up and Running
Wordpress Up and RunningWordpress Up and Running
Wordpress Up and Running
Will Hall
 
Things i wish i knew about drupal commerce
Things i wish i knew about drupal commerceThings i wish i knew about drupal commerce
Things i wish i knew about drupal commerce
Will Hall
 
Upgrading migration and moving house
Upgrading migration and moving houseUpgrading migration and moving house
Upgrading migration and moving house
Will Hall
 
Drupal 7 migration
Drupal 7 migrationDrupal 7 migration
Drupal 7 migration
Will Hall
 
Migration to Drupal
Migration to DrupalMigration to Drupal
Migration to Drupal
Will Hall
 

More from Will Hall (15)

Accelerating Infrastructure as Code with CI in AWS.
Accelerating Infrastructure as Code with CI in AWS.Accelerating Infrastructure as Code with CI in AWS.
Accelerating Infrastructure as Code with CI in AWS.
 
GitLab, AWS and Terraform: The Perfect Combination
GitLab, AWS and Terraform: The Perfect CombinationGitLab, AWS and Terraform: The Perfect Combination
GitLab, AWS and Terraform: The Perfect Combination
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab Pages
 
Solving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With DockerSolving IoT Hardware Issues With Docker
Solving IoT Hardware Issues With Docker
 
Container Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and KubernetesContainer Orchestration with Docker Swarm and Kubernetes
Container Orchestration with Docker Swarm and Kubernetes
 
DevSecOps and Drupal: Securing your applications in a modern IT landscape
DevSecOps and Drupal: Securing your applications in a modern IT landscapeDevSecOps and Drupal: Securing your applications in a modern IT landscape
DevSecOps and Drupal: Securing your applications in a modern IT landscape
 
Docker Compose: Docker Configuration for the Real World
Docker Compose:  Docker Configuration for the Real WorldDocker Compose:  Docker Configuration for the Real World
Docker Compose: Docker Configuration for the Real World
 
Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers Docker Command Line, Using and Choosing containers
Docker Command Line, Using and Choosing containers
 
DockerCon Copenhagen,What Happened?!
DockerCon Copenhagen,What Happened?!DockerCon Copenhagen,What Happened?!
DockerCon Copenhagen,What Happened?!
 
Docker DevTools: Docker as part of your development toolset
Docker DevTools: Docker as part of your development toolsetDocker DevTools: Docker as part of your development toolset
Docker DevTools: Docker as part of your development toolset
 
Wordpress Up and Running
Wordpress Up and RunningWordpress Up and Running
Wordpress Up and Running
 
Things i wish i knew about drupal commerce
Things i wish i knew about drupal commerceThings i wish i knew about drupal commerce
Things i wish i knew about drupal commerce
 
Upgrading migration and moving house
Upgrading migration and moving houseUpgrading migration and moving house
Upgrading migration and moving house
 
Drupal 7 migration
Drupal 7 migrationDrupal 7 migration
Drupal 7 migration
 
Migration to Drupal
Migration to DrupalMigration to Drupal
Migration to Drupal
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Rules for Fools: The Rules Module

  • 1.
  • 2. In 1972, a crack web development team was sent to prison by a military court for a module they didn't commit. These men promptly escaped from a maximum security stockade to the php underground. Today, still wanted by the community, they survive as soldiers of fortune. If you have a problem, if no other module can help, and if you can understand it, maybe you can use...
  • 3.
  • 4.
  • 5.
  • 6. Tweet me, fool: @willhallonline Starring Will Hall as b.a. baracus
  • 7. Miaow. and Will's cat Eliza as “howling mad” Murdock
  • 8. Rules for Fools ● What is the Rules module? ● What are Events, Conditions and Actions? ● Using the Data Selector ● Components and Scheduling ● Looping Actions ● Real world examples (with BA and Murdock) ● A tank building montage(!)
  • 9. I love it when a rule comes together
  • 10. What is the rules module? ● Rules consist of Events, Conditions and Actions ● Simply it looks for an event ● When that event happens (under certain conditions) ● It fires off an action
  • 11. What is an event? ● Events are linked to things happening on your site ● Comment (viewed, created, deleted) ● Node (viewed, updated, created) ● System (cron, bootstrapped) ● Taxonomy (create term/vocabulary) ● User (log in/out, created, updated) ● Extended by other modules (Profile, Feeds etc)
  • 12. What is a condition? ● Conditions check what the specifications of the event are ● Data (comparison, empty) ● Entity (field exists) ● Content (load all fields) ● Path (check path) ● User (check role)
  • 13. What is an Action? ● Do something ● Data (add variable, set value) ● Entity (create entity, fetch entity) ● Node (publish content, make sticky) ● System (redirect, send email, set message) ● User (add role)
  • 15. Because this EVENT happened, under these conditions, this action will take place.
  • 16. The data selector ● Choosing the data you want to interact with ● Direct input mode – Using tokens ● [site:current-date] ● [site:current-user] ● [node:title] ● [node:nid] ● Data selection mode – Interactive browse through tokens
  • 17. What are components? ● A set of rules/actions ● To be used either by Rules or other modules ● Views Bulk Operations ● Drupal Commerce
  • 18. What is scheduling rules? ● Set your rules to be activated based on time ● Set nodes to be unpublished 2 weeks after publishing ● Disallow comments 1 year after publish date
  • 19. What are looping actions? ● Do the action for multiple items ● Send email to all users ● Unpublish referenced items
  • 20. REAL World Examples with BA and Murdock Hey. I don't use Rules yet.
  • 21. Can I use Rules to change the article node title to include the node id?
  • 22. R.w.e with BA and Murdock 1 ● Go to Rules (Administration > Workflow > Rules) ● + Add new rule ● Name it ● Event: Before Saving Content ● + Add Condition ● Content is of Type ● Value = Article ● + Add action ● Set a data value ● Data - “node:title” ● Value - “node:title – node:nid” ● Save
  • 23. Can I use Rules to email the administrator when a new comment is created?
  • 24. R.w.e with BA and Murdock 1 ● Go to Rules (Administration > Workflow > Rules) ● + Add new rule ● Name it ● Event: After a comment is saved ● (+ Add Condition) Not needed for this rule! Fool! ● + Add action ● Send an email to all users of a role ● Select role - “administrator” ● Values – Subject, Message (can include tokens) ● Save
  • 25. How can I use Rules with Views Bulk Operations to unpublish nodes?
  • 26. R.w.e. - BA and Murdock 3a ● Go to Rules (Administration > Workflow > Rules) ● Select components ● + Add new component ● Rule set (or action if no conditions needed) ● Name it ● Data type – Node ● Label, and machine name ● Continue...
  • 27. R.w.e. - BA and Murdock 3b ● + Add rule ● Name rule - “Unpublish node” ● + Add condition (if required) ● + Add action ● Unpublish Content ● Data: node
  • 28. R.w.e. - BA and Murdock 3c ● Go to your view (or create a new one) ● Add Bulk operations: content ● Choose the required component “Unpublish nodes” ● Save ● It will then use the rule on all the id's you send to it!
  • 29. Can Rules make me a sandwich?
  • 31. What have we covered? ● What is the Rules module? ● What are Events, Conditions and Actions? ● Using the Data Selector ● Components and Scheduling ● Looping Actions ● Real world examples (with BA and Murdock) ● A tank building montage(!)
  • 32. Background by Subtle Patterns licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.