SlideShare a Scribd company logo
1 of 30
ENHANCED WORKFLOWS IN
    CASCADE SERVER
       LEAH EINECKER
WORKFLOWS AT PCC

We love workflow!

Pages edited by subject matter experts

Content must be approved by administrator
responsible for content area

Nobody gets publish permissions -- all publishing done
by workflow
NIFTY FEATURE: WORKFLOW REPORT

Created from index block and format

This came with the system install
WORKFLOW INDEX
NIFTY FEATURE #2: APPROVER EDITS

• What if the approver wants to make a simple change to
 a page?

• The page is locked, so they can only send it to another
 step in the workflow

• Don't want to generate emails to any other user or have
 the chance that another user will jump on the file

• With the right trigger, you can send a workflow
 exclusively to yourself
APPROVER EDITS

<action identifier="approver-edits" label="Send to myself
  for edits" next-id="approver-edits" move="next_id">
    <trigger
    name="com.cms.workflow.function.preserveCurrentUser"/>
</action>
NIFTY FEATURE #3: ESCALATIONS

• Escalations - If a workflow is ignored for a set period
  of time, automatically send it to the webmaster

• This is not the same as the due-date / end-date on
  a workflow

<step type="transition" identifier="review"
label="Approver review" default-group="Administrators"
escalate-to="escalate" escalation-hours="336">
ESCALATION DETAILS
CUSTOM FEATURE: WORKFLOW EMAILS

• Our users go through a lot of workflows

• Notfication email needs more information than that
  a workflow "needs attention"
  • Need to re-edit one I submitted?
  • Approve one sent by someone else?


• Not very helpful to say that a workflow has ended
  • Do I really have to log into CMS just to see if it was
    approved or rejected?
SAMPLE EMAILS
CUSTOM WORKFLOW TRIGGERS

Create a new class:
public class EmailProvider2 extends
com.cms.workflow.function.EmailProvider


We put this class in a JAR file that contains all our
custom Java (pccCustom.jar)

Put new JAR in:
[cascade home]/tomcat/webapps/ROOT/WEB-INF/lib/
WRITING A CUSTOM TRIGGER

Calling any trigger executes:
public boolean process() throws
TriggerProviderException, FatalTriggerProviderException


Override the process() method, while allowing most
everything else to be inherited from superclass

Useful variables available inside process() method:
com.hannonhill.cascade.model.workflow.adapter.PublicWorkfl
owAdapter workflow
com.hannonhill.commons.util.string.StringMap parameters

String mode = parameters.get("mode");
ADD TRIGGER TO WORKFLOW
             DEFINITION
• Triggers are defined in the <triggers> section of
  each workflow definition
• Cannot be added in GUI workflow builder, must edit
  XML

<!-- default trigger -->
<trigger class="com.cms.workflow.function.EmailProvider"
name="EmailProvider"/>
<!-- custom trigger -->
<trigger name="email"
class="edu.pima.cascade.workflow.EmailProvider2" />
CUSTOM TRIGGER IN WORKFLOW
          DEFINITION




<trigger name="email" >
  <parameter>
           <name>mode</name>
     <value>was-approved</value>
  </parameter>
</trigger>
DEFINING EMAIL MESSAGES

• Messages are defined in a Java properties file
  • Could just as well have been text, XML, etc…


• Use placeholders for common fields like workflow
  name and generating HTML links to the CMS

• Depending on workflow step type, emails are
  targeted to workflow owner (submitter) or the group
  owning the asset
  •   Messages about approval being required go to the group
      owning the asset, but limited to the Approval role
SAMPLE EMAIL DEFINITIONS
email.needs-approval.mailApproversOnly = 1
email.needs-approval.subj = Web page needs approval - [WORKFLOW_NAME]
email.needs-approval.msg = <p>A web page or document is waiting 
   for your review and approval - [WORKFLOW_NAME]</p> 
   <p>Use the link below to access the web workflow:<br /> 
   <a href="[VIEW_WORKFLOW_URL]">View the workflow screen</a></p>



email.was-approved.subj = Web page was approved - [WORKFLOW_NAME]
email.was-approved.msg = <p>A web page or document that you 
  submitted to CMS workflow has been approved - [WORKFLOW_NAME]</p> 
  <p>Use the link below to view the document in the web content 
  management system:<br /> 
  <a href="[VIEW_ASSET_URL]">View document</a></p>
