Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-305

Change workflow classes to Serializable (part 1)



    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8
    • Component/s: Core & storage
    • Labels:
    • Environment:



      This is a placeholder for reminding ourselves to make workflow package types Serializable. This will, at a future date, allow workflows to be serialized to disk between WikiEngine restarts.

      This particular filing ("part 1") proposes to make the following types Serializable:

      • UserProfile/DefaultUserProfile
      • UserManager.SaveUserProfileTask
      • PageManager.PreSaveWikiPageTask
      • PageManager.SaveWikiPageTask

      This filing also proposes to make the following method parameters and return types Serializable:

      • All of the types in package com.ecyrd.jspwiki.workflow, except for WorkflowManager
      • Parameters passed to Workflow.addMessageArgument(): change from Object to Serializable
      • Parameters passed to Step.addMessageArgument() and all implementations: change from Object to Serializable
      • Values returned by Workflow.getMessageArguments(): change from Object[] to Serializable[]
      • Values returned by Step.getMessageArguments() and all implementations: change from Object[] to Serializable[]

      These changes will be made for the 2.8 release cycle. Because few workflow implementations exist today, any backwards compatibility problems due to narrowing scope (from Object to Serializable) are minimal.

      Note that because of the fact that the current "page save" workflow Tasks in PageManager do not all pass Serializable objects (in particular, WikiContext which resists Serialization), certain methods must keep Object parameters and return types – for now. These are:

      • Parameters passed to Workflow.setAttribute(String,Object)
      • Parameters passed to Step.setAttribute(String,Object) and all implementations
      • Value returned by Workflow.getAttribute(String)
      • Value returned by Step.getAttribute(String) and all implementations

      In 3.0, these parameters/return types of type Object will be changed to Serializable. The issue is the lack of a proper metadata API in 2.8. Once this is fixed, we will make these changes as "part 2" of the strategy as described in JSPWIKI-304.


          Issue Links



              • Assignee:
                ajaquith Andrew R. Jaquith
                ajaquith Andrew R. Jaquith
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: