org.imixs.workflow.jee.jsf.util
Class AbstractWorkflowController

java.lang.Object
  extended by org.imixs.workflow.jee.jsf.util.AbstractWorkflowController
Direct Known Subclasses:
SimpleWorkflowController

public abstract class AbstractWorkflowController
extends java.lang.Object

This Class is an abstract controller used in JSF Application A JSF Web Modul should subclass the AbstractWorkflowController for implementing a project specific Imixs Workflow BackingBean

Version:
0.0.1
Author:
rsoika

Field Summary
protected  org.imixs.workflow.util.ItemCollectionAdapter workitemAdapter
           
protected  org.imixs.workflow.ItemCollection workitemItemCollection
           
 
Constructor Summary
AbstractWorkflowController()
           
 
Method Summary
 void addMessage(java.lang.String ressourceBundleName, java.lang.String messageKey, java.lang.Object param)
          This method can be used to add a Error Messege to the Application Context during an actionListener Call.
 void doCreateWorkitem(javax.faces.event.ActionEvent event)
          This method is called by a jsf page to create a new instance of a process.
 void doCreateWorkitem(int ProcessID)
          This method is called by a jsf page to create a new instance of a process.
 void doDelete(javax.faces.event.ActionEvent event)
          this method removes the current selected worktiem from a view
 void doEdit(javax.faces.event.ActionEvent event)
          this method is called by datatables to select an workitem
 void doLoadNext(javax.faces.event.ActionEvent event)
           
 void doLoadPrev(javax.faces.event.ActionEvent event)
           
 void doProcessWorkitem(javax.faces.event.ActionEvent event)
          processes the current issue.
 void doRefresh(javax.faces.event.ActionEvent event)
          refreshes the current workitem list. so the list will be loaded again.
 void doReset(javax.faces.event.ActionEvent event)
          resets the current project list and projectMB
 void doSwitchToSearchlist(javax.faces.event.ActionEvent event)
           
 void doSwitchToWorklistAll(javax.faces.event.ActionEvent event)
           
 void doSwitchToWorklistByAuthor(javax.faces.event.ActionEvent event)
           
 void doSwitchToWorklistByCreator(javax.faces.event.ActionEvent event)
           
 void doSwitchToWorklistByOwner(javax.faces.event.ActionEvent event)
           
 void doSwitchToWorklistByWriteAccess(javax.faces.event.ActionEvent event)
           
 java.util.ArrayList<org.imixs.workflow.util.ItemCollectionAdapter> getActivities()
          returns a arrayList of Activities to the corresponidng processiD of the current Worktiem.
 org.imixs.workflow.jee.ejb.EntityService getEntityService()
          returns an instance of the EntityService EJB
 java.lang.String getID()
          returns the $uniqueID of the current workitem
 java.util.Map getItem()
           
 java.util.Map getItemList()
           
 java.util.Map getItemListArray()
           
 int getMaxSearchResult()
          returns the maximum size of a search result
 org.imixs.workflow.jee.ejb.ModelService getModelService()
          returns an instance of the ModelService EJB
 java.lang.String getModelVersion()
          returns the current ModelVersion.
 int getRow()
          Navigation
 java.lang.String getSearchQuery()
          defines the searchQuery to be use for a EQL search by the method doSwitchToSearchlist Sublcasses may overwrite this method to define individual search queries.
 int getSortOrder()
          defines the default sortOrder for finder methods
 java.util.ArrayList<org.imixs.workflow.util.ItemCollectionAdapter> getStartProcessList()
          returns a arrayList of start processes.
 java.lang.String getType()
          set the value for the attribute 'type' of a workitem to be generated or search by this controller
 java.lang.String getWorkflowResult()
          returns the last workflow result to control the navigation flow if no result is found show_worklist will be returned
 org.imixs.workflow.jee.ejb.WorkflowService getWorkflowService()
          returns an instance of the WorkflowService EJB
 org.imixs.workflow.ItemCollection getWorkitem()
           
 java.util.List<org.imixs.workflow.util.ItemCollectionAdapter> getWorkitems()
           
 boolean isEndOfList()
           
 boolean isNewWorkitem()
          indicates if a workitem was processed before by the workflowService
 void setMaxSearchResult(int searchCount)
          set the maximum size of a search result
 void setModelVersion(java.lang.String modelVersion)
           
 void setSearchQuery(java.lang.String query)
          set the current searchquery
 void setSortOrder(int sortOrder)
           
 void setType(java.lang.String type)
          defines the type attribute of a workitem to be generated or search by this controller Subclasses may overwrite the type
 void setWorkitem(org.imixs.workflow.ItemCollection aworkitem)
          updates all attributes by the supported map into the ItemCollection Diese Mehtode wird beim Klick auf einen Datensatz aufgerufen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workitemItemCollection