CUSTOM FEATURE: ESCALATIONS

• What if you know an approver is on vacation, and
  you don't want to wait for the escalation timeout?

• Want to be able to find and "steal" their workflows

• The webmaster should be able to take any
  workflow at any time!
ON DEMAND ESCALATIONS
ESCALATION TOOL UI

• Written in JSP

• Placed in:
• [cascade install]/tomcat/webapps/ROOT/pccCustom/wkflow

• Access at:
• https://your.cms/pccCustom/wkflow

• Putting custom components in separate directory
  for safety during upgrades
ACCESS CONTROL

LoginInformationBean login =
  (LoginInformationBean)session.getAttribute("user");

if
  (!ServiceProviderHolderBean.getServiceProvider().getRole
  Service().userHasRoleByRolename(login.getUsername(),
  "Administrator"))
{
   errMsg = "Only administrators can do that!";
}
SEARCHING WORKFLOWS FOR USER

Results powered by
com.hannonhill.cascade.model.service.WorkflowService

Must fetch both active and waiting workflows for user

List<Workflow> wkflows =
wkflowService.getActiveWorkflowsForUser(usernam
e);

wkflows.addAll(wkflowService.getWaitingWorkflow
sForUser( username));
HAVE WORKFLOW, WILL ESCALATE

WorkflowService has method to escalate all overdue
workflows, but no method to escalate just one

We will have to do the escalation ourselves!

  Find current
  step of the        Find
  workflow           escalation
                     step of            Advance
                     current step       workflow to
                                        the escalation
                                        step
AND NOW, A WORD ABOUT HIBERNATE

• By default, Hibernate uses lazy collection fetching

• If an object has an associated collection, the collection
 is retrieved from DB only when it is specifically requested

• If property is "many-to-one" in Hibernate XML config, it is
 affected unless we override lazy fetching

• The current step of a workflow is many-to-one

• As is the escalation step of a workflow step
SO WE HAVE TO MESS WITH HIBERNATE?

• We could alter the Hibernate configuration XML files
  • Set lazy="false" on chosen properties


• But this affects every workflow/step load in the
  system

• And is likely to be overwritten in an upgrade

• But it's easy to do
OR…

• Generate additional DB queries for properties as
  needed
  • How often will you manually escalate a workflow?


• No performance hit to system in general

• No modifications to existing CMS components

• This is more complicated to do!
USING JOINS

• Bean getters get lazily-initialized objects
  • workflow.getCurrentStep()
  • workflowStep.getEscalationStep()
  • By default both of these will yield LazyInitializationException!


• We can request objects with additional properties
  joined from most DAOs
  • HashSet<Join> joins = new HashSet<Join>();
    joins.add(new Join(Workflow.PROPERTY_CURRENT_STEP));
    workflow = workflowDao.get(workflowId, joins);

    step = workflow.getCurrentStep(); // success!
EXCEPT…

The Hibernate DAO for workflow steps does not
expose a way to join properties.
package edu.pima.cascade.model.dao.hibernate;
public class HibernateWorkflowStepDAO extends
com.hannonhill.cascade.model.dao.hibernate.HibernateWorkflowStepDAO
    implements WorkflowStepDAO {
        /***************************************************
         * Parent class assumes you would not want to join
         * wkflow steps.    This is probably just an oversight.
         */
        public WorkflowStep get(String id, Set<Join> joins)
        {
                //fetch() is a protected method on BaseHibernateDAO.
                return ((WorkflowStep)fetch(id, WorkflowStep.class,
                         joins));
        }
 }
ADD NEW BEAN TO CASCADE

• Spring looks for configuration files in the classpath:
  • com.hannonhill.cascade.config.spring.applicationContext*.xml


• Add a new configuration file
  • applicationContextPcc.xml
  • Not overwritten when upgrading Cascade Server
  • Want to remove all the custom components? Just remove
    the XML config file from the classpath

<bean id="pccWorkflowStepDAO" class=
"edu.pima.cascade.model.dao.hibernate.HibernateWorkflowStepDAO"
/>
FINALLY: ESCALATE THE WORKFLOW

