line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Siebel::Integration::Com 0.02; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
27687
|
use 5.006; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
49
|
|
4
|
1
|
|
|
1
|
|
303
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use namespace::autoclean; |
6
|
|
|
|
|
|
|
use strict; |
7
|
|
|
|
|
|
|
use warnings; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
BEGIN{ |
10
|
|
|
|
|
|
|
die print "This requires windows :-(" if $^O !~ /MSWin32/; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Win32::OLE; |
14
|
|
|
|
|
|
|
use Win32::OLE::Variant; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Siebel::Integration::Com::BusObj; |
17
|
|
|
|
|
|
|
use Siebel::Integration::Com::BusSrv; |
18
|
|
|
|
|
|
|
use Siebel::Integration::Com::PropSet; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has Error =>( |
21
|
|
|
|
|
|
|
is => 'rw', |
22
|
|
|
|
|
|
|
isa=>'Str', |
23
|
|
|
|
|
|
|
default=> '', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has ThinDLL =>( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa=>'Str', |
29
|
|
|
|
|
|
|
default=> 'SiebelDataControl.SiebelDataControl.1' |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
has ThickDLL =>( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
isa=>'Str', |
34
|
|
|
|
|
|
|
default=> 'SiebelDataServer.ApplicationObject' |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
has SApp =>( |
37
|
|
|
|
|
|
|
is => 'rw', |
38
|
|
|
|
|
|
|
); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has _ThickError =>( |
42
|
|
|
|
|
|
|
is => 'rw', |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has ConnectionType =>( |
46
|
|
|
|
|
|
|
is => 'rw', |
47
|
|
|
|
|
|
|
isa=>'Str', |
48
|
|
|
|
|
|
|
required => 1, |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
has UserName =>( |
51
|
|
|
|
|
|
|
is => 'rw', |
52
|
|
|
|
|
|
|
isa=>'Str', |
53
|
|
|
|
|
|
|
required => 1, |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
has PassWord =>( |
56
|
|
|
|
|
|
|
is => 'rw', |
57
|
|
|
|
|
|
|
isa=>'Str', |
58
|
|
|
|
|
|
|
required => 1, |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
has CFG =>( |
61
|
|
|
|
|
|
|
is => 'rw', |
62
|
|
|
|
|
|
|
isa=>'Str', |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
has DataSource =>( |
65
|
|
|
|
|
|
|
is => 'rw', |
66
|
|
|
|
|
|
|
isa=>'Str', |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
has Host =>( |
69
|
|
|
|
|
|
|
is => 'rw', |
70
|
|
|
|
|
|
|
isa=>'Str', |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
has Ent =>( |
73
|
|
|
|
|
|
|
is => 'rw', |
74
|
|
|
|
|
|
|
isa=>'Str', |
75
|
|
|
|
|
|
|
); |
76
|
|
|
|
|
|
|
has ObjMgr =>( |
77
|
|
|
|
|
|
|
is => 'rw', |
78
|
|
|
|
|
|
|
isa=>'Str', |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub BUILD{ |
82
|
|
|
|
|
|
|
#ConnectionType |
83
|
|
|
|
|
|
|
#UserName |
84
|
|
|
|
|
|
|
#PassWord |
85
|
|
|
|
|
|
|
#If Connection Type Thick |
86
|
|
|
|
|
|
|
#CFG |
87
|
|
|
|
|
|
|
#DataSource |
88
|
|
|
|
|
|
|
#If Connection Type Thin |
89
|
|
|
|
|
|
|
#Host |
90
|
|
|
|
|
|
|
#Ent |
91
|
|
|
|
|
|
|
#ObjMgr |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
my $self = shift; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
if ($self->ConnectionType eq 'Thick'){ |
96
|
|
|
|
|
|
|
if (!$self->CFG){ |
97
|
|
|
|
|
|
|
$self->Error('CFG is mandatory'); |
98
|
|
|
|
|
|
|
return 0; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
if (!$self->DataSource){ |
101
|
|
|
|
|
|
|
$self->Error('DataSource is mandatory'); |
102
|
|
|
|
|
|
|
return 0; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
$self->_ThickError(Variant(VT_I2|VT_BYREF, 0)); |
105
|
|
|
|
|
|
|
}elsif($self->ConnectionType eq 'Thin'){ |
106
|
|
|
|
|
|
|
if (!$self->Host){ |
107
|
|
|
|
|
|
|
$self->Error('Host is mandatory'); |
108
|
|
|
|
|
|
|
return 0; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
if (!$self->Ent){ |
111
|
|
|
|
|
|
|
$self->Error('Ent is mandatory'); |
112
|
|
|
|
|
|
|
return 0; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
if (!$self->ObjMgr){ |
115
|
|
|
|
|
|
|
$self->Error('ObjMgr is mandatory'); |
116
|
|
|
|
|
|
|
return 0; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
}else{ |
119
|
|
|
|
|
|
|
$self->Error('ConnectionType must be Thin or Thick'); |
120
|
|
|
|
|
|
|
return 0; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
124
|
|
|
|
|
|
|
my $sa = Win32::OLE->new($self->ThinDLL) or die "Failed to load thin DLL"; |
125
|
|
|
|
|
|
|
$self->SApp($sa); |
126
|
|
|
|
|
|
|
#"host=""siebel://hostname/EnterpriseServer/AppObjMgr""", "USER", "PASS" |
127
|
|
|
|
|
|
|
my $connection = 'host="siebel://' . $self->Host . '/' . $self->Ent . '/' . $self->ObjMgr . '"'; |
128
|
|
|
|
|
|
|
$self->SApp->Login($connection, $self->UserName, $self->PassWord); return undef if $self->_chkErr("Login"); |
129
|
|
|
|
|
|
|
}else{ |
130
|
|
|
|
|
|
|
my $sa = Win32::OLE->new($self->ThickDLL) or die "Failed to load thick DLL"; |
131
|
|
|
|
|
|
|
$self->SApp($sa); |
132
|
|
|
|
|
|
|
$self->SApp->LoadObjects($self->CFG . ',' . $self->DataSource, $self->_ThickError); return undef if $self->_chkErr("Can't load thick objects"); |
133
|
|
|
|
|
|
|
$self->SApp->Login($self->UserName, $self->PassWord, $self->_ThickError); return undef if $self->_chkErr("Login"); |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub GetBusObject{ |
141
|
|
|
|
|
|
|
my $self = shift; |
142
|
|
|
|
|
|
|
my $BOName = shift; |
143
|
|
|
|
|
|
|
return Siebel::Integration::Com::BusObj->new(Name => $BOName, ConnectionType => $self->ConnectionType, SApp => $self->SApp); |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub GetProfileAttr{ |
147
|
|
|
|
|
|
|
my $self = shift; |
148
|
|
|
|
|
|
|
my $attrName = shift; |
149
|
|
|
|
|
|
|
$self->Error(''); |
150
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
151
|
|
|
|
|
|
|
my $attrVal = $self->SApp->GetProfileAttr($attrName); return undef if $self->_chkErr("Can't get profile attrubute"); |
152
|
|
|
|
|
|
|
return $attrVal; |
153
|
|
|
|
|
|
|
}else{ |
154
|
|
|
|
|
|
|
my $attrVal = $self->SApp->GetProfileAttr($attrName, $self->_ThickError); return undef if $self->_chkErr("Can't get profile attrubute"); |
155
|
|
|
|
|
|
|
return $attrVal; |
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
sub InvokeMethod{#InvokeMethod(methodName as String, methArg1, methArg2, methArgN as String or StringArray) |
160
|
|
|
|
|
|
|
my $self = shift; |
161
|
|
|
|
|
|
|
my $methodName = shift; |
162
|
|
|
|
|
|
|
$self->Error(''); |
163
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
164
|
|
|
|
|
|
|
my $attrVal; |
165
|
|
|
|
|
|
|
if (@_){ |
166
|
|
|
|
|
|
|
if(@_ > 1){warn 'Invoke Method with more than 1 param does not work'; return 0;}; |
167
|
|
|
|
|
|
|
$attrVal = $self->SApp->InvokeMethod($methodName, @_); return undef if $self->_chkErr("Can't InvokeMethod"); |
168
|
|
|
|
|
|
|
}else{ |
169
|
|
|
|
|
|
|
#must pass an empty string if no args or error. |
170
|
|
|
|
|
|
|
$attrVal = $self->SApp->InvokeMethod($methodName, ''); return undef if $self->_chkErr("Can't InvokeMethod"); |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
return $attrVal; |
173
|
|
|
|
|
|
|
}else{ |
174
|
|
|
|
|
|
|
my $attrVal; |
175
|
|
|
|
|
|
|
if (@_){ |
176
|
|
|
|
|
|
|
if(@_ > 1){warn 'Invoke Method with more than 1 param does not work'; return 0;}; |
177
|
|
|
|
|
|
|
$attrVal = $self->SApp->InvokeMethod($methodName, @_, $self->_ThickError); return undef if $self->_chkErr("Can't InvokeMethod"); |
178
|
|
|
|
|
|
|
}else{ |
179
|
|
|
|
|
|
|
#must pass an empty string if no args or error. |
180
|
|
|
|
|
|
|
$attrVal = $self->SApp->InvokeMethod($methodName, '', $self->_ThickError); return undef if $self->_chkErr("Can't InvokeMethod"); |
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
return $attrVal; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
sub SetProfileAttr{ |
188
|
|
|
|
|
|
|
my $self = shift; |
189
|
|
|
|
|
|
|
my $attrName = shift; |
190
|
|
|
|
|
|
|
my $attrValue = shift; |
191
|
|
|
|
|
|
|
$self->Error(''); |
192
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
193
|
|
|
|
|
|
|
$self->SApp->SetProfileAttr($attrName, $attrValue); return undef if $self->_chkErr("Can't set profile attrubute"); |
194
|
|
|
|
|
|
|
}else{ |
195
|
|
|
|
|
|
|
$self->SApp->SetProfileAttr($attrName, $attrValue, $self->_ThickError); return undef if $self->_chkErr("Can't set profile attrubute"); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
return 1; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
sub GetSharedGlobal{ |
201
|
|
|
|
|
|
|
my $self = shift; |
202
|
|
|
|
|
|
|
my $attrName = shift; |
203
|
|
|
|
|
|
|
$self->Error(''); |
204
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
205
|
|
|
|
|
|
|
my $attrVal = $self->SApp->GetSharedGlobal($attrName); return undef if $self->_chkErr("Can't GetSharedGlobal"); |
206
|
|
|
|
|
|
|
return $attrVal; |
207
|
|
|
|
|
|
|
}else{ |
208
|
|
|
|
|
|
|
my $attrVal = $self->SApp->GetSharedGlobal($attrName, $self->_ThickError); return undef if $self->_chkErr("Can't GetSharedGlobal"); |
209
|
|
|
|
|
|
|
return $attrVal; |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub SetSharedGlobal{ |
214
|
|
|
|
|
|
|
my $self = shift; |
215
|
|
|
|
|
|
|
my $attrName = shift; |
216
|
|
|
|
|
|
|
my $attrValue = shift; |
217
|
|
|
|
|
|
|
$self->Error(''); |
218
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
219
|
|
|
|
|
|
|
$self->SApp->SetSharedGlobal($attrName, $attrValue); return undef if $self->_chkErr("Can't SetSharedGlobal"); |
220
|
|
|
|
|
|
|
}else{ |
221
|
|
|
|
|
|
|
$self->SApp->SetSharedGlobal($attrName, $attrValue, $self->_ThickError); return undef if $self->_chkErr("Can't SetSharedGlobal"); |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
return 1; |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
sub GetLastErrCode{ |
227
|
|
|
|
|
|
|
my $self = shift; |
228
|
|
|
|
|
|
|
$self->Error(''); |
229
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
230
|
|
|
|
|
|
|
return $self->SApp->GetLastErrCode(); |
231
|
|
|
|
|
|
|
}else{ |
232
|
|
|
|
|
|
|
return $self->SApp->GetLastErrCode($self->_ThickError); |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
sub GetLastErrText{ |
236
|
|
|
|
|
|
|
my $self = shift; |
237
|
|
|
|
|
|
|
$self->Error(''); |
238
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
239
|
|
|
|
|
|
|
return $self->SApp->GetLastErrText(); |
240
|
|
|
|
|
|
|
}else{ |
241
|
|
|
|
|
|
|
return $self->SApp->GetLastErrText($self->_ThickError); |
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub LogOff{ |
247
|
|
|
|
|
|
|
#Myabe should do cleanup?, keep list of all prop sets, bc, bo, bs created and destory at logoff? what about underlying ole objects? |
248
|
|
|
|
|
|
|
my $self = shift; |
249
|
|
|
|
|
|
|
$self->Error(''); |
250
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
251
|
|
|
|
|
|
|
$self->SApp->LogOff(); |
252
|
|
|
|
|
|
|
$self->SApp(undef); |
253
|
|
|
|
|
|
|
}else{ |
254
|
|
|
|
|
|
|
#logoff is not a valid method for thick client |
255
|
|
|
|
|
|
|
#return $self->SApp->LogOff($self->_ThickError); |
256
|
|
|
|
|
|
|
$self->SApp(undef); |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
return 1; |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub GetService{ |
262
|
|
|
|
|
|
|
my $self = shift; |
263
|
|
|
|
|
|
|
my $BSName = shift; |
264
|
|
|
|
|
|
|
$self->Error(''); |
265
|
|
|
|
|
|
|
return Siebel::Integration::Com::BusSrv->new(Name => $BSName, ConnectionType => $self->ConnectionType, SApp => $self->SApp); |
266
|
|
|
|
|
|
|
} |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub NewPropertySet{ |
269
|
|
|
|
|
|
|
my $self = shift; |
270
|
|
|
|
|
|
|
$self->Error(''); |
271
|
|
|
|
|
|
|
return Siebel::Integration::Com::PropSet->new(ConnectionType => $self->ConnectionType, SApp => $self->SApp); |
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
sub PositionName{ |
275
|
|
|
|
|
|
|
my $self = shift; |
276
|
|
|
|
|
|
|
$self->Error(''); |
277
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
278
|
|
|
|
|
|
|
return $self->SApp->PositionName(); |
279
|
|
|
|
|
|
|
}else{ |
280
|
|
|
|
|
|
|
return $self->SApp->PositionName($self->_ThickError); |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
sub PositionId{ |
284
|
|
|
|
|
|
|
my $self = shift; |
285
|
|
|
|
|
|
|
$self->Error(''); |
286
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
287
|
|
|
|
|
|
|
return $self->SApp->PositionId(); |
288
|
|
|
|
|
|
|
}else{ |
289
|
|
|
|
|
|
|
return $self->SApp->PositionId($self->_ThickError); |
290
|
|
|
|
|
|
|
} |
291
|
|
|
|
|
|
|
} |
292
|
|
|
|
|
|
|
sub LoginName{ |
293
|
|
|
|
|
|
|
my $self = shift; |
294
|
|
|
|
|
|
|
$self->Error(''); |
295
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
296
|
|
|
|
|
|
|
return $self->SApp->LoginName(); |
297
|
|
|
|
|
|
|
}else{ |
298
|
|
|
|
|
|
|
return $self->SApp->LoginName($self->_ThickError); |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
sub LoginId{ |
302
|
|
|
|
|
|
|
my $self = shift; |
303
|
|
|
|
|
|
|
$self->Error(''); |
304
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
305
|
|
|
|
|
|
|
return $self->SApp->LoginId(); |
306
|
|
|
|
|
|
|
}else{ |
307
|
|
|
|
|
|
|
return $self->SApp->LoginId($self->_ThickError); |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
} |
310
|
|
|
|
|
|
|
sub CurrencyCode{ |
311
|
|
|
|
|
|
|
my $self = shift; |
312
|
|
|
|
|
|
|
$self->Error(''); |
313
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
314
|
|
|
|
|
|
|
return $self->SApp->CurrencyCode(); |
315
|
|
|
|
|
|
|
}else{ |
316
|
|
|
|
|
|
|
return $self->SApp->CurrencyCode($self->_ThickError); |
317
|
|
|
|
|
|
|
} |
318
|
|
|
|
|
|
|
} |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
sub SetPositionId{ |
321
|
|
|
|
|
|
|
my $self = shift; |
322
|
|
|
|
|
|
|
my $posId = shift; |
323
|
|
|
|
|
|
|
$self->Error(''); |
324
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
325
|
|
|
|
|
|
|
$self->SApp->SetPositionId($posId); return undef if $self->_chkErr("Can't SetPositionId"); |
326
|
|
|
|
|
|
|
}else{ |
327
|
|
|
|
|
|
|
$self->SApp->SetPositionId($posId, $self->_ThickError); return undef if $self->_chkErr("Can't SetPositionId"); |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
return 1; |
330
|
|
|
|
|
|
|
} |
331
|
|
|
|
|
|
|
sub SetPositionName{ |
332
|
|
|
|
|
|
|
my $self = shift; |
333
|
|
|
|
|
|
|
my $posName = shift; |
334
|
|
|
|
|
|
|
$self->Error(''); |
335
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
336
|
|
|
|
|
|
|
$self->SApp->SetPositionName($posName); return undef if $self->_chkErr("Can't SetPositionName"); |
337
|
|
|
|
|
|
|
}else{ |
338
|
|
|
|
|
|
|
$self->SApp->SetPositionName($posName, $self->_ThickError); return undef if $self->_chkErr("Can't SetPositionName"); |
339
|
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
return 1; |
341
|
|
|
|
|
|
|
} |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
sub TraceOn{ |
344
|
|
|
|
|
|
|
my $self = shift; |
345
|
|
|
|
|
|
|
my $file_name = shift; |
346
|
|
|
|
|
|
|
my $trace_type = shift;#type = [Allocation/SQL] |
347
|
|
|
|
|
|
|
my $selection = shift;#Selection = [Script/OLE/All] |
348
|
|
|
|
|
|
|
$self->Error(''); |
349
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
350
|
|
|
|
|
|
|
$self->SApp->TraceOn($file_name, $trace_type, $selection); return undef if $self->_chkErr("Can't TraceOn"); |
351
|
|
|
|
|
|
|
}else{ |
352
|
|
|
|
|
|
|
$self->SApp->TraceOn($file_name, $trace_type, $selection, $self->_ThickError); return undef if $self->_chkErr("Can't TraceOn"); |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
return 1; |
355
|
|
|
|
|
|
|
} |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
sub Trace{ |
358
|
|
|
|
|
|
|
my $self = shift; |
359
|
|
|
|
|
|
|
my $message = shift; |
360
|
|
|
|
|
|
|
$self->Error(''); |
361
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
362
|
|
|
|
|
|
|
$self->SApp->Trace($message); return undef if $self->_chkErr("Can't TraceOn"); |
363
|
|
|
|
|
|
|
}else{ |
364
|
|
|
|
|
|
|
$self->SApp->Trace($message, $self->_ThickError); return undef if $self->_chkErr("Can't TraceOn"); |
365
|
|
|
|
|
|
|
} |
366
|
|
|
|
|
|
|
return 1; |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
sub TraceOff{ |
371
|
|
|
|
|
|
|
my $self = shift; |
372
|
|
|
|
|
|
|
$self->Error(''); |
373
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
374
|
|
|
|
|
|
|
$self->SApp->TraceOff(); return undef if $self->_chkErr("Can't TraceOff"); |
375
|
|
|
|
|
|
|
}else{ |
376
|
|
|
|
|
|
|
$self->SApp->TraceOff($self->_ThickError); return undef if $self->_chkErr("Can't TraceOff"); |
377
|
|
|
|
|
|
|
} |
378
|
|
|
|
|
|
|
return 1; |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
sub EnableExceptions{ |
382
|
|
|
|
|
|
|
my $self = shift; |
383
|
|
|
|
|
|
|
my $setting = shift; # 0 or 1 |
384
|
|
|
|
|
|
|
$self->Error(''); |
385
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
386
|
|
|
|
|
|
|
$self->SApp->EnableExceptions($setting); return undef if $self->_chkErr("Can't EnableExceptions"); |
387
|
|
|
|
|
|
|
}else{ |
388
|
|
|
|
|
|
|
#not available in thick client |
389
|
|
|
|
|
|
|
#$self->SApp->EnableExceptions($setting, $self->_ThickError); return undef if $self->_chkErr("Can't EnableExceptions"); |
390
|
|
|
|
|
|
|
} |
391
|
|
|
|
|
|
|
return 1; |
392
|
|
|
|
|
|
|
} |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
sub _chkErr{ |
395
|
|
|
|
|
|
|
my $self = shift; |
396
|
|
|
|
|
|
|
my $what = shift; |
397
|
|
|
|
|
|
|
my $ErrorCode; |
398
|
|
|
|
|
|
|
if($self->ConnectionType eq 'Thin'){ |
399
|
|
|
|
|
|
|
$ErrorCode = $self->SApp->GetLastErrCode(); |
400
|
|
|
|
|
|
|
}else{ |
401
|
|
|
|
|
|
|
$ErrorCode = $self->_ThickError; |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
if(($ErrorCode // 0) != 0){ |
404
|
|
|
|
|
|
|
$self->Error("[$what] " . $ErrorCode . ': ' . $self->SApp->GetLastErrText()); |
405
|
|
|
|
|
|
|
return 1; |
406
|
|
|
|
|
|
|
} |
407
|
|
|
|
|
|
|
return 0; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
412
|
|
|
|
|
|
|
1; |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
__END__ |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
=head1 NAME |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
Siebel::Integration::Com - Abstraction of Siebel Application |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
=head1 SYNOPSIS |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
use Siebel::Integration::Com; |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
my %inputs = ( |
425
|
|
|
|
|
|
|
user => 'SADMIN', |
426
|
|
|
|
|
|
|
pass => 'PASSWORD', |
427
|
|
|
|
|
|
|
ObjMgr => 'ObjMgr',#thin client only |
428
|
|
|
|
|
|
|
ent => 'MYENT',#thin client only |
429
|
|
|
|
|
|
|
host => 'MYHOSTNAME',#thin client only |
430
|
|
|
|
|
|
|
cfg => 'C:/Siebel/publicsector.cfg',#thick client only |
431
|
|
|
|
|
|
|
DataSource => 'ServerDataSrc',#thick client only |
432
|
|
|
|
|
|
|
); |
433
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
#Thin (Server) |
435
|
|
|
|
|
|
|
my $SiebelThin = Siebel::Integration::Com->new( |
436
|
|
|
|
|
|
|
ConnectionType=>'Thin', |
437
|
|
|
|
|
|
|
UserName=>$inputs{user}, |
438
|
|
|
|
|
|
|
PassWord=>$inputs{pass}, |
439
|
|
|
|
|
|
|
Host=>$inputs{host}, |
440
|
|
|
|
|
|
|
Ent=>$inputs{ent}, |
441
|
|
|
|
|
|
|
ObjMgr=>$inputs{ObjMgr} |
442
|
|
|
|
|
|
|
); |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
#Thick (Dedicated) |
445
|
|
|
|
|
|
|
my $SiebelThick = Siebel::Integration::Com->new( |
446
|
|
|
|
|
|
|
ConnectionType=>'Thick', |
447
|
|
|
|
|
|
|
UserName=>$inputs{user}, |
448
|
|
|
|
|
|
|
PassWord=>$inputs{pass}, |
449
|
|
|
|
|
|
|
CFG=>$inputs{cfg}, |
450
|
|
|
|
|
|
|
DataSource=>$inputs{DataSource} |
451
|
|
|
|
|
|
|
); |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
#get and set some basic values |
454
|
|
|
|
|
|
|
print "Prof Attr Set\n" if $SiebelApp->SetProfileAttr("Test Attr 1", "TestVal 1"); |
455
|
|
|
|
|
|
|
print 'Get Prof Attr: ' . $SiebelApp->GetProfileAttr("Test Attr 1") . "\n"; |
456
|
|
|
|
|
|
|
print 'CurrencyCode: ' . $SiebelApp->CurrencyCode() . "\n"; |
457
|
|
|
|
|
|
|
print 'LoginId: ' . $SiebelApp->LoginId() . "\n"; |
458
|
|
|
|
|
|
|
print 'LoginName: ' . $SiebelApp->LoginName() . "\n"; |
459
|
|
|
|
|
|
|
print 'PositionId: ' . $SiebelApp->PositionId() . "\n"; |
460
|
|
|
|
|
|
|
print 'PositionName: ' . $SiebelApp->PositionName() . "\n"; |
461
|
|
|
|
|
|
|
print "Shared Global Set\n" if $SiebelApp->SetSharedGlobal('COMGlobal','Set'); |
462
|
|
|
|
|
|
|
print 'GetSharedGlobal - COMGlobal: ' . $SiebelApp->GetSharedGlobal('COMGlobal') . "\n"; |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
#Query for Current user. See Siebel::Integration::Com::BusObj and Siebel::Integration::Com::BusComp for full details |
465
|
|
|
|
|
|
|
my $BO = $SiebelApp->GetBusObject('Employee'); |
466
|
|
|
|
|
|
|
my $BC = $BO->GetBusComp('Employee'); |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
$BC->ClearToQuery(); |
469
|
|
|
|
|
|
|
$BC->SetViewMode('AllView'); |
470
|
|
|
|
|
|
|
$BC->ActivateFields('First Name','Last Name','Login Name'); |
471
|
|
|
|
|
|
|
$BC->SetSearchSpec('Id', $SiebelApp->LoginId()); |
472
|
|
|
|
|
|
|
$BC->ExecuteQuery('ForwardOnly'); |
473
|
|
|
|
|
|
|
if($BC->FirstRecord()){ |
474
|
|
|
|
|
|
|
print "FName: " . $BC->GetFieldValue('First Name') . "\t"; |
475
|
|
|
|
|
|
|
print "LName: " . $BC->GetFieldValue('Last Name') . "\t"; |
476
|
|
|
|
|
|
|
print "Login: " . $BC->GetFieldValue('Login Name') . "\n"; |
477
|
|
|
|
|
|
|
}else{ |
478
|
|
|
|
|
|
|
die print "Something is wrong!"; |
479
|
|
|
|
|
|
|
} |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
#Business Service Call with Property Set. See Siebel::Integration::Com::BusSrv and Siebel::Integration::Com::PropSet for full details |
482
|
|
|
|
|
|
|
my $BS = $SiebelApp->GetService('Workflow Utilities'); |
483
|
|
|
|
|
|
|
my $PS = $SiebelApp->NewPropertySet(); |
484
|
|
|
|
|
|
|
my $PSChild = $SiebelApp->NewPropertySet(); |
485
|
|
|
|
|
|
|
my $Outputs = $SiebelApp->NewPropertySet(); |
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
$PS->SetProperty('Prop Par 1', 'Prop Par 1 Value'); |
488
|
|
|
|
|
|
|
$PS->SetType('This is a type'); |
489
|
|
|
|
|
|
|
$PS->SetValue('And this is its value'); |
490
|
|
|
|
|
|
|
$PSChild->SetProperty('Prop Child 1', 'Prop Child 1 Value'); |
491
|
|
|
|
|
|
|
$PS->AddChild($PSChild); |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
if($BS->InvokeMethod('Echo', $PS, $Outputs)){ |
494
|
|
|
|
|
|
|
print "Called BS method Echo, all OK"; |
495
|
|
|
|
|
|
|
}else{ |
496
|
|
|
|
|
|
|
print "Failed to call BS method Echo: " . $BS->Error; |
497
|
|
|
|
|
|
|
} |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
$SiebelApp->LogOff(); |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
=head1 DESCRIPTION |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
The Siebel::Integration::Com modules are designed to remove the different method calls and error checking between the COM Data Control and COM Data Server interfaces. |
505
|
|
|
|
|
|
|
Changing between the two interfaces only requires a change in the parameters to Siebel::Integration::Com->new() rather than a rewrite of all calls. |
506
|
|
|
|
|
|
|
Beyond just replicating the base functions of the interfaces it is hoped that additional methods will be added to these modules to extend the functionality provided by the Siebel COM framework. |
507
|
|
|
|
|
|
|
|
508
|
|
|
|
|
|
|
All methods that have been exposed keep the same names so there is no additional learning curve, you can program in Perl using the same method names as eScript |
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
COM Data Control uses the Siebel server (the server must be up and running). This is considered a thin client connection |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
COM Data Server does not require the Siebel server as it uses the local machine to do the work. This is considered a thick client connection |
513
|
|
|
|
|
|
|
|
514
|
|
|
|
|
|
|
=head2 Base Methods |
515
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
=over 8 |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
=item New(%inputs) |
519
|
|
|
|
|
|
|
|
520
|
|
|
|
|
|
|
my %inputs = ( |
521
|
|
|
|
|
|
|
user => 'SADMIN', |
522
|
|
|
|
|
|
|
pass => 'PASSWORD', |
523
|
|
|
|
|
|
|
ObjMgr => 'ObjMgr',#thin client only |
524
|
|
|
|
|
|
|
ent => 'MYENT',#thin client only |
525
|
|
|
|
|
|
|
host => 'MYHOSTNAME',#thin client only |
526
|
|
|
|
|
|
|
cfg => 'C:/Siebel/publicsector.cfg',#thick client only |
527
|
|
|
|
|
|
|
DataSource => 'ServerDataSrc',#thick client only |
528
|
|
|
|
|
|
|
); |
529
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
#Thin Client Connection |
531
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
my $SiebelThin = Siebel::Integration::Com->new( |
533
|
|
|
|
|
|
|
ConnectionType=>'Thin', |
534
|
|
|
|
|
|
|
UserName=>$inputs{user}, |
535
|
|
|
|
|
|
|
PassWord=>$inputs{pass}, |
536
|
|
|
|
|
|
|
Host=>$inputs{host}, |
537
|
|
|
|
|
|
|
Ent=>$inputs{ent}, |
538
|
|
|
|
|
|
|
ObjMgr=>$inputs{ObjMgr} |
539
|
|
|
|
|
|
|
); |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
#Thick Client Connection |
542
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
my $SiebelThick = Siebel::Integration::Com->new( |
544
|
|
|
|
|
|
|
ConnectionType=>'Thick', |
545
|
|
|
|
|
|
|
UserName=>$inputs{user}, |
546
|
|
|
|
|
|
|
PassWord=>$inputs{pass}, |
547
|
|
|
|
|
|
|
CFG=>$inputs{cfg}, |
548
|
|
|
|
|
|
|
DataSource=>$inputs{DataSource} |
549
|
|
|
|
|
|
|
); |
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
Sets SAPP->Error if an error occurs |
552
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
=item SAPP->Error |
554
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
Returns the error text for the last operation, returns '' if no error. |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
=item SAPP->GetProfileAttr(Name) |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
Returns the value of the profile attribute. Using an attribute name that does not exist will return '' |
560
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
=item SAPP->SetProfileAttr(Name, Value) |
563
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
Creates or updates a profile attribute |
565
|
|
|
|
|
|
|
Returns 1 for success |
566
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
=item SAPP->LogOff |
569
|
|
|
|
|
|
|
|
570
|
|
|
|
|
|
|
Only the Thin client actually supports this as a method. Calling this will log off if connection type is Thin and undef the Siebel App OLE for both Thin and Thick clients. |
571
|
|
|
|
|
|
|
|
572
|
|
|
|
|
|
|
=item SAPP->GetBusObject(Name) |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
Returns a Siebel::Integration::Com::BusObj Object |
575
|
|
|
|
|
|
|
Failure to create will set Siebel::Integration::Com::BusObj->Error |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
=item SAPP->GetService(Name) |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
Returns a Siebel::Integration::Com::BusSrv Object |
580
|
|
|
|
|
|
|
Failure to create will set Siebel::Integration::Com::BusSrv->Error |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
=item SAPP->NewPropertySet |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
Returns a Siebel::Integration::Com::PropSet Object |
585
|
|
|
|
|
|
|
Failure to create will set Siebel::Integration::Com::PropSet->Error |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
=item SAPP->GetSharedGlobal(Name) |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
Returns the value of the shared global. Using a shared global name that does not exist will return '' |
590
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
591
|
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
=item SAPP->SetSharedGlobal(Name, Value) |
593
|
|
|
|
|
|
|
|
594
|
|
|
|
|
|
|
Creates or updates a shared global |
595
|
|
|
|
|
|
|
Returns 1 for success |
596
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
=item SAPP->CurrencyCode |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
Returns the currency code that is associated with the division of the user position |
601
|
|
|
|
|
|
|
|
602
|
|
|
|
|
|
|
=item SAPP->LoginId |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
Returns the login Id of the user who started the Siebel application |
605
|
|
|
|
|
|
|
|
606
|
|
|
|
|
|
|
=item SAPP->LoginName |
607
|
|
|
|
|
|
|
|
608
|
|
|
|
|
|
|
Returns the login name of the user who started the Siebel application |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
=item SAPP->PositionId |
611
|
|
|
|
|
|
|
|
612
|
|
|
|
|
|
|
Returns the position Id of the user position |
613
|
|
|
|
|
|
|
|
614
|
|
|
|
|
|
|
=item SAPP->PositionName |
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
Returns the name of the current user position |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
=item SAPP->SetPositionId(sPosId) |
619
|
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
Sets the active position to a Position Id |
621
|
|
|
|
|
|
|
Returns 1 for success |
622
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
=item SAPP->SetPositionName(sPosName) |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
Sets the active position to a position name |
627
|
|
|
|
|
|
|
Returns 1 for success |
628
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
629
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
=item SAPP->InvokeMethod(MethodName, Arg1, Arg2, ArgN) |
631
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
B<See Bugs> |
633
|
|
|
|
|
|
|
Currently this only allows for 0 or 1 argument to be passed. I have not yet worked out if this is due to me or a fault in the DLL. |
634
|
|
|
|
|
|
|
Invokes a method on the application object |
635
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
=item SAPP->EnableExceptions(true/false) |
637
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
Only in thin client: Enables or disables native COM error handling. Acepts 0 or 1. If using the thick client this call is supressed |
639
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
=item SAPP->TraceOff |
641
|
|
|
|
|
|
|
|
642
|
|
|
|
|
|
|
Turns tracing off |
643
|
|
|
|
|
|
|
Returns 1 for success |
644
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
=item SAPP->TraceOn(FileName, Type, Selection) |
647
|
|
|
|
|
|
|
|
648
|
|
|
|
|
|
|
Starts appliaction tracing |
649
|
|
|
|
|
|
|
FileName: Output filename |
650
|
|
|
|
|
|
|
Type: [Allocation/SQL] |
651
|
|
|
|
|
|
|
Allocation: Traces allocations and deallocations of Siebel objects |
652
|
|
|
|
|
|
|
SQL: Traces SQL statements |
653
|
|
|
|
|
|
|
Selection: [Script/OLE/All] |
654
|
|
|
|
|
|
|
Script: Traces Siebel VB and Siebel eScript objects. |
655
|
|
|
|
|
|
|
OLE: Traces allocations for data server or automation server programs. |
656
|
|
|
|
|
|
|
All: Traces all objects that Siebel creates as a result of scripting. |
657
|
|
|
|
|
|
|
Returns 1 for success |
658
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
659
|
|
|
|
|
|
|
|
660
|
|
|
|
|
|
|
=item SAPP->Trace(Message) |
661
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
Writes the message to the trace file if tracing is on |
663
|
|
|
|
|
|
|
Returns 1 for success |
664
|
|
|
|
|
|
|
Returns undef for failure. A failure will set SAPP->Error |
665
|
|
|
|
|
|
|
|
666
|
|
|
|
|
|
|
=item SAPP->GetLastErrCode |
667
|
|
|
|
|
|
|
|
668
|
|
|
|
|
|
|
The error handler that sets SAPP->Error calls this method causing the value to be wiped out. Use SAPP->Error for error details |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
=item SAPP->GetLastErrText |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
The error handler that sets SAPP->Error calls this method causing the value to be wiped out. Use SAPP->Error for error details |
673
|
|
|
|
|
|
|
|
674
|
|
|
|
|
|
|
=item SAPP->ConnectionType |
675
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
The current connection type Thin or Thick |
677
|
|
|
|
|
|
|
|
678
|
|
|
|
|
|
|
=item SAPP->UserName |
679
|
|
|
|
|
|
|
|
680
|
|
|
|
|
|
|
The current user name |
681
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
=item SAPP->PassWord |
683
|
|
|
|
|
|
|
|
684
|
|
|
|
|
|
|
The current password |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
=item SAPP->CFG |
687
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
The current CFG file location, only valid for Thick connections |
689
|
|
|
|
|
|
|
|
690
|
|
|
|
|
|
|
=item SAPP->DataSource |
691
|
|
|
|
|
|
|
|
692
|
|
|
|
|
|
|
The current data source, only valid for Thick connections |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
=item SAPP->Host |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
The current siebl host, only valid for Thin connections |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
=item SAPP->Ent |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
The current siebl Enterprise, only valid for Thin connections |
701
|
|
|
|
|
|
|
|
702
|
|
|
|
|
|
|
=item SAPP->ObjMgr |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
The current siebl Object Manager, only valid for Thin connections |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
=back |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
=head1 REQUIREMENTS |
709
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
Windows |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
Siebel Dedicated Client or more specifically, |
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
sstchca.dll - This provides COM interface to Siebel application. This DLL is provided by Siebel and gets registered on your system when you install Siebel Dedicated (Thick) Client. |
715
|
|
|
|
|
|
|
|
716
|
|
|
|
|
|
|
The modules will install if the DLL is not present however until the DLL is registered on the system they will not work. |
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
=head1 TESTING |
719
|
|
|
|
|
|
|
|
720
|
|
|
|
|
|
|
WinXP x86 Active State Perl 32 Bit 5.16 |
721
|
|
|
|
|
|
|
|
722
|
|
|
|
|
|
|
Windows 2003x64 Strawberry Perl 32Bit 5.16.2 |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
Siebel 7.7 |
725
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
Siebel 8.1 |
727
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
=head2 test.t |
729
|
|
|
|
|
|
|
|
730
|
|
|
|
|
|
|
test.t has a full set of tests however due to almost all tests requiring a user name and password along with system settings to get the full set of tests you must update the %inputs and %testData |
731
|
|
|
|
|
|
|
variables with the appropriate values. You can then select the tests you wish to preform using the constants at the top of the script. |
732
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
The test full.t has over 400 tests if all are run in one go this seems to cause problems. Please run only thin or thick client tests at one time. |
734
|
|
|
|
|
|
|
Run standalone (without Test::More) there is no issue but as part of the test suite it just stops after some tests and does not give a report. |
735
|
|
|
|
|
|
|
Any help appreciated in understanding this would be appreciated. |
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
|
738
|
|
|
|
|
|
|
=head1 NOTES |
739
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
The Siebel Application base method Login is called as part of the New method and is not exposed to the user by the resulting Siebel::Integration::Com object |
741
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
EnableExceptions - only in thin client, thick throws exception, have suppressed call when on thick. |
743
|
|
|
|
|
|
|
|
744
|
|
|
|
|
|
|
=head1 BUGS/LIMITATIONS |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
InvokeMethod - only takes zero or one argument |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
=head1 SEE ALSO |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
L<Siebel::Integration::Com::BusObj> |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
L<Siebel::Integration::Com::BusComp> |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
L<Siebel::Integration::Com::BusSrv> |
755
|
|
|
|
|
|
|
|
756
|
|
|
|
|
|
|
L<Siebel::Integration::Com::PropSet> |
757
|
|
|
|
|
|
|
|
758
|
|
|
|
|
|
|
=head2 REFERENCES |
759
|
|
|
|
|
|
|
|
760
|
|
|
|
|
|
|
L<Oracle Help Application Methods|http://docs.oracle.com/cd/E14004_01/books/OIRef/OIRef_Interfaces_Reference9.html> |
761
|
|
|
|
|
|
|
|
762
|
|
|
|
|
|
|
L<Oracle Help Business Component Methods|http://docs.oracle.com/cd/E14004_01/books/OIRef/OIRef_Interfaces_Reference11.html> |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
L<Oracle Help Property Set Methods|http://docs.oracle.com/cd/E14004_01/books/OIRef/OIRef_Siebel_eScript_Quick_Reference11.html> |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
=head1 AUTHOR |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
Kyle Mathers, C<< <kyle.perl at mathersit.com> >> |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
=head1 COPYRIGHT |
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
Copyright (C) 2013 Kyle Mathers |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
776
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.3 or, |
777
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
=head1 VERSION |
780
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
Version 0.02 March 2013 |
782
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
=cut |
784
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
|
786
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
|