1 5 package com.opensymphony.workflow; 6 7 import com.opensymphony.module.propertyset.PropertySet; 8 9 import com.opensymphony.workflow.config.Configuration; 10 import com.opensymphony.workflow.loader.WorkflowDescriptor; 11 import com.opensymphony.workflow.query.WorkflowExpressionQuery; 12 import com.opensymphony.workflow.query.WorkflowQuery; 13 14 import java.util.List ; 15 import java.util.Map ; 16 17 18 23 public interface Workflow { 24 26 String BSF_COL = "col"; 27 String BSF_LANGUAGE = "language"; 28 String BSF_ROW = "row"; 29 String BSF_SCRIPT = "script"; 30 String BSF_SOURCE = "source"; 31 String BSH_SCRIPT = "script"; 32 33 String CLASS_NAME = "class.name"; 35 String EJB_LOCATION = "ejb.location"; 36 String JNDI_LOCATION = "jndi.location"; 37 38 40 43 public int[] getAvailableActions(long id); 44 45 51 public List getCurrentSteps(long id); 52 53 58 public int getEntryState(long id); 59 60 67 public List getHistorySteps(long id); 68 69 73 public PropertySet getPropertySet(long id); 74 75 80 public List getSecurityPermissions(long id); 81 82 86 public WorkflowDescriptor getWorkflowDescriptor(String workflowName); 87 88 92 public String getWorkflowName(long id); 93 94 100 public boolean canInitialize(String workflowName, int initialStep); 101 102 108 public boolean canModifyEntryState(long id, int newState); 109 110 118 public void changeEntryState(long id, int newState) throws WorkflowException; 119 120 129 public void doAction(long id, int actionId, Map inputs) throws InvalidInputException, WorkflowException; 130 131 137 public void executeTriggerFunction(long id, int triggerId) throws WorkflowException; 138 139 150 public long initialize(String workflowName, int initialAction, Map inputs) throws InvalidRoleException, InvalidInputException, WorkflowException, InvalidEntryStateException, InvalidActionException; 151 152 156 public List query(WorkflowQuery query) throws WorkflowException; 157 158 161 public List query(WorkflowExpressionQuery query) throws WorkflowException; 162 163 172 int[] getAvailableActions(long id, Map inputs); 173 174 179 void setConfiguration(Configuration configuration); 180 181 184 String [] getWorkflowNames(); 185 186 193 boolean canInitialize(String workflowName, int initialAction, Map inputs); 194 195 202 boolean removeWorkflowDescriptor(String workflowName) throws FactoryException; 203 204 213 boolean saveWorkflowDescriptor(String workflowName, WorkflowDescriptor descriptor, boolean replace) throws FactoryException; 214 } 215 | Popular Tags |