protected org.imixs.workflow.ItemCollection workitemItemCollection

workitemAdapter

protected org.imixs.workflow.util.ItemCollectionAdapter workitemAdapter
Constructor Detail

AbstractWorkflowController

public AbstractWorkflowController()
Method Detail

getEntityService

public org.imixs.workflow.jee.ejb.EntityService getEntityService()
returns an instance of the EntityService EJB

Returns:

getModelService

public org.imixs.workflow.jee.ejb.ModelService getModelService()
returns an instance of the ModelService EJB

Returns:

getWorkflowService

public org.imixs.workflow.jee.ejb.WorkflowService getWorkflowService()
returns an instance of the WorkflowService EJB

Returns:

getID

public java.lang.String getID()
returns the $uniqueID of the current workitem

Returns:

getType

public java.lang.String getType()
set the value for the attribute 'type' of a workitem to be generated or search by this controller


setType

public void setType(java.lang.String type)
defines the type attribute of a workitem to be generated or search by this controller Subclasses may overwrite the type

Parameters:
type -

getSortOrder

public int getSortOrder()
defines the default sortOrder for finder methods

Returns:

setSortOrder

public void setSortOrder(int sortOrder)

getModelVersion

public java.lang.String getModelVersion()
returns the current ModelVersion. If no ModelVersion is defined the method returns the latest modelversion defined

Returns:

setModelVersion

public void setModelVersion(java.lang.String modelVersion)

getMaxSearchResult

public int getMaxSearchResult()
returns the maximum size of a search result

Returns:

setMaxSearchResult

public void setMaxSearchResult(int searchCount)
set the maximum size of a search result

Parameters:
searchCount -

getSearchQuery

public java.lang.String getSearchQuery()
defines the searchQuery to be use for a EQL search by the method doSwitchToSearchlist Sublcasses may overwrite this method to define individual search queries.

Returns:

setSearchQuery

public void setSearchQuery(java.lang.String query)
set the current searchquery

Parameters:
query -

setWorkitem

public void setWorkitem(org.imixs.workflow.ItemCollection aworkitem)
updates all attributes by the supported map into the ItemCollection Diese Mehtode wird beim Klick auf einen Datensatz aufgerufen

Parameters:
ateam -

getWorkitem

public org.imixs.workflow.ItemCollection getWorkitem()

doCreateWorkitem

public void doCreateWorkitem(javax.faces.event.ActionEvent event)
                      throws java.lang.Exception
This method is called by a jsf page to create a new instance of a process. This method creates an empty worktitem The Workflow attributes ProcessID, Modelversion and WorfklowGroup will be set to the attributes of the corresponding ProcessEntity provided by param ID in the ActionEvent The Method expects an ID which identifies the ProcessID and optional a ModelVersion The ID is a String value with the following format: modelversion|processID The first Part is the modelversion for the corresponding workflowmodel the second part will be vast to an integer which corresponds to the start process id in the model. The modelversion part with the '|' is optional.

Parameters:
event -
Throws:
java.lang.Exception
See Also:
WorkitemServiceBean

doCreateWorkitem

public void doCreateWorkitem(int ProcessID)
                      throws java.lang.Exception
This method is called by a jsf page to create a new instance of a process. This method creates an empty worktitem for a defined ProcessID in the current ModelVersion. The Workflow attributes ProcessID, Modelversion and WorfklowGroup will be set to the attributes of the corresponding ProcessEntity provided by param ID in the ActionEvent

Parameters:
event -
Throws:
java.lang.Exception

doProcessWorkitem

public void doProcessWorkitem(javax.faces.event.ActionEvent event)
                       throws java.lang.Exception
processes the current issue. The method expects an parameter "id" with the activity ID which should be processed Method should be overwritten to add additional Business logic here.

Parameters:
event -
Throws:
java.lang.Exception

doEdit

public void doEdit(javax.faces.event.ActionEvent event)
this method is called by datatables to select an workitem


doDelete

public void doDelete(javax.faces.event.ActionEvent event)
              throws java.lang.Exception
this method removes the current selected worktiem from a view

Parameters:
event -
Throws:
java.lang.Exception

doReset

public void doReset(javax.faces.event.ActionEvent event)
resets the current project list and projectMB


doRefresh

public void doRefresh(javax.faces.event.ActionEvent event)
refreshes the current workitem list. so the list will be loaded again. but start pos will not be changed!


doSwitchToWorklistByAuthor

public void doSwitchToWorklistByAuthor(javax.faces.event.ActionEvent event)

doSwitchToWorklistByWriteAccess

public void doSwitchToWorklistByWriteAccess(javax.faces.event.ActionEvent event)

doSwitchToWorklistByOwner

public void doSwitchToWorklistByOwner(javax.faces.event.ActionEvent event)

doSwitchToWorklistByCreator

public void doSwitchToWorklistByCreator(javax.faces.event.ActionEvent event)

doSwitchToWorklistAll

public void doSwitchToWorklistAll(javax.faces.event.ActionEvent event)

doSwitchToSearchlist

public void doSwitchToSearchlist(javax.faces.event.ActionEvent event)

doLoadNext

public void doLoadNext(javax.faces.event.ActionEvent event)

doLoadPrev

public void doLoadPrev(javax.faces.event.ActionEvent event)

getWorkitems

public java.util.List<org.imixs.workflow.util.ItemCollectionAdapter> getWorkitems()

getRow

public int getRow()
Navigation


isEndOfList

public boolean isEndOfList()

getWorkflowResult

public java.lang.String getWorkflowResult()
returns the last workflow result to control the navigation flow if no result is found show_worklist will be returned

Returns:

getItem

public java.util.Map getItem()
                      throws java.lang.Exception
Throws:
java.lang.Exception

getItemList

public java.util.Map getItemList()
                          throws java.lang.Exception
Throws:
java.lang.Exception

getItemListArray

public java.util.Map getItemListArray()
                               throws java.lang.Exception
Throws:
java.lang.Exception

getActivities

public java.util.ArrayList<org.imixs.workflow.util.ItemCollectionAdapter> getActivities()
returns a arrayList of Activities to the corresponidng processiD of the current Worktiem. The Method returns the activities corresponding to the worktiems modelVersionID

Returns:

getStartProcessList

public java.util.ArrayList<org.imixs.workflow.util.ItemCollectionAdapter> getStartProcessList()
returns a arrayList of start processes. A Start process is the first ProcessEntity in a Process group of a model The method only lookups the processEntities once!

Returns:

isNewWorkitem

public boolean isNewWorkitem()
indicates if a workitem was processed before by the workflowService

Returns:

addMessage

public void addMessage(java.lang.String ressourceBundleName,
                       java.lang.String messageKey,
                       java.lang.Object param)
This method can be used to add a Error Messege to the Application Context during an actionListener Call. Typical this method is used in the doProcessWrktiem method to display a processing exception to the user. The method expects the Ressoruce bundle name and the message key inside the bundle.

Parameters:
ressourceBundleName -
messageKey -
param -


Copyright © 2006-2010 Imixs Software Solutions GmbH. All Rights Reserved.