Changeset 627
- Timestamp:
- 08/07/07 15:50:18 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/taskers/hefeweizen_tasker_application_encrypt_ebXML_message.rb
r604 r627 139 139 def run 140 140 141 success = 0 142 141 143 if (FileTest.exists?(@parameters_file_path) && FileTest.readable?(@parameters_file_path) && 142 144 FileTest.exists?(@ebXML_message_file_path) && FileTest.readable?(@ebXML_message_file_path)) then … … 168 170 files_to_delete, files_to_repackage = encrypt content_hash, template_filename, files_to_delete 169 171 170 # repackage 171 @logger.debug "#{me}: Repackaging the encrypted content of the ebXML message into a new ebXML message." if @debug 172 new_ebXML_message_file_path = repackage files_to_repackage 172 unless files_to_delete == nil or files_to_repackage == nil then 173 # repackage 174 @logger.debug "#{me}: Repackaging the encrypted content of the ebXML message into a new ebXML message." if @debug 175 new_ebXML_message_file_path = repackage files_to_repackage 176 else 177 success = -1 178 end 173 179 174 180 command_hash = { … … 177 183 "b2b_system_name" => @b2b_system_name, 178 184 "command" => "encrypt ebXML message done", 179 "new_ebXML_message_file_path" => new_ebXML_message_file_path,185 "new_ebXML_message_file_path" => (new_ebXML_message_file_path || ''), 180 186 "state_expectation" => @state_expectation, 181 187 "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid, … … 183 189 } 184 190 185 success = 0186 191 if success == 0 then 187 192 command_hash['status'] = "OK" … … 195 200 HefeWeizen::HefeWeizenLibrary::Execution.write_to_pipe command, @pipe_to_ania 196 201 197 FileUtils.rm files_to_delete 198 199 exit 0 202 FileUtils.rm files_to_delete unless files_to_delete.empty? 200 203 201 204 return 0 … … 287 290 else 288 291 puts "ERROR encryption" 292 return nil, nil 289 293 end 290 294 }
