Search:

Apache » Lenya
project logo
  • Project
  • Developer
  • Community
  • Version 2.2
  • Version 2.0
  • Version 1.2
  • Version 1.2
    • Installation
      • Download
      • Subversion Access
      • Install Instructions
    • Tutorial
      • Introduction
      • 1. Understanding Lenya
      • 2. Installing Lenya
      • 3. Anatomy of the Pipeline
      • 4. Editing in Lenya
      • 5. Custom Navigation in Lenya
      • 6a. Mod Proxy and Lenya
      • 6b. Mod Proxy and Lenya
    • How-To
      • FAQ
      • New Publication
      • Deploy Publication
      • Look and Feel
      • Custom Resource Type
      • Adding Mime Types
      • Site Navigation
      • LDAP Authentication
      • CMS Menus
      • CMS Screens
      • Search Publications
      • External Data
      • Unit Tests
    • Components
      • Access Control
        • Basic Terms
        • Access Controllers
        • Access Controller Resolvers
        • Authenticators
        • Authorizers
        • Policies and Policy Managers
        • Accreditable Managers
        • SSL Encryption
      • Authoring
        • Adding a new document creator
        • Image Upload
        • OpenOffice
      • Deployment
        • Proxying
      • Editors
        • HTML Form Editor
        • HTML One Form Editor
        • Bitflux Editor
        • Kupu
        • Xopus
      • Layout
        • Navigation
        • XHTML templating
        • Serving static resources
        • Lenya Menubar
      • Publication
        • PageEnvelopeModule
        • Site tree
      • Resource Types
        • Resource Types
      • Revision Control
        • Revision Controller
        • RCML
        • Check In
        • Check Out
        • Revisions
        • Rollback
      • Repository
        • WebDAV Servers
      • Search
        • Searching with Lucene
      • URI Handling
        • URI Parametrizer
        • URI Scheme
        • Usecases
      • Asset Management
        • Asset Management
      • Link Management
        • Link Management
      • Meta Data
        • Meta Data Handling
      • Multilingual Documents
        • Multilingual Document Handling
      • Tasks
        • The Task Concept
        • Defining Tasks
        • The TaskAction
        • Scheduling a Task
        • Included tasks
          • AntTask
          • DefaultFilePublisher
          • StaticHTMLExporter
          • MailTask
        • Developing Tasks
      • Workflow
        • Terms
        • The State Machine
        • Configuration
        • Implementation
      • Site Management
        • Archive
        • Copy
        • Deactivate
        • Delete
        • Delete the trash
        • Move
        • Move Up/Down
        • Rename
        • Restore
    • Miscellaneous
      • Namespaces
      • Reserved Names
      • XInclude Processor
    • 1.2 API (Javadoc)

Current Event

Meeting Bad Säckingen 2009

Built with Apache Lenya

Workflow Implementation

Table of Contents
  • Important Classes
  • Obtaining Workflow Instance and Situation Objects

Important Classes

org.apache.lenya.workflow The actual workflow API. It defines the workflow model.

  • Workflow - A workflow object describes a workflow schema.
  • WorkflowInstance - A workflow instance.
  • Situation - The environment of the workflow before the invocation of an event.

org.apache.lenya.workflow.impl A basic abstract implementation of the API.

  • WorkflowInstanceImpl - Basic implementation of a workflow instance.
  • History - The history of a workflow instance. Use a history object to restore

the state of a workflow instance.

org.apache.lenya.cms.workflow Some CMS-specific workflow implementation classes.

  • WorkflowFactory - A factory to build all workflow-related objects.
  • WorkflowDocument - A workflow instance wrapper for a CMS document.
  • CMSHistory - CMS-specific workflow instance history.
  • CMSSituation - CMS-specific environment situation.

Obtaining Workflow Instance and Situation Objects

Use the WorkflowFactory to obtain workflow-related objects:

Document document = new DefaultDocument(
        publication, pageEnvelope.getDocumentId());

WorkflowFactory factory = WorkflowFactory.newInstance();

if (factory.hasWorkflow(document)) {
            
    WorkflowInstance instance;
    Situation situation;
            
    try {
        instance = factory.buildInstance(document);
        situation = factory.buildSituation(objectModel);
    }
    catch (WorkflowException e) {
        ...
    }
      
    ...
}

Copyright © 1999-2009 The Apache Software Foundation. All rights reserved.