• Since we are forcing early escalation, reset the
  "normal" escalation timeout
  escalateStep.setStartedOn(Long.valueOf(System.currentTi
  meMillis()));


• Do the actual escalation
  workflow.setCurrentStep(escalateStep);
  workflowService.save(workflow);
  workflowMgmtService.advanceWorkflow(workflow.getId(),
      "system", null, "Workflow escalation forced by
      administrator");
QUESTIONS? THANK YOU


         Leah Einecker
   Pima Community College
     leinecker@pima.edu

More Related Content

What's hot

Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSGunnar Hillert
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...SPTechCon
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootOmri Spector
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
 
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your ApplicationsThe Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your Applicationsbalassaitis
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityPaul Withers
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debuggingMaarten Smeets
 
WebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload ProtectionWebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload ProtectionJames Bayer
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)Hendrik Ebbers
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationGunnar Hillert
 
Flyway (33rd Degree)
Flyway (33rd Degree)Flyway (33rd Degree)
Flyway (33rd Degree)Axel Fontaine
 

What's hot (20)

Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
 
Spring Boot Showcase
Spring Boot ShowcaseSpring Boot Showcase
Spring Boot Showcase
 
Building a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring BootBuilding a REST Service in minutes with Spring Boot
Building a REST Service in minutes with Spring Boot
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your ApplicationsThe Grid the Brad and the Ugly: Using Grids to Improve Your Applications
The Grid the Brad and the Ugly: Using Grids to Improve Your Applications
 
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and ScalabilityIBM ConnectED 2015 - MAS103 XPages Performance and Scalability
IBM ConnectED 2015 - MAS103 XPages Performance and Scalability
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
WebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload ProtectionWebLogic Server Work Managers and Overload Protection
WebLogic Server Work Managers and Overload Protection
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)
 
JAX-WS Basics
JAX-WS BasicsJAX-WS Basics
JAX-WS Basics
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Atlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring IntegrationAtlanta JUG - Integrating Spring Batch and Spring Integration
Atlanta JUG - Integrating Spring Batch and Spring Integration
 
The Spring Update
The Spring UpdateThe Spring Update
The Spring Update
 
Flyway (33rd Degree)
Flyway (33rd Degree)Flyway (33rd Degree)
Flyway (33rd Degree)
 
Pantheon basics
Pantheon basicsPantheon basics
Pantheon basics
 

Viewers also liked

Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...
Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...
Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...hannonhill
 
Rethinking how schools work horizon report
Rethinking how schools work horizon reportRethinking how schools work horizon report
Rethinking how schools work horizon reportmeeche11e
 
Video: The State of the Solid State Drive SSD
Video: The State of the Solid State Drive SSDVideo: The State of the Solid State Drive SSD
Video: The State of the Solid State Drive SSDinside-BigData.com
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 

Viewers also liked (7)

Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...
Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...
Beyond Facebook Cascade Server User Conference Session, by James Horigan, Dig...
 
Innovation
InnovationInnovation
Innovation
 
Technical Track
Technical TrackTechnical Track
Technical Track
 
Rethinking how schools work horizon report
Rethinking how schools work horizon reportRethinking how schools work horizon report
Rethinking how schools work horizon report
 
Storage and Compute
Storage and ComputeStorage and Compute
Storage and Compute
 
Video: The State of the Solid State Drive SSD
Video: The State of the Solid State Drive SSDVideo: The State of the Solid State Drive SSD
Video: The State of the Solid State Drive SSD
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 

Similar to Enhanced Workflows in Cascade Server by Leah Einecker

Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentationIlias Okacha
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Opevel
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
Non SharePoint Deployment
Non SharePoint DeploymentNon SharePoint Deployment
Non SharePoint DeploymentSparked
 
2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQLScott Sutherland
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxdokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxAppster1
 
DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014scolestock
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance GainsVMware Tanzu
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementSharkrit JOBBO
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample applicationAnil Allewar
 

Similar to Enhanced Workflows in Cascade Server by Leah Einecker (20)

Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011Google app-engine-cloudcamplagos2011
Google app-engine-cloudcamplagos2011
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Non SharePoint Deployment
Non SharePoint DeploymentNon SharePoint Deployment
Non SharePoint Deployment
 
