1 package org.enhydra.shark.api.common; 2 3 import java.util.Arrays ; 4 import java.util.Collections ; 5 import java.util.List ; 6 7 12 public final class SharkConstants { 13 14 public static final String STATE_OPEN_RUNNING="open.running"; 15 public static final String STATEPREFIX_OPEN="open"; 16 public static final String STATEPREFIX_OPEN_NOT_RUNNING="open.not_running"; 17 public static final String STATE_OPEN_NOT_RUNNING_NOT_STARTED="open.not_running.not_started"; 18 public static final String STATE_OPEN_NOT_RUNNING_SUSPENDED="open.not_running.suspended"; 19 public static final String STATEPREFIX_CLOSED="closed"; 20 public static final String STATE_CLOSED_COMPLETED="closed.completed"; 21 public static final String STATE_CLOSED_TERMINATED="closed.terminated"; 22 public static final String STATE_CLOSED_ABORTED="closed.aborted"; 23 24 public static final String EVENT_PACKAGE_LOADED="packageLoaded"; 25 public static final String EVENT_PACKAGE_UNLOADED="packageUnloaded"; 26 public static final String EVENT_PACKAGE_UPDATED="packageUpdated"; 27 public static final String EVENT_PROCESS_CREATED="processCreated"; 28 public static final String EVENT_PROCESS_STATE_CHANGED="processStateChanged"; 29 public static final String EVENT_PROCESS_CONTEXT_CHANGED="processContextChanged"; 30 public static final String EVENT_ACTIVITY_STATE_CHANGED="activityStateChanged"; 31 public static final String EVENT_ACTIVITY_CONTEXT_CHANGED="activityContextChanged"; 32 public static final String EVENT_ACTIVITY_RESULT_CHANGED="activityResultChanged"; 33 public static final String EVENT_ACTIVITY_ASSIGNMENT_CHANGED="activityAssignmentChanged"; 34 35 public static final String ROOT_DIRECTORY_PATH_PROP="RootDirectoryPath"; 36 37 public static final String PROCESS__ID_NAME = "_process_"; 38 public static final String ACTIVITY_ID_NAME = "_activity_"; 39 40 public static final String UNSATISFIED_SPLIT_CONDITIONS_HANDLING_IGNORE="IGNORE"; 41 public static final String UNSATISFIED_SPLIT_CONDITIONS_HANDLING_FINISH_IF_POSSIBLE="FINISH_IF_POSSIBLE"; 42 public static final String UNSATISFIED_SPLIT_CONDITIONS_HANDLING_ROLLBACK="ROLLBACK"; 43 44 public static final String [] POSSIBLE_PROCESS_STATES = { 45 SharkConstants.STATE_OPEN_RUNNING, 46 SharkConstants.STATE_OPEN_NOT_RUNNING_NOT_STARTED, 47 SharkConstants.STATE_OPEN_NOT_RUNNING_SUSPENDED, 48 SharkConstants.STATE_CLOSED_COMPLETED, 49 SharkConstants.STATE_CLOSED_TERMINATED, 50 SharkConstants.STATE_CLOSED_ABORTED}; 51 52 public static final List possibleProcessStates = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_PROCESS_STATES)); 53 54 public static final String [] POSSIBLE_ACTIVITY_STATES = { 55 SharkConstants.STATE_OPEN_RUNNING, 56 SharkConstants.STATE_OPEN_NOT_RUNNING_NOT_STARTED, 57 SharkConstants.STATE_OPEN_NOT_RUNNING_SUSPENDED, 58 SharkConstants.STATE_CLOSED_COMPLETED, 59 SharkConstants.STATE_CLOSED_TERMINATED, 60 SharkConstants.STATE_CLOSED_ABORTED}; 61 62 public static final List possibleActivityStates=Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_ACTIVITY_STATES)); 63 64 public static final String PROCESS_STARTED_TIME="PROCESS_STARTED_TIME"; 65 public static final String ACTIVITY_ACTIVATED_TIME ="ACTIVITY_ACTIVATED_TIME"; 66 public static final String ACTIVITY_ACCEPTED_TIME="ACTIVITY_ACCEPTED_TIME"; 67 68 public static final String GRAMMAR_JAVA="text/java"; 69 public static final String GRAMMAR_JAVA_SCRIPT="text/javascript"; 70 public static final String GRAMMAR_PYTHON_SCRIPT="text/pythonscript"; 71 72 public static final String QUERY_STATE_PREFIX="QUERY_STATE_ONLY()"; 73 74 75 public static final String MGR_PACKAGE_ID="packageId"; 77 public static final String MGR_PROCESS_DEFINITION_ID="processDefinitionId"; 78 public static final String MGR_NAME="name"; 79 public static final String MGR_CATEGORY="category"; 80 public static final String MGR_CREATED_TIME_MS="createdTime_ms"; 81 public static final String MGR_VERSION="version"; 82 public static final String MGR_ENABLED="enabled"; 83 84 public static final String [] POSSIBLE_MGR_KEYS = { 85 SharkConstants.MGR_PACKAGE_ID, 86 SharkConstants.MGR_PROCESS_DEFINITION_ID, 87 SharkConstants.MGR_NAME, 88 SharkConstants.MGR_CATEGORY, 89 SharkConstants.MGR_VERSION, 90 SharkConstants.MGR_ENABLED}; 91 92 public static final List possibleMgrKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_MGR_KEYS)); 93 94 95 public static final String RES_USERNAME="username"; 97 public static final String RES_NO_OF_ASSIGNMENTS="noOfAssignments"; 98 99 public static final String [] POSSIBLE_RES_KEYS = { 100 SharkConstants.RES_USERNAME, 101 SharkConstants.RES_NO_OF_ASSIGNMENTS}; 102 103 public static final List possibleResKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_RES_KEYS)); 104 105 public static final String PROC_KEY="key"; 107 public static final String PROC_NAME="name"; 108 public static final String PROC_PRIORITY="priority"; 109 public static final String PROC_DESCRIPTION="description"; 110 public static final String PROC_STATE="state"; 111 public static final String PROC_REQUESTER_ID="requesterId"; 112 public static final String PROC_CREATED_TIME_MS="createdTime_ms"; 113 public static final String PROC_START_TIME_MS="startTime_ms"; 114 public static final String PROC_LAST_STATE_TIME_MS="lastStateTime_ms"; 115 public static final String PROC_ACTIVE_ACTIVITIES_NO="activeActivitiesNo"; 116 public static final String PROC_CONTEXT_="context_"; 117 public static final String PROC_MGR_CATEGORY = "category"; 118 public static final String PROC_MGR_VERSION = "version"; 119 public static final String PROC_MGR_PACKAGE_ID = "packageId"; 120 public static final String PROC_MGR_PROCESS_DEFINITION_ID = "processDefinitionId"; 121 public static final String PROC_MGR_ENABLED = "enabled"; 122 public static final String PROC_MGR_NAME = "mgrName"; 123 124 public static final String PROC_REQUESTER_RESOURCE="resourceRequesterId"; 125 126 public static final String [] POSSIBLE_PROC_KEYS = { 127 SharkConstants.PROC_KEY, 128 SharkConstants.PROC_NAME, 129 SharkConstants.PROC_PRIORITY, 130 SharkConstants.PROC_DESCRIPTION, 131 SharkConstants.PROC_STATE, 132 SharkConstants.PROC_REQUESTER_ID, 133 SharkConstants.PROC_START_TIME_MS, 134 SharkConstants.PROC_LAST_STATE_TIME_MS, 135 SharkConstants.PROC_ACTIVE_ACTIVITIES_NO, 136 SharkConstants.PROC_CONTEXT_}; 137 138 public static final List possibleProcKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_PROC_KEYS)); 139 140 public static final String ACT_KEY="key"; 142 public static final String ACT_NAME="name"; 143 public static final String ACT_PRIORITY="priority"; 144 public static final String ACT_DESCRIPTION="description"; 145 public static final String ACT_STATE="state"; 146 public static final String ACT_ACTIVITY_SET_DEFINITION_ID="activitySetDefinitionId"; 147 public static final String ACT_DEFINITION_ID="definitionId"; 148 public static final String ACT_ACTIVATED_TIME_MS="activatedTime_ms"; 149 public static final String ACT_LAST_STATE_TIME_MS="lastStateTime_ms"; 150 public static final String ACT_RESOURCE_USERNAME="resourceUsername"; 151 public static final String ACT_ACCEPTED="accepted"; 152 public static final String ACT_ACCEPTED_TIME_MS="acceptedTime_ms"; 153 public static final String ACT_CONTEXT_="context_"; 154 public static final String ACT_MGR_PACKAGE_ID = "packageId"; 155 public static final String ACT_MGR_PROCESS_DEFINITION_ID = "processDefinitionId"; 156 public static final String ACT_MGR_NAME = "mgrName"; 157 public static final String ACT_MGR_VERSION = "version"; 158 public static final String ACT_MGR_ENABLED = "enabled"; 159 public static final String ACT_PROC_STATE = "pState"; 160 public static final String ACT_PROC_KEY = "pId"; 161 public static final String ACT_PROC_NAME = "pName"; 162 public static final String ACT_PROC_PRIORITY = "pPriority"; 163 public static final String ACT_PROC_DESCRIPTION = "pDescription"; 164 public static final String ACT_PROC_REQUESTER_ID = "requesterId"; 165 public static final String ACT_PROC_CREATED_TIME_MS = "createdTime_ms"; 166 public static final String ACT_PROC_START_TIME_MS = "startTime_ms"; 167 public static final String ACT_PROC_LAST_STATE_TIME_MS = "pLastStateTime_ms"; 168 public static final String ACT_PROC_CONTEXT_ = "pContext_"; 169 170 public static final String [] POSSIBLE_ACT_KEYS = { 171 SharkConstants.ACT_KEY, 172 SharkConstants.ACT_NAME, 173 SharkConstants.ACT_PRIORITY, 174 SharkConstants.ACT_DESCRIPTION, 175 SharkConstants.ACT_STATE, 176 SharkConstants.ACT_ACTIVITY_SET_DEFINITION_ID, 177 SharkConstants.ACT_DEFINITION_ID, 178 SharkConstants.ACT_ACTIVATED_TIME_MS, 179 SharkConstants.ACT_LAST_STATE_TIME_MS, 180 SharkConstants.ACT_RESOURCE_USERNAME, 181 SharkConstants.ACT_ACCEPTED, 182 SharkConstants.ACT_ACCEPTED_TIME_MS, 183 SharkConstants.PROC_CONTEXT_}; 184 185 public static final List possibleActKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_ACT_KEYS)); 186 187 public static final String ASS_PROCESS_ID="processId"; 189 public static final String ASS_RESOURCE_USERNAME="resourceUsername"; 190 public static final String ASS_ACCEPTED="accepted"; 191 public static final String ASS_PACKAGE_ID="packageId"; 192 public static final String ASS_PACKAGE_VERSION="packageVersion"; 193 public static final String ASS_PROCESS_DEFINITION_ID="processDefinitionId"; 194 public static final String ASS_ACTIVITY_SET_DEFINITION_ID="activitySetDefinitionId"; 195 public static final String ASS_ACTIVITY_DEFINITION_ID="activityDefinitionId"; 196 public static final String ASS_ACTIVITY_ID="activityId"; 197 198 public static final String [] POSSIBLE_ASS_KEYS = { 199 SharkConstants.ASS_PROCESS_ID, 200 SharkConstants.ASS_RESOURCE_USERNAME, 201 SharkConstants.ASS_ACCEPTED, 202 SharkConstants.ASS_PACKAGE_ID, 203 SharkConstants.ASS_PACKAGE_VERSION, 204 SharkConstants.ASS_PROCESS_DEFINITION_ID, 205 SharkConstants.ASS_ACTIVITY_SET_DEFINITION_ID, 206 SharkConstants.ASS_ACTIVITY_DEFINITION_ID}; 207 208 public static final List possibleAssKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_ASS_KEYS)); 209 210 public static final String EA_TIME_STAMP="time_stamp"; 212 public static final String EA_EVENT_TYPE="event_type"; 213 public static final String EA_ACTIVITY_KEY="activity_key"; 214 public static final String EA_ACTIVITY_NAME="activity_name"; 215 public static final String EA_PROCESS_KEY="process_key"; 216 public static final String EA_PROCESS_NAME="process_name"; 217 public static final String EA_PROCESS_MGR_NAME="process_mgr_name"; 218 public static final String EA_PROCESS_MGR_VERSION="process_mgr_version"; 219 public static final String EA_PACKAGE_ID="package_id"; 220 public static final String EA_PROCESS_DEFINITION_ID="process_definition_id"; 221 public static final String EA_ACTIVITY_SET_DEFINITION_ID="activity_set_definition_id"; 222 public static final String EA_ACTIVITY_DEFINITION_ID="activity_definition_id"; 223 224 public static final String [] POSSIBLE_EA_KEYS = { 225 SharkConstants.EA_TIME_STAMP, 226 SharkConstants.EA_EVENT_TYPE, 227 SharkConstants.EA_ACTIVITY_KEY, 228 SharkConstants.EA_ACTIVITY_NAME, 229 SharkConstants.EA_PROCESS_KEY, 230 SharkConstants.EA_PROCESS_NAME, 231 SharkConstants.EA_PROCESS_MGR_NAME, 232 SharkConstants.EA_PROCESS_MGR_VERSION, 233 SharkConstants.EA_PACKAGE_ID, 234 SharkConstants.EA_PROCESS_DEFINITION_ID, 235 SharkConstants.EA_ACTIVITY_SET_DEFINITION_ID, 236 SharkConstants.EA_ACTIVITY_DEFINITION_ID}; 237 238 public static final List possibleEAKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_EA_KEYS)); 239 240 public static final String CEA_P_ACTIVITY_KEY="p_activity_key"; 242 public static final String CEA_P_PROCESS_KEY="p_process_key"; 243 public static final String CEA_P_PROCESS_NAME="p_process_name"; 244 public static final String CEA_P_PROCESS_MGR_NAME="p_process_mgr_name"; 245 public static final String CEA_P_PROCESS_MGR_VERSION="p_process_mgr_version"; 246 public static final String CEA_P_PACKAGE_ID="p_package_id"; 247 public static final String CEA_P_PROCESS_DEFINITION_ID="p_process_definition_id"; 248 public static final String CEA_P_ACTIVITY_SET_DEFINITION_ID="p_activity_set_definition_id"; 249 public static final String CEA_P_ACTIVITY_DEFINITION_ID="p_activity_definition_id"; 250 251 public static final String [] POSSIBLE_CEA_KEYS = { 252 SharkConstants.CEA_P_ACTIVITY_KEY, 253 SharkConstants.CEA_P_PROCESS_KEY, 254 SharkConstants.CEA_P_PROCESS_NAME, 255 SharkConstants.CEA_P_PROCESS_MGR_NAME, 256 SharkConstants.CEA_P_PROCESS_MGR_VERSION, 257 SharkConstants.CEA_P_PACKAGE_ID, 258 SharkConstants.CEA_P_PROCESS_DEFINITION_ID, 259 SharkConstants.CEA_P_ACTIVITY_SET_DEFINITION_ID, 260 SharkConstants.CEA_P_ACTIVITY_DEFINITION_ID}; 261 262 public static final List possibleCEAKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_CEA_KEYS)); 263 264 public static final String DEA_OLD_DATA_="old_data"; 266 public static final String DEA_NEW_DATA_="new_data_"; 267 268 public static final String [] POSSIBLE_DEA_KEYS = { 269 SharkConstants.DEA_OLD_DATA_, 270 SharkConstants.DEA_NEW_DATA_}; 271 272 public static final List possibleDEAKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_DEA_KEYS)); 273 274 public static final String SEA_OLD_STATE="old_state"; 276 public static final String SEA_NEW_STATE="new_state"; 277 278 public static final String [] POSSIBLE_SEA_KEYS = { 279 SharkConstants.SEA_OLD_STATE, 280 SharkConstants.SEA_NEW_STATE}; 281 282 public static final List possibleSEAKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_SEA_KEYS)); 283 284 public static final String AEA_OLD_RES="old_resource_key"; 286 public static final String AEA_NEW_RES="new_resource_key"; 287 public static final String AEA_IS_ACCEPTED="is_accepted"; 288 289 public static final String [] POSSIBLE_AEA_KEYS = { 290 SharkConstants.AEA_OLD_RES, 291 SharkConstants.AEA_NEW_RES, 292 SharkConstants.AEA_IS_ACCEPTED}; 293 294 public static final List possibleAEAKeys = Collections.unmodifiableList(Arrays.asList(SharkConstants.POSSIBLE_AEA_KEYS)); 295 296 public static final String REMOTE_SUBPROCESS_EVAL_PARAM="#REMOTE_SUBPROCESS_EVAL_PARAM#"; 297 298 } 299 300 301 302 303 | Popular Tags |