| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Workflow::XPDL; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
30262
|
use 5.008008; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
36
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
33
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
32
|
|
|
6
|
1
|
|
|
1
|
|
413
|
use XML::XPath; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Data::Dumper; |
|
8
|
|
|
|
|
|
|
use Carp; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
|
11
|
|
|
|
|
|
|
use AutoLoader qw(AUTOLOAD); |
|
12
|
|
|
|
|
|
|
our $debug = 0; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
|
17
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
|
18
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# This allows declaration use Workflow::XPDL ':all'; |
|
21
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
|
22
|
|
|
|
|
|
|
# will save memory. |
|
23
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
|
24
|
|
|
|
|
|
|
header_info |
|
25
|
|
|
|
|
|
|
is_valid_workflow |
|
26
|
|
|
|
|
|
|
get_transition_ids |
|
27
|
|
|
|
|
|
|
get_imp_details |
|
28
|
|
|
|
|
|
|
get_app_datatypes |
|
29
|
|
|
|
|
|
|
new |
|
30
|
|
|
|
|
|
|
xml_file |
|
31
|
|
|
|
|
|
|
workflow_id |
|
32
|
|
|
|
|
|
|
activity_id |
|
33
|
|
|
|
|
|
|
application_id |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
) ] ); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
our @EXPORT = qw( |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
our $VERSION = '0.40'; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Preloaded methods go here. |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub header_info { |
|
49
|
|
|
|
|
|
|
my $self = shift; |
|
50
|
|
|
|
|
|
|
my $xml_file = $self->{XML_FILE}; |
|
51
|
|
|
|
|
|
|
my $headerval; |
|
52
|
|
|
|
|
|
|
my $headertext; |
|
53
|
|
|
|
|
|
|
my %headerhash; |
|
54
|
|
|
|
|
|
|
my $sub_name = "header_info"; |
|
55
|
|
|
|
|
|
|
my $dump; |
|
56
|
|
|
|
|
|
|
chomp $xml_file; |
|
57
|
|
|
|
|
|
|
_debug ("$sub_name: Got $xml_file\n"); |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $xp = XML::XPath->new(filename => $xml_file); |
|
60
|
|
|
|
|
|
|
my $nodeset = $xp->find("//*[ancestor::PackageHeader]"); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
foreach my $node ($nodeset->get_nodelist) { |
|
63
|
|
|
|
|
|
|
my $headerval = $node->getLocalName(); |
|
64
|
|
|
|
|
|
|
my $headertext = $node->string_value(); |
|
65
|
|
|
|
|
|
|
$headerhash{$headerval} = "$headertext"; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
$dump = Dumper(%headerhash); |
|
70
|
|
|
|
|
|
|
_debug ("$dump"); |
|
71
|
|
|
|
|
|
|
return (%headerhash); |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub is_valid_workflow { |
|
75
|
|
|
|
|
|
|
my $self = shift; |
|
76
|
|
|
|
|
|
|
if ($_[0]) { |
|
77
|
|
|
|
|
|
|
$self->{WORKFLOW_ID} = $_[0]; |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
my $sub_name = "is_valid_workflow"; |
|
80
|
|
|
|
|
|
|
my $xml_file = $self->{XML_FILE}; |
|
81
|
|
|
|
|
|
|
my $workflow_id = $self->{WORKFLOW_ID}; |
|
82
|
|
|
|
|
|
|
my $found_id = 1; |
|
83
|
|
|
|
|
|
|
chomp $xml_file; |
|
84
|
|
|
|
|
|
|
_debug ("$sub_name: Got $xml_file\n"); |
|
85
|
|
|
|
|
|
|
_debug ("$sub_name: Got $workflow_id\n"); |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
my $xp = XML::XPath->new(filename => $xml_file); |
|
88
|
|
|
|
|
|
|
my $nodeset = $xp->exists("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]"); # find all paragraphs |
|
89
|
|
|
|
|
|
|
if ($nodeset) { |
|
90
|
|
|
|
|
|
|
$found_id = 0; |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
return $found_id; |
|
93
|
|
|
|
|
|
|
} |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub _debug { |
|
96
|
|
|
|
|
|
|
my $output = $_[0]; |
|
97
|
|
|
|
|
|
|
if ($debug) { |
|
98
|
|
|
|
|
|
|
print STDERR "$output"; |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub get_transition_ids { |
|
103
|
|
|
|
|
|
|
my $self = shift; |
|
104
|
|
|
|
|
|
|
if ($_[0]) { |
|
105
|
|
|
|
|
|
|
$self->{ACTIVITY_ID} = $_[0]; |
|
106
|
|
|
|
|
|
|
} |
|
107
|
|
|
|
|
|
|
my $xml_file = $self->{XML_FILE}; |
|
108
|
|
|
|
|
|
|
my $workflow_id = $self->{WORKFLOW_ID}; |
|
109
|
|
|
|
|
|
|
my $activity_id = $self->{ACTIVITY_ID}; |
|
110
|
|
|
|
|
|
|
my $trans_id; |
|
111
|
|
|
|
|
|
|
my %transition_hash; |
|
112
|
|
|
|
|
|
|
my $split_type; |
|
113
|
|
|
|
|
|
|
my $restrictions_exist = 0; |
|
114
|
|
|
|
|
|
|
my $restriction_type; |
|
115
|
|
|
|
|
|
|
my $transitions_exist = 0; |
|
116
|
|
|
|
|
|
|
my $conditions_exist = 0; |
|
117
|
|
|
|
|
|
|
my $dump; |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
chomp $xml_file; |
|
121
|
|
|
|
|
|
|
my $xp = XML::XPath->new(filename => $xml_file); |
|
122
|
|
|
|
|
|
|
$transitions_exist = $xp->exists("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Transitions/Transition[\@From=$activity_id]"); |
|
123
|
|
|
|
|
|
|
if ($transitions_exist) { |
|
124
|
|
|
|
|
|
|
$transition_hash{'trans_exist'} = 'TRUE'; |
|
125
|
|
|
|
|
|
|
my $nodeset = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Transitions/Transition[\@From=$activity_id]"); |
|
126
|
|
|
|
|
|
|
foreach my $node ($nodeset->get_nodelist) { |
|
127
|
|
|
|
|
|
|
my $condition; |
|
128
|
|
|
|
|
|
|
my $trans_to_id = $node->findvalue('@To'); |
|
129
|
|
|
|
|
|
|
_debug("Trans to id is $trans_to_id\n"); |
|
130
|
|
|
|
|
|
|
my $trans_id = $node->findvalue('@Id'); |
|
131
|
|
|
|
|
|
|
_debug("Trans id is $trans_id\n"); |
|
132
|
|
|
|
|
|
|
my $conditions_exist = $xp->exists ("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Transitions/Transition[\@Id=$trans_id]/Condition"); |
|
133
|
|
|
|
|
|
|
if ($conditions_exist) { |
|
134
|
|
|
|
|
|
|
my $conditionset = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Transitions/Transition[\@Id=$trans_id]/Condition"); |
|
135
|
|
|
|
|
|
|
foreach my $conditions ($conditionset->get_nodelist) { |
|
136
|
|
|
|
|
|
|
$condition = $conditions->string_value(); |
|
137
|
|
|
|
|
|
|
my %temp_hash = ( 'transition_to_id' => $trans_to_id, 'transition_condition' => $condition ); |
|
138
|
|
|
|
|
|
|
$transition_hash{$trans_id} = \%temp_hash; |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
else { |
|
142
|
|
|
|
|
|
|
my %temp_hash = ( 'transition_to_id' => $trans_to_id, 'transition_condition' => 'NULL' ); |
|
143
|
|
|
|
|
|
|
$transition_hash{$trans_id} = \%temp_hash; |
|
144
|
|
|
|
|
|
|
} |
|
145
|
|
|
|
|
|
|
} |
|
146
|
|
|
|
|
|
|
$restrictions_exist = $xp->exists("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Activities/Activity[\@Id=$activity_id]/TransitionRestrictions/TransitionRestriction/Split/TransitionRefs/TransitionRef"); |
|
147
|
|
|
|
|
|
|
if ($restrictions_exist) { |
|
148
|
|
|
|
|
|
|
my $nodeset = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Activities/Activity[\@Id=$activity_id]/TransitionRestrictions/TransitionRestriction/Split"); |
|
149
|
|
|
|
|
|
|
foreach my $node ($nodeset->get_nodelist) { |
|
150
|
|
|
|
|
|
|
$restriction_type = $node->findvalue('@Type'); |
|
151
|
|
|
|
|
|
|
$transition_hash{'restriction_type'} = $restriction_type; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
} |
|
154
|
|
|
|
|
|
|
else { |
|
155
|
|
|
|
|
|
|
$transition_hash{'restriction_type'} = 'NULL'; |
|
156
|
|
|
|
|
|
|
} |
|
157
|
|
|
|
|
|
|
} |
|
158
|
|
|
|
|
|
|
else { |
|
159
|
|
|
|
|
|
|
$transition_hash{'trans_exist'} = 'FALSE'; |
|
160
|
|
|
|
|
|
|
} |
|
161
|
|
|
|
|
|
|
$dump = Dumper(%transition_hash); |
|
162
|
|
|
|
|
|
|
_debug("$dump"); |
|
163
|
|
|
|
|
|
|
return %transition_hash; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
sub get_imp_details { |
|
167
|
|
|
|
|
|
|
my $self = shift; |
|
168
|
|
|
|
|
|
|
if ($_[0]) { |
|
169
|
|
|
|
|
|
|
$self->{ACTIVITY_ID} = $_[0]; |
|
170
|
|
|
|
|
|
|
} |
|
171
|
|
|
|
|
|
|
my $xml_file = $self->{XML_FILE}; |
|
172
|
|
|
|
|
|
|
my $workflow_id = $self->{WORKFLOW_ID}; |
|
173
|
|
|
|
|
|
|
my $activity_id = $self->{ACTIVITY_ID}; |
|
174
|
|
|
|
|
|
|
my $impl_name; |
|
175
|
|
|
|
|
|
|
my $exists = 0; |
|
176
|
|
|
|
|
|
|
my @imp_array = ""; |
|
177
|
|
|
|
|
|
|
my $appl_id; |
|
178
|
|
|
|
|
|
|
my $appl_type; |
|
179
|
|
|
|
|
|
|
my $dump; |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
my $xp = XML::XPath->new(filename => $xml_file); |
|
182
|
|
|
|
|
|
|
$exists = $xp->exists("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Activities/Activity[\@Id=$activity_id]/Implementation"); |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
if ($exists) { |
|
185
|
|
|
|
|
|
|
my $nodeset = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Activities/Activity[\@Id=$activity_id]/Implementation/*"); |
|
186
|
|
|
|
|
|
|
foreach my $node ($nodeset->get_nodelist) { |
|
187
|
|
|
|
|
|
|
$impl_name = $node->getLocalName(); |
|
188
|
|
|
|
|
|
|
if ( $impl_name eq "Tool") { |
|
189
|
|
|
|
|
|
|
$appl_id = $node->findvalue('@Id'); |
|
190
|
|
|
|
|
|
|
$appl_type = $node->findvalue('@Type'); |
|
191
|
|
|
|
|
|
|
} |
|
192
|
|
|
|
|
|
|
elsif ( $impl_name eq "No") { |
|
193
|
|
|
|
|
|
|
$appl_id = ""; |
|
194
|
|
|
|
|
|
|
$appl_type = ""; |
|
195
|
|
|
|
|
|
|
} |
|
196
|
|
|
|
|
|
|
elsif ( $impl_name eq "SubFlow") { |
|
197
|
|
|
|
|
|
|
$appl_id = $node->findvalue('@Id'); |
|
198
|
|
|
|
|
|
|
$appl_type = $node->findvalue('@Execution'); |
|
199
|
|
|
|
|
|
|
} |
|
200
|
|
|
|
|
|
|
else { |
|
201
|
|
|
|
|
|
|
$impl_name = "NULL"; |
|
202
|
|
|
|
|
|
|
$appl_id = ""; |
|
203
|
|
|
|
|
|
|
$appl_type = ""; |
|
204
|
|
|
|
|
|
|
} |
|
205
|
|
|
|
|
|
|
} |
|
206
|
|
|
|
|
|
|
} |
|
207
|
|
|
|
|
|
|
else { |
|
208
|
|
|
|
|
|
|
$impl_name = "NULL"; |
|
209
|
|
|
|
|
|
|
$appl_id = ""; |
|
210
|
|
|
|
|
|
|
$appl_type = ""; |
|
211
|
|
|
|
|
|
|
} |
|
212
|
|
|
|
|
|
|
@imp_array = [$impl_name, $appl_id, $appl_type]; |
|
213
|
|
|
|
|
|
|
$dump = Dumper(@imp_array); |
|
214
|
|
|
|
|
|
|
_debug("$dump"); |
|
215
|
|
|
|
|
|
|
return (@imp_array); |
|
216
|
|
|
|
|
|
|
} |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub get_app_datatypes { |
|
219
|
|
|
|
|
|
|
my $self = shift; |
|
220
|
|
|
|
|
|
|
if ($_[0]) { |
|
221
|
|
|
|
|
|
|
$self->{APPLICATION_ID} = $_[0]; |
|
222
|
|
|
|
|
|
|
} |
|
223
|
|
|
|
|
|
|
my $xml_file = $self->{XML_FILE}; |
|
224
|
|
|
|
|
|
|
my $workflow_id = $self->{WORKFLOW_ID}; |
|
225
|
|
|
|
|
|
|
my $application_id = $self->{APPLICATION_ID}; |
|
226
|
|
|
|
|
|
|
my $impl_name; |
|
227
|
|
|
|
|
|
|
my $exists = 0; |
|
228
|
|
|
|
|
|
|
my @imp_array = ""; |
|
229
|
|
|
|
|
|
|
my $appl_id; |
|
230
|
|
|
|
|
|
|
my $appl_type; |
|
231
|
|
|
|
|
|
|
my $dump; |
|
232
|
|
|
|
|
|
|
my %param_hash; |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
my $xp = XML::XPath->new(filename => $xml_file); |
|
236
|
|
|
|
|
|
|
$exists = $xp->exists("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Applications/Application[\@Id=\'$application_id\']/FormalParameters"); |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
if ($exists) { |
|
239
|
|
|
|
|
|
|
my $nodeset = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Applications/Application[\@Id=\'$application_id\']/FormalParameters/FormalParameter"); |
|
240
|
|
|
|
|
|
|
foreach my $node ($nodeset->get_nodelist) { |
|
241
|
|
|
|
|
|
|
my $param_id = $node->findvalue('@Id'); |
|
242
|
|
|
|
|
|
|
my $param_index = $node->findvalue('@Index'); |
|
243
|
|
|
|
|
|
|
my $param_mode = $node->findvalue('@Mode'); |
|
244
|
|
|
|
|
|
|
my $param_type = ""; |
|
245
|
|
|
|
|
|
|
my $param_type_val = ""; |
|
246
|
|
|
|
|
|
|
my $nodeset2 = $xp->find("/Package/WorkflowProcesses/WorkflowProcess[\@Id=$workflow_id]/Applications/Application[\@Id=\'$application_id\']/FormalParameters/FormalParameter[\@Id=\'$param_id\']/DataType/*"); |
|
247
|
|
|
|
|
|
|
foreach my $node2 ($nodeset2->get_nodelist) { |
|
248
|
|
|
|
|
|
|
$param_type = $node2->getLocalName(); |
|
249
|
|
|
|
|
|
|
if ($param_type eq "BasicType") { |
|
250
|
|
|
|
|
|
|
$param_type_val = $node2->findvalue('@Type'); |
|
251
|
|
|
|
|
|
|
} |
|
252
|
|
|
|
|
|
|
else { |
|
253
|
|
|
|
|
|
|
$param_type_val = $node2->findvalue('@Id'); |
|
254
|
|
|
|
|
|
|
} |
|
255
|
|
|
|
|
|
|
} |
|
256
|
|
|
|
|
|
|
$param_hash{$param_id} = [ $param_index, $param_mode, $param_type, $param_type_val]; |
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
} |
|
259
|
|
|
|
|
|
|
} |
|
260
|
|
|
|
|
|
|
else { |
|
261
|
|
|
|
|
|
|
_debug("Not found."); |
|
262
|
|
|
|
|
|
|
} |
|
263
|
|
|
|
|
|
|
$dump = Dumper(%param_hash); |
|
264
|
|
|
|
|
|
|
_debug("$dump"); |
|
265
|
|
|
|
|
|
|
return %param_hash; |
|
266
|
|
|
|
|
|
|
} |
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub get_formal_parameters { |
|
269
|
|
|
|
|
|
|
return "Not yet implemented\n"; |
|
270
|
|
|
|
|
|
|
} |
|
271
|
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
sub new { |
|
273
|
|
|
|
|
|
|
my $classed = 1; |
|
274
|
|
|
|
|
|
|
my $self = {}; |
|
275
|
|
|
|
|
|
|
my $class; |
|
276
|
|
|
|
|
|
|
my @args; |
|
277
|
|
|
|
|
|
|
($class, @args) = @_; |
|
278
|
|
|
|
|
|
|
my $count = 2; |
|
279
|
|
|
|
|
|
|
foreach my $params (@args) { |
|
280
|
|
|
|
|
|
|
if ($params eq "xml_file") { |
|
281
|
|
|
|
|
|
|
$self->{XML_FILE} = $_[$count]; |
|
282
|
|
|
|
|
|
|
} |
|
283
|
|
|
|
|
|
|
if ($params eq "workflow_id") { |
|
284
|
|
|
|
|
|
|
$self->{WORKFLOW_ID} = $_[$count]; |
|
285
|
|
|
|
|
|
|
} |
|
286
|
|
|
|
|
|
|
if ($params eq "activity_id") { |
|
287
|
|
|
|
|
|
|
$self->{ACTIVITY_ID} = $_[$count]; |
|
288
|
|
|
|
|
|
|
} |
|
289
|
|
|
|
|
|
|
if ($params eq "application_id") { |
|
290
|
|
|
|
|
|
|
$self->{APPLICATION_ID} = $_[$count]; |
|
291
|
|
|
|
|
|
|
} |
|
292
|
|
|
|
|
|
|
$count++; |
|
293
|
|
|
|
|
|
|
} |
|
294
|
|
|
|
|
|
|
unless ($self->{XML_FILE}) { |
|
295
|
|
|
|
|
|
|
$self->{XML_FILE} = undef; |
|
296
|
|
|
|
|
|
|
} |
|
297
|
|
|
|
|
|
|
unless ($self->{WORKFLOW_ID}) { |
|
298
|
|
|
|
|
|
|
$self->{WORKFLOW_ID} = undef; |
|
299
|
|
|
|
|
|
|
} |
|
300
|
|
|
|
|
|
|
unless ($self->{ACTIVITY_ID}) { |
|
301
|
|
|
|
|
|
|
$self->{ACTIVITY_ID} = undef; |
|
302
|
|
|
|
|
|
|
} |
|
303
|
|
|
|
|
|
|
unless ($self->{APPLICATION_ID}) { |
|
304
|
|
|
|
|
|
|
$self->{APPLICATION_ID} = undef; |
|
305
|
|
|
|
|
|
|
} |
|
306
|
|
|
|
|
|
|
bless($self, $class); |
|
307
|
|
|
|
|
|
|
return $self; |
|
308
|
|
|
|
|
|
|
} |
|
309
|
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
sub xml_file { |
|
311
|
|
|
|
|
|
|
my $self = shift; |
|
312
|
|
|
|
|
|
|
if ($_[0]) { |
|
313
|
|
|
|
|
|
|
$self->{XML_FILE} = $_[0]; |
|
314
|
|
|
|
|
|
|
} |
|
315
|
|
|
|
|
|
|
return $self->{XML_FILE}; |
|
316
|
|
|
|
|
|
|
} |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
sub workflow_id { |
|
319
|
|
|
|
|
|
|
my $self = shift; |
|
320
|
|
|
|
|
|
|
if ($_[0]) { |
|
321
|
|
|
|
|
|
|
$self->{WORKFLOW_ID} = $_[0]; |
|
322
|
|
|
|
|
|
|
} |
|
323
|
|
|
|
|
|
|
return $self->{WORKFLOW_ID}; |
|
324
|
|
|
|
|
|
|
} |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
sub activity_id { |
|
327
|
|
|
|
|
|
|
my $self = {}; |
|
328
|
|
|
|
|
|
|
if ($_[0]) { |
|
329
|
|
|
|
|
|
|
$self->{ACTIVITY_ID} = $_[0]; |
|
330
|
|
|
|
|
|
|
} |
|
331
|
|
|
|
|
|
|
return $self->{ACTIVITY_ID}; |
|
332
|
|
|
|
|
|
|
} |
|
333
|
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
sub application_id { |
|
335
|
|
|
|
|
|
|
my $self = {}; |
|
336
|
|
|
|
|
|
|
if ($_[0]) { |
|
337
|
|
|
|
|
|
|
$self->{APPLICATION_ID} = $_[0]; |
|
338
|
|
|
|
|
|
|
} |
|
339
|
|
|
|
|
|
|
return $self->{APPLICATION_ID}; |
|
340
|
|
|
|
|
|
|
} |
|
341
|
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
sub DESTROY { |
|
343
|
|
|
|
|
|
|
my $self = shift; |
|
344
|
|
|
|
|
|
|
if ($debug ) { |
|
345
|
|
|
|
|
|
|
carp "Destroying $self\n"; |
|
346
|
|
|
|
|
|
|
} |
|
347
|
|
|
|
|
|
|
} |
|
348
|
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
|
350
|
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
1; |
|
352
|
|
|
|
|
|
|
__END__ |