2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL2019 Blackhat Booth Presentation - PowerUpSQL
2019 Blackhat Booth Presentation - PowerUpSQL
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxdokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
 
DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014DevOps with Elastic Beanstalk - TCCC-2014
DevOps with Elastic Beanstalk - TCCC-2014
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample application
 

More from hannonhill

Cascade + Bootstrap = Awesome
Cascade + Bootstrap = AwesomeCascade + Bootstrap = Awesome
Cascade + Bootstrap = Awesomehannonhill
 
Web Governance Crash Course: Creating a Sustainable Digital Transformation
Web Governance Crash Course: Creating a Sustainable Digital TransformationWeb Governance Crash Course: Creating a Sustainable Digital Transformation
Web Governance Crash Course: Creating a Sustainable Digital Transformationhannonhill
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Serverhannonhill
 
Using Cascade technology to increase SEO/Landing Page Optimization
Using Cascade technology to increase SEO/Landing Page OptimizationUsing Cascade technology to increase SEO/Landing Page Optimization
Using Cascade technology to increase SEO/Landing Page Optimizationhannonhill
 
Information Architecture and User Experience: The Journey, The Destination, T...
Information Architecture and User Experience: The Journey, The Destination, T...Information Architecture and User Experience: The Journey, The Destination, T...
Information Architecture and User Experience: The Journey, The Destination, T...hannonhill
 
Connecting Ecommerce & Centralized Analytics to Cascade Server
Connecting Ecommerce & Centralized Analytics to Cascade ServerConnecting Ecommerce & Centralized Analytics to Cascade Server
Connecting Ecommerce & Centralized Analytics to Cascade Serverhannonhill
 
Data Modeling with Cascade Server and HighCharts JS
Data Modeling with Cascade Server and HighCharts JSData Modeling with Cascade Server and HighCharts JS
Data Modeling with Cascade Server and HighCharts JShannonhill
 
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...Modernizing Internal Communications with Cascade Server, WordPress and MailCh...
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...hannonhill
 
Fun with Cascade Server!
Fun with Cascade Server!Fun with Cascade Server!
Fun with Cascade Server!hannonhill
 
Accessibility in Practice: Integrating Web Accessibility into Cascade Training
Accessibility in Practice:  Integrating Web Accessibility into Cascade TrainingAccessibility in Practice:  Integrating Web Accessibility into Cascade Training
Accessibility in Practice: Integrating Web Accessibility into Cascade Traininghannonhill
 
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade Server
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade ServerCrowdsourced Maps: From Google Forms to Fusion Tables to Cascade Server
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade Serverhannonhill
 
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...hannonhill
 
Climbing Migration Mountain: 200+ Sites from the Ground Up
Climbing Migration Mountain: 200+ Sites from the Ground UpClimbing Migration Mountain: 200+ Sites from the Ground Up
Climbing Migration Mountain: 200+ Sites from the Ground Uphannonhill
 
In Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified TemplateIn Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified Templatehannonhill
 
Cusestarter or How We Built Our Own Crowdfunding Platform
Cusestarter or How We Built Our Own Crowdfunding PlatformCusestarter or How We Built Our Own Crowdfunding Platform
Cusestarter or How We Built Our Own Crowdfunding Platformhannonhill
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicityhannonhill
 
Cascade Server: Past, Present, and Future!
Cascade Server: Past, Present, and Future!Cascade Server: Past, Present, and Future!
Cascade Server: Past, Present, and Future!hannonhill
 
Web Forms, or How I Learned to Stop Worrying and Love Web Services
Web Forms, or How I Learned to Stop Worrying and Love Web ServicesWeb Forms, or How I Learned to Stop Worrying and Love Web Services
Web Forms, or How I Learned to Stop Worrying and Love Web Serviceshannonhill
 
Outputting Their Full Potential: Using Outputs for Site Redesigns and Develo...
Outputting Their Full Potential: Using Outputs for Site Redesigns andDevelo...Outputting Their Full Potential: Using Outputs for Site Redesigns andDevelo...
Outputting Their Full Potential: Using Outputs for Site Redesigns and Develo...hannonhill
 

More from hannonhill (20)

Cascade + Bootstrap = Awesome
Cascade + Bootstrap = AwesomeCascade + Bootstrap = Awesome
Cascade + Bootstrap = Awesome
 
Web Governance Crash Course: Creating a Sustainable Digital Transformation
Web Governance Crash Course: Creating a Sustainable Digital TransformationWeb Governance Crash Course: Creating a Sustainable Digital Transformation
Web Governance Crash Course: Creating a Sustainable Digital Transformation
 
Optimizing MySQL for Cascade Server
Optimizing MySQL for Cascade ServerOptimizing MySQL for Cascade Server
Optimizing MySQL for Cascade Server
 
Using Cascade technology to increase SEO/Landing Page Optimization
Using Cascade technology to increase SEO/Landing Page OptimizationUsing Cascade technology to increase SEO/Landing Page Optimization
Using Cascade technology to increase SEO/Landing Page Optimization
 
Information Architecture and User Experience: The Journey, The Destination, T...
Information Architecture and User Experience: The Journey, The Destination, T...Information Architecture and User Experience: The Journey, The Destination, T...
Information Architecture and User Experience: The Journey, The Destination, T...
 
2 Men 1 Site
2 Men 1 Site2 Men 1 Site
2 Men 1 Site
 
Connecting Ecommerce & Centralized Analytics to Cascade Server
Connecting Ecommerce & Centralized Analytics to Cascade ServerConnecting Ecommerce & Centralized Analytics to Cascade Server
Connecting Ecommerce & Centralized Analytics to Cascade Server
 
Data Modeling with Cascade Server and HighCharts JS
Data Modeling with Cascade Server and HighCharts JSData Modeling with Cascade Server and HighCharts JS
Data Modeling with Cascade Server and HighCharts JS
 
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...Modernizing Internal Communications with Cascade Server, WordPress and MailCh...
Modernizing Internal Communications with Cascade Server, WordPress and MailCh...
 
Fun with Cascade Server!
Fun with Cascade Server!Fun with Cascade Server!
Fun with Cascade Server!
 
Accessibility in Practice: Integrating Web Accessibility into Cascade Training
Accessibility in Practice:  Integrating Web Accessibility into Cascade TrainingAccessibility in Practice:  Integrating Web Accessibility into Cascade Training
Accessibility in Practice: Integrating Web Accessibility into Cascade Training
 
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade Server
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade ServerCrowdsourced Maps: From Google Forms to Fusion Tables to Cascade Server
Crowdsourced Maps: From Google Forms to Fusion Tables to Cascade Server
 
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...	Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
Superautomatic! Data Feeds, Bricks, and Blocks, with Server-side Transformat...
 
Climbing Migration Mountain: 200+ Sites from the Ground Up
Climbing Migration Mountain: 200+ Sites from the Ground UpClimbing Migration Mountain: 200+ Sites from the Ground Up
Climbing Migration Mountain: 200+ Sites from the Ground Up
 
In Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified TemplateIn Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified Template
 
Cusestarter or How We Built Our Own Crowdfunding Platform
Cusestarter or How We Built Our Own Crowdfunding PlatformCusestarter or How We Built Our Own Crowdfunding Platform
Cusestarter or How We Built Our Own Crowdfunding Platform
 
Web Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and SimplicityWeb Services: Encapsulation, Reusability, and Simplicity
Web Services: Encapsulation, Reusability, and Simplicity
 
Cascade Server: Past, Present, and Future!
Cascade Server: Past, Present, and Future!Cascade Server: Past, Present, and Future!
Cascade Server: Past, Present, and Future!
 
Web Forms, or How I Learned to Stop Worrying and Love Web Services
Web Forms, or How I Learned to Stop Worrying and Love Web ServicesWeb Forms, or How I Learned to Stop Worrying and Love Web Services
Web Forms, or How I Learned to Stop Worrying and Love Web Services
 
Outputting Their Full Potential: Using Outputs for Site Redesigns and Develo...
Outputting Their Full Potential: Using Outputs for Site Redesigns andDevelo...Outputting Their Full Potential: Using Outputs for Site Redesigns andDevelo...
Outputting Their Full Potential: Using Outputs for Site Redesigns and Develo...
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Enhanced Workflows in Cascade Server by Leah Einecker

  • 1. ENHANCED WORKFLOWS IN CASCADE SERVER LEAH EINECKER
  • 2. WORKFLOWS AT PCC We love workflow! Pages edited by subject matter experts Content must be approved by administrator responsible for content area Nobody gets publish permissions -- all publishing done by workflow
  • 3. NIFTY FEATURE: WORKFLOW REPORT Created from index block and format This came with the system install
  • 5. NIFTY FEATURE #2: APPROVER EDITS • What if the approver wants to make a simple change to a page? • The page is locked, so they can only send it to another step in the workflow • Don't want to generate emails to any other user or have the chance that another user will jump on the file • With the right trigger, you can send a workflow exclusively to yourself
  • 6. APPROVER EDITS <action identifier="approver-edits" label="Send to myself for edits" next-id="approver-edits" move="next_id"> <trigger name="com.cms.workflow.function.preserveCurrentUser"/> </action>
  • 7. NIFTY FEATURE #3: ESCALATIONS • Escalations - If a workflow is ignored for a set period of time, automatically send it to the webmaster • This is not the same as the due-date / end-date on a workflow <step type="transition" identifier="review" label="Approver review" default-group="Administrators" escalate-to="escalate" escalation-hours="336">
  • 9. CUSTOM FEATURE: WORKFLOW EMAILS • Our users go through a lot of workflows • Notfication email needs more information than that a workflow "needs attention" • Need to re-edit one I submitted? • Approve one sent by someone else? • Not very helpful to say that a workflow has ended • Do I really have to log into CMS just to see if it was approved or rejected?
  • 11. CUSTOM WORKFLOW TRIGGERS Create a new class: public class EmailProvider2 extends com.cms.workflow.function.EmailProvider We put this class in a JAR file that contains all our custom Java (pccCustom.jar) Put new JAR in: [cascade home]/tomcat/webapps/ROOT/WEB-INF/lib/
  • 12. WRITING A CUSTOM TRIGGER Calling any trigger executes: public boolean process() throws TriggerProviderException, FatalTriggerProviderException Override the process() method, while allowing most everything else to be inherited from superclass Useful variables available inside process() method: com.hannonhill.cascade.model.workflow.adapter.PublicWorkfl owAdapter workflow com.hannonhill.commons.util.string.StringMap parameters String mode = parameters.get("mode");
  • 13. ADD TRIGGER TO WORKFLOW DEFINITION • Triggers are defined in the <triggers> section of each workflow definition • Cannot be added in GUI workflow builder, must edit XML <!-- default trigger --> <trigger class="com.cms.workflow.function.EmailProvider" name="EmailProvider"/> <!-- custom trigger --> <trigger name="email" class="edu.pima.cascade.workflow.EmailProvider2" />
  • 14. CUSTOM TRIGGER IN WORKFLOW DEFINITION <trigger name="email" > <parameter> <name>mode</name> <value>was-approved</value> </parameter> </trigger>
  • 15. DEFINING EMAIL MESSAGES • Messages are defined in a Java properties file • Could just as well have been text, XML, etc… • Use placeholders for common fields like workflow name and generating HTML links to the CMS • Depending on workflow step type, emails are targeted to workflow owner (submitter) or the group owning the asset • Messages about approval being required go to the group owning the asset, but limited to the Approval role
  • 16. SAMPLE EMAIL DEFINITIONS email.needs-approval.mailApproversOnly = 1 email.needs-approval.subj = Web page needs approval - [WORKFLOW_NAME] email.needs-approval.msg = <p>A web page or document is waiting for your review and approval - [WORKFLOW_NAME]</p> <p>Use the link below to access the web workflow:<br /> <a href="[VIEW_WORKFLOW_URL]">View the workflow screen</a></p> email.was-approved.subj = Web page was approved - [WORKFLOW_NAME] email.was-approved.msg = <p>A web page or document that you submitted to CMS workflow has been approved - [WORKFLOW_NAME]</p> <p>Use the link below to view the document in the web content management system:<br /> <a href="[VIEW_ASSET_URL]">View document</a></p>
  • 17. CUSTOM FEATURE: ESCALATIONS • What if you know an approver is on vacation, and you don't want to wait for the escalation timeout? • Want to be able to find and "steal" their workflows • The webmaster should be able to take any workflow at any time!
  • 19. ESCALATION TOOL UI • Written in JSP • Placed in: • [cascade install]/tomcat/webapps/ROOT/pccCustom/wkflow • Access at: • https://your.cms/pccCustom/wkflow • Putting custom components in separate directory for safety during upgrades
  • 20. ACCESS CONTROL LoginInformationBean login = (LoginInformationBean)session.getAttribute("user"); if (!ServiceProviderHolderBean.getServiceProvider().getRole Service().userHasRoleByRolename(login.getUsername(), "Administrator")) { errMsg = "Only administrators can do that!"; }
  • 21. SEARCHING WORKFLOWS FOR USER Results powered by com.hannonhill.cascade.model.service.WorkflowService Must fetch both active and waiting workflows for user List<Workflow> wkflows = wkflowService.getActiveWorkflowsForUser(usernam e); wkflows.addAll(wkflowService.getWaitingWorkflow sForUser( username));
  • 22. HAVE WORKFLOW, WILL ESCALATE WorkflowService has method to escalate all overdue workflows, but no method to escalate just one We will have to do the escalation ourselves! Find current step of the Find workflow escalation step of Advance current step workflow to the escalation step
  • 23. AND NOW, A WORD ABOUT HIBERNATE • By default, Hibernate uses lazy collection fetching • If an object has an associated collection, the collection is retrieved from DB only when it is specifically requested • If property is "many-to-one" in Hibernate XML config, it is affected unless we override lazy fetching • The current step of a workflow is many-to-one • As is the escalation step of a workflow step
  • 24. SO WE HAVE TO MESS WITH HIBERNATE? • We could alter the Hibernate configuration XML files • Set lazy="false" on chosen properties • But this affects every workflow/step load in the system • And is likely to be overwritten in an upgrade • But it's easy to do
  • 25. OR… • Generate additional DB queries for properties as needed • How often will you manually escalate a workflow? • No performance hit to system in general • No modifications to existing CMS components • This is more complicated to do!
  • 26. USING JOINS • Bean getters get lazily-initialized objects • workflow.getCurrentStep() • workflowStep.getEscalationStep() • By default both of these will yield LazyInitializationException! • We can request objects with additional properties joined from most DAOs • HashSet<Join> joins = new HashSet<Join>(); joins.add(new Join(Workflow.PROPERTY_CURRENT_STEP)); workflow = workflowDao.get(workflowId, joins); step = workflow.getCurrentStep(); // success!
  • 27. EXCEPT… The Hibernate DAO for workflow steps does not expose a way to join properties. package edu.pima.cascade.model.dao.hibernate; public class HibernateWorkflowStepDAO extends com.hannonhill.cascade.model.dao.hibernate.HibernateWorkflowStepDAO implements WorkflowStepDAO { /*************************************************** * Parent class assumes you would not want to join * wkflow steps. This is probably just an oversight. */ public WorkflowStep get(String id, Set<Join> joins) { //fetch() is a protected method on BaseHibernateDAO. return ((WorkflowStep)fetch(id, WorkflowStep.class, joins)); } }
  • 28. ADD NEW BEAN TO CASCADE • Spring looks for configuration files in the classpath: • com.hannonhill.cascade.config.spring.applicationContext*.xml • Add a new configuration file • applicationContextPcc.xml • Not overwritten when upgrading Cascade Server • Want to remove all the custom components? Just remove the XML config file from the classpath <bean id="pccWorkflowStepDAO" class= "edu.pima.cascade.model.dao.hibernate.HibernateWorkflowStepDAO" />
  • 29. FINALLY: ESCALATE THE WORKFLOW • Since we are forcing early escalation, reset the "normal" escalation timeout escalateStep.setStartedOn(Long.valueOf(System.currentTi meMillis())); • Do the actual escalation workflow.setCurrentStep(escalateStep); workflowService.save(workflow); workflowMgmtService.advanceWorkflow(workflow.getId(), "system", null, "Workflow escalation forced by administrator");
  • 30. QUESTIONS? THANK YOU Leah Einecker Pima Community College leinecker@pima.edu