001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.bpmscript.db;
018:
019: import org.bpmscript.IProcessInstance;
020:
021: public class DbProcessInstance extends DbIdentifiable implements
022: IProcessInstance {
023:
024: private static final long serialVersionUID = 409697594977122917L;
025:
026: private DbProcess process;
027: private byte[] continuation;
028: private DbProcessInstanceState processInstanceState;
029: private String operation;
030: private String parentProcessInstanceId;
031: private String serializedStack;
032: private String serializedThrowable;
033:
034: private StackTraceElement[] stackTraceElements;
035: private Throwable throwable;
036:
037: public byte[] getContinuation() {
038: return continuation;
039: }
040:
041: public void setContinuation(byte[] continuation) {
042: this .continuation = continuation;
043: }
044:
045: public DbProcess getProcess() {
046: return process;
047: }
048:
049: public void setProcess(DbProcess process) {
050: this .process = process;
051: }
052:
053: public DbProcessInstanceState getProcessInstanceState() {
054: return processInstanceState;
055: }
056:
057: public void setProcessInstanceState(
058: DbProcessInstanceState processInstanceState) {
059: this .processInstanceState = processInstanceState;
060: }
061:
062: public String getState() {
063: if (processInstanceState != null) {
064: return processInstanceState.getName();
065: } else {
066: return null;
067: }
068: }
069:
070: public String getOperation() {
071: return operation;
072: }
073:
074: public void setOperation(String operation) {
075: this .operation = operation;
076: }
077:
078: public String getParentProcessInstanceId() {
079: return parentProcessInstanceId;
080: }
081:
082: public void setParentProcessInstanceId(
083: String parentProcessInstanceId) {
084: this .parentProcessInstanceId = parentProcessInstanceId;
085: }
086:
087: public StackTraceElement[] getStackTraceElements() {
088: return stackTraceElements;
089: }
090:
091: public String getSerializedStack() {
092: return serializedStack;
093: }
094:
095: public void setSerializedStack(String stackTrace) {
096: this .serializedStack = stackTrace;
097: }
098:
099: public void setStackTraceElements(
100: StackTraceElement[] stackTraceElements) {
101: this .stackTraceElements = stackTraceElements;
102: }
103:
104: public Throwable getThrowable() {
105: return throwable;
106: }
107:
108: public void setThrowable(Throwable throwable) {
109: this .throwable = throwable;
110: }
111:
112: public String getSerializedThrowable() {
113: return serializedThrowable;
114: }
115:
116: public void setSerializedThrowable(String serializedThrowable) {
117: this.serializedThrowable = serializedThrowable;
118: }
119: }
|