001: package org.enhydra.shark.corba;
002:
003: import javax.transaction.UserTransaction;
004:
005: import org.omg.TimeBase.*;
006: import org.omg.WfBase.*;
007: import org.omg.WorkflowModel.*;
008:
009: /**
010: * WfDataEventAuditImpl - Workflow Event Audit implementation
011: */
012: public class WfDataEventAuditCORBA extends _WfDataEventAuditImplBase {
013:
014: private org.enhydra.shark.api.client.wfmodel.WfDataEventAudit ea;
015:
016: private Collective __collective;
017:
018: protected WfDataEventAuditCORBA(Collective toJoin,
019: org.enhydra.shark.api.client.wfmodel.WfDataEventAudit ea) {
020: __collective = toJoin;
021: toJoin.__recruit(this );
022: this .ea = ea;
023: }
024:
025: public WfExecutionObject source() throws BaseException,
026: SourceNotAvailable {
027: UserTransaction ut = null;
028: boolean e = SharkCORBAServer.doesTransactionExist();
029: try {
030: ut = SharkCORBAUtilities.beginTransaction(e);
031: if (ea.source() instanceof org.enhydra.shark.api.client.wfmodel.WfProcess) {
032: WfProcess ret = new WfProcessCORBA(
033: __collective,
034: (org.enhydra.shark.api.client.wfmodel.WfProcess) ea
035: .source());
036: SharkCORBAUtilities.commitTransaction(ut, e);
037: return ret;
038: } else {
039: WfActivity ret = new WfActivityCORBA(
040: __collective,
041: (org.enhydra.shark.api.client.wfmodel.WfActivity) ea
042: .source());
043: SharkCORBAUtilities.commitTransaction(ut, e);
044: return ret;
045: }
046: } catch (org.enhydra.shark.api.client.wfmodel.SourceNotAvailable sna) {
047: SharkCORBAUtilities.rollbackTransaction(ut, e);
048: throw new SourceNotAvailable();
049: } catch (Exception ex) {
050: SharkCORBAUtilities.rollbackTransaction(ut, e);
051: throw new BaseException();
052: }
053: }
054:
055: public UtcT time_stamp() throws BaseException {
056: UserTransaction ut = null;
057: boolean e = SharkCORBAServer.doesTransactionExist();
058: try {
059: ut = SharkCORBAUtilities.beginTransaction(e);
060: org.enhydra.shark.api.client.timebase.UtcT t = ea
061: .time_stamp();
062: UtcT ret = new UtcT(t.time, t.inacclo, t.inacchi, t.tdf);
063: SharkCORBAUtilities.commitTransaction(ut, e);
064: return ret;
065: } catch (Exception ex) {
066: SharkCORBAUtilities.rollbackTransaction(ut, e);
067: throw new BaseException();
068: }
069: }
070:
071: public String event_type() throws BaseException {
072: UserTransaction ut = null;
073: boolean e = SharkCORBAServer.doesTransactionExist();
074: try {
075: ut = SharkCORBAUtilities.beginTransaction(e);
076: String ret = ea.event_type();
077: SharkCORBAUtilities.commitTransaction(ut, e);
078: return ret;
079: } catch (Exception ex) {
080: SharkCORBAUtilities.rollbackTransaction(ut, e);
081: throw new BaseException();
082: }
083: }
084:
085: public String activity_key() throws BaseException {
086: UserTransaction ut = null;
087: boolean e = SharkCORBAServer.doesTransactionExist();
088: try {
089: ut = SharkCORBAUtilities.beginTransaction(e);
090: String ret = ea.activity_key();
091: SharkCORBAUtilities.commitTransaction(ut, e);
092: return ret;
093: } catch (Exception ex) {
094: SharkCORBAUtilities.rollbackTransaction(ut, e);
095: throw new BaseException();
096: }
097: }
098:
099: public String activity_name() throws BaseException {
100: UserTransaction ut = null;
101: boolean e = SharkCORBAServer.doesTransactionExist();
102: try {
103: ut = SharkCORBAUtilities.beginTransaction(e);
104: String ret = ea.activity_name();
105: SharkCORBAUtilities.commitTransaction(ut, e);
106: return ret;
107: } catch (Exception ex) {
108: SharkCORBAUtilities.rollbackTransaction(ut, e);
109: throw new BaseException();
110: }
111: }
112:
113: public String process_key() throws BaseException {
114: UserTransaction ut = null;
115: boolean e = SharkCORBAServer.doesTransactionExist();
116: try {
117: ut = SharkCORBAUtilities.beginTransaction(e);
118: String ret = ea.process_key();
119: SharkCORBAUtilities.commitTransaction(ut, e);
120: return ret;
121: } catch (Exception ex) {
122: SharkCORBAUtilities.rollbackTransaction(ut, e);
123: throw new BaseException();
124: }
125: }
126:
127: public String process_name() throws BaseException {
128: UserTransaction ut = null;
129: boolean e = SharkCORBAServer.doesTransactionExist();
130: try {
131: ut = SharkCORBAUtilities.beginTransaction(e);
132: String ret = ea.process_name();
133: SharkCORBAUtilities.commitTransaction(ut, e);
134: return ret;
135: } catch (Exception ex) {
136: SharkCORBAUtilities.rollbackTransaction(ut, e);
137: throw new BaseException();
138: }
139: }
140:
141: public String process_mgr_name() throws BaseException {
142: UserTransaction ut = null;
143: boolean e = SharkCORBAServer.doesTransactionExist();
144: try {
145: ut = SharkCORBAUtilities.beginTransaction(e);
146: String ret = ea.process_mgr_name();
147: SharkCORBAUtilities.commitTransaction(ut, e);
148: return ret;
149: } catch (Exception ex) {
150: SharkCORBAUtilities.rollbackTransaction(ut, e);
151: throw new BaseException();
152: }
153: }
154:
155: public String process_mgr_version() throws BaseException {
156: UserTransaction ut = null;
157: boolean e = SharkCORBAServer.doesTransactionExist();
158: try {
159: ut = SharkCORBAUtilities.beginTransaction(e);
160: String ret = ea.process_mgr_version();
161: SharkCORBAUtilities.commitTransaction(ut, e);
162: return ret;
163: } catch (Exception ex) {
164: SharkCORBAUtilities.rollbackTransaction(ut, e);
165: throw new BaseException();
166: }
167: }
168:
169: public NameValue[] old_data() throws BaseException {
170: UserTransaction ut = null;
171: boolean e = SharkCORBAServer.doesTransactionExist();
172: try {
173: ut = SharkCORBAUtilities.beginTransaction(e);
174: NameValue[] ret = SharkCORBAUtilities
175: .makeCORBANameValueArray(this ._orb(), ea.old_data());
176: SharkCORBAUtilities.commitTransaction(ut, e);
177: return ret;
178: } catch (Exception ex) {
179: SharkCORBAUtilities.rollbackTransaction(ut, e);
180: throw new BaseException();
181: }
182: }
183:
184: public NameValue[] new_data() throws BaseException {
185: UserTransaction ut = null;
186: boolean e = SharkCORBAServer.doesTransactionExist();
187: try {
188: ut = SharkCORBAUtilities.beginTransaction(e);
189: NameValue[] ret = SharkCORBAUtilities
190: .makeCORBANameValueArray(this ._orb(), ea.new_data());
191: SharkCORBAUtilities.commitTransaction(ut, e);
192: return ret;
193: } catch (Exception ex) {
194: SharkCORBAUtilities.rollbackTransaction(ut, e);
195: throw new BaseException();
196: }
197: }
198:
199: }
|