xflow.server.controller
Class WorkflowProcessor

java.lang.Object
  extended byxflow.server.controller.WorkflowProcessor

public class WorkflowProcessor
extends java.lang.Object


Field Summary
static int MODE_LOCAL
           
static int MODE_SERVER
           
 
Constructor Summary
WorkflowProcessor()
           
 
Method Summary
 void abortWorkflow(java.lang.Integer wfId, java.lang.String user)
           
 void completeWorkItem(java.lang.String workflowName, int workflowVersion, java.lang.String processName, WorkItem witem)
           
 void deployModel(java.lang.String xml, java.lang.String type, java.lang.String user)
           
 java.util.List getActiveWorkflows()
           
 java.util.List getAllWorkflows()
           
static WorkflowProcessor getInstance()
           
 int getMode()
           
 java.util.List getModels()
           
 WorkItem getNextWorkItem(java.lang.String wfName, java.lang.String procName)
           
 Node getNodeByName(java.lang.String workflowName, int workflowVersion, java.lang.String nodeName)
           
 java.util.List getProcessNodes(java.lang.Integer wfId)
           
 java.lang.Object getVariable(java.lang.Integer workflowId, java.lang.String name)
           
 java.util.List getWorkflowsByName(java.lang.String name)
           
 WorkflowState getWorkflowState(java.lang.Integer wfId)
           
 WorkItem getWorkItem(java.lang.Integer wid, java.lang.String procName)
           
 java.util.List getWorkItems(java.lang.String wfName, java.lang.String procName)
           
 void resumeWorkflow(java.lang.Integer wfId)
           
 void setEventsEnabled(boolean enabled)
           
 void setMode(int mode)
           
 void setVariable(java.lang.Integer workflowId, java.lang.String name, java.lang.Object value)
           
 java.lang.Integer startWorkflow(java.lang.String workflowName, int version, WorkItem witem, java.lang.String initiator)
           
 void suspendWorkflow(java.lang.Integer wfId)
           
 boolean validateProcess(java.lang.String workflowName, int workflowVersion, java.lang.String processName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_LOCAL

public static final int MODE_LOCAL
See Also:
Constant Field Values

MODE_SERVER

public static final int MODE_SERVER
See Also:
Constant Field Values
Constructor Detail

WorkflowProcessor

public WorkflowProcessor()
Method Detail

setEventsEnabled

public void setEventsEnabled(boolean enabled)

getMode

public int getMode()

setMode

public void setMode(int mode)

getInstance

public static WorkflowProcessor getInstance()
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

deployModel

public void deployModel(java.lang.String xml,
                        java.lang.String type,
                        java.lang.String user)
                 throws XflowException
Throws:
XflowException

getModels

public java.util.List getModels()
                         throws java.sql.SQLException
Returns:
list of WorkflowModel
Throws:
java.sql.SQLException

validateProcess

public boolean validateProcess(java.lang.String workflowName,
                               int workflowVersion,
                               java.lang.String processName)
                        throws XflowException,
                               java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getProcessNodes

public java.util.List getProcessNodes(java.lang.Integer wfId)
                               throws java.sql.SQLException,
                                      XflowException
Throws:
java.sql.SQLException
XflowException

getNodeByName

public Node getNodeByName(java.lang.String workflowName,
                          int workflowVersion,
                          java.lang.String nodeName)
                   throws XflowException,
                          java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

startWorkflow

public java.lang.Integer startWorkflow(java.lang.String workflowName,
                                       int version,
                                       WorkItem witem,
                                       java.lang.String initiator)
                                throws XflowException,
                                       java.sql.SQLException,
                                       org.jaxen.JaxenException,
                                       java.io.IOException,
                                       javax.xml.parsers.ParserConfigurationException,
                                       org.xml.sax.SAXException
Throws:
XflowException
java.sql.SQLException
org.jaxen.JaxenException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

abortWorkflow

public void abortWorkflow(java.lang.Integer wfId,
                          java.lang.String user)
                   throws XflowException,
                          java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

suspendWorkflow

public void suspendWorkflow(java.lang.Integer wfId)
                     throws XflowException,
                            java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

resumeWorkflow

public void resumeWorkflow(java.lang.Integer wfId)
                    throws XflowException,
                           java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getWorkflowState

public WorkflowState getWorkflowState(java.lang.Integer wfId)
                               throws XflowException,
                                      java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

setVariable

public void setVariable(java.lang.Integer workflowId,
                        java.lang.String name,
                        java.lang.Object value)
                 throws XflowException,
                        java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getVariable

public java.lang.Object getVariable(java.lang.Integer workflowId,
                                    java.lang.String name)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

getActiveWorkflows

public java.util.List getActiveWorkflows()
                                  throws XflowException,
                                         java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getAllWorkflows

public java.util.List getAllWorkflows()
                               throws XflowException
Throws:
XflowException

getWorkflowsByName

public java.util.List getWorkflowsByName(java.lang.String name)
                                  throws XflowException,
                                         java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

completeWorkItem

public void completeWorkItem(java.lang.String workflowName,
                             int workflowVersion,
                             java.lang.String processName,
                             WorkItem witem)
                      throws XflowException,
                             java.sql.SQLException,
                             org.jaxen.JaxenException,
                             java.io.IOException,
                             javax.xml.parsers.ParserConfigurationException,
                             org.xml.sax.SAXException
Throws:
XflowException
java.sql.SQLException
org.jaxen.JaxenException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

getWorkItems

public java.util.List getWorkItems(java.lang.String wfName,
                                   java.lang.String procName)
                            throws XflowException,
                                   java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getNextWorkItem

public WorkItem getNextWorkItem(java.lang.String wfName,
                                java.lang.String procName)
                         throws XflowException,
                                java.sql.SQLException
Throws:
XflowException
java.sql.SQLException

getWorkItem

public WorkItem getWorkItem(java.lang.Integer wid,
                            java.lang.String procName)
                     throws XflowException,
                            java.sql.SQLException
Throws:
XflowException
java.sql.SQLException