Changeset 227

Show
Ignore:
Timestamp:
12/07/06 14:45:06 (2 years ago)
Author:
sacha
Message:

first part of refactoring the way big ania processes files.
message has no states. currently this is done in ebMSMessage2
not sending message yet. all circumvented per now
not receiving message yet. all circumvented per now

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/message-handling-refactor-branch/defaults/hefeweizen-defaults

    r211 r227  
    3333 
    3434 
    35 BIG_ANIA_LOAD_TEST_ENVIRONMENT=tru
     35BIG_ANIA_LOAD_TEST_ENVIRONMENT=fals
    3636TEST_LIB_NAME=hefeweizen_library_big_ania_test_logic.rb 
    3737 
  • branches/message-handling-refactor-branch/src/hefeweizen_big_ania.rb

    r219 r227  
    3232        require "#{@config['LIB_DIR']}/hefeweizen_library_b2b_system" 
    3333        require "#{@config['LIB_DIR']}/hefeweizen_library_directive" 
    34         require "#{@config['LIB_DIR']}/hefeweizen_library_ebMS_message
     34        require "#{@config['LIB_DIR']}/hefeweizen_library_ebMS_message2
    3535 
    3636        begin 
     
    7171    def run 
    7272       
    73       if !$configured then 
     73      if !@configured then 
    7474        if configure then 
    7575          @logger.info "Successfully setup hefeweizen_big_ania" 
     
    112112        begin 
    113113          require @config['LIB_DIR'].strip + "/" + @config['TEST_LIB_NAME'].strip 
    114           $test_library = HefeWeizen::HefeWeizenTestLibrary::HefeWeizenBigAniaTestBusinessLogic.new @config 
    115           @logger.info "Loaded HefeWeizen Test Library Version: " + $test_library.version 
     114          @test_library = HefeWeizen::HefeWeizenTestLibrary::HefeWeizenBigAniaTestBusinessLogic.new @config 
     115          @logger.info "Loaded HefeWeizen Test Library Version: " + @test_library.version 
    116116        rescue Exception => e 
    117117          @logger.error "Error loading test library." 
     
    119119          return false 
    120120        end 
     121      else 
     122        @test_library = nil 
    121123      end 
    122124       
     
    215217      # transaction manager 
    216218      begin 
    217         @transaction_manager = HefeWeizen::HefeWeizenLibrary::HefeWeizenTransactionManager.instance @config, @config['TRANSACTION_DIR'] 
     219        @transaction_manager = HefeWeizen::HefeWeizenLibrary::HefeWeizenTransactionManager.instance @config 
     220        if @transaction_manager.nil? then 
     221          @logger.error "Unable to load HefeWeizen Transaction Manager" 
     222          return false 
     223        end 
    218224      rescue Exception => e 
    219225        @logger.error "Unable to load HefeWeizen Transaction Manager: #{e.to_s}" 
    220226        return false 
    221227      end 
    222       if @transaction_manager.nil? then 
    223         @logger.error "Unable to load HefeWeizen Transaction Manager" 
    224         return false 
    225       end 
    226228 
    227229      # configured 
    228230      @logger.info 'HefeWeizen Big Ania configured.' 
    229       $configured = true 
     231      @configured = true 
    230232      return true 
    231233    end 
    232  
     234     
    233235    # This method starts big_ania 
    234236    # This method calls individual start methods. 
     
    339341          puts "BIG ANIA PIPE ERROR: #{error.to_s}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
    340342          puts "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
    341           sleep (0.1) 
     343          sleep 0.1 
    342344        end 
    343345      end 
     
    365367              if transaction then 
    366368                # test library first (is less complex) 
    367                 if !$test_library.nil? then 
    368                   close_transaction, processed = $test_library.process_command command_hash 
     369                if !@test_library.nil? then 
     370                  close_transaction, processed = @test_library.process_command command_hash 
    369371                  if processed then 
    370372                    transaction.close_transaction(close_transaction, "Test message.") if close_transaction 
     
    397399    ############################################################ 
    398400 
     401    ################# rewrite 
     402    ################# rewrite 
     403    ################# rewrite 
     404    ################# rewrite 
     405 
     406 
     407 
    399408    # This method executes on the commands 
    400409    # Must return a true in case some code did deal with the command. 
    401410    def process_command_with_transaction transaction, command, command_hash 
    402411      @logger.debug "Transaction state: #{transaction.get_current_state_name}" 
    403        
     412 
     413      if command == 'new directive' then 
     414        @logger.debug "Received new directive!" 
     415        if !transaction.open_and_new? then 
     416          @logger.warn "A transaction must be new and open for a new directive." 
     417        else 
     418          result = process_new_directive2 command, command_hash, transaction 
     419          @logger.debug "Processed directive." 
     420 
     421          # if there is a tasker to be started for digital signature then 
     422          # the result variable will hold the command to start that 
     423          # tasker 
     424          if result.class == TrueClass or result.class == FalseClass then 
     425            if result == true 
     426              @logger.debug "Successfully processed new directive." 
     427              @logger.debug "Its time to deliver the ebXML message." 
     428              return deliver( transaction ) 
     429            elsif result == false then 
     430              @logger.debug "Problems processing new directive xx." 
     431              # ??? 
     432            end 
     433          elsif result.class == String then 
     434            @logger.debug "Successfully processed new directive and a tasker must be started." 
     435            say_to_ania result 
     436          else 
     437            @logger.warn "Problems processing new directive: #{result}" 
     438            # ??? 
     439          end 
     440        end 
     441      elsif command == 'sign ebXML message done' then 
     442        @logger.debug "Received signing ebXML message is done." 
     443        transaction.transition_to_new_state "sign ebXML message done" 
     444        if ((encryption = true) == true) then 
     445          @logger.debug "ebXML message must be encrypted. Starting encrpytion tasker" 
     446 
     447          metadata = {'complete_ebXML_message_file_path' => command_hash['ebXML_message_file_path'],  
     448            'complete_ebXML_message_parameters_file_path' => command_hash['ebXML_message_parameters_file_path']} 
     449           
     450          command, expectation = start_an_encrypting_tasker metadata, transaction.transaction_id, command_hash['b2b_system_name'] 
     451          # SET EXPECTED NEW STATE 
     452          transaction.set_next_expectation(expectation) 
     453          say_to_ania command 
     454          return true 
     455        else 
     456          @logger.debug "ebXML message must NOT be encrypted." 
     457        end 
     458        @logger.debug "Its time to deliver the ebXML message." 
     459         
     460        return deliver( transaction ) 
     461 
     462      elsif command == 'encrypt ebXML message done' then 
     463        @logger.debug "Received encrypt ebXML message is done." 
     464        transaction.transition_to_new_state "encrypt ebXML message done" 
     465        @logger.debug "Its time to deliver the ebXML message." 
     466        return deliver( transaction ) 
     467 
     468      else 
     469        puts "I dont know what the fuck to do with #{command}" 
     470      end 
     471       
     472      # if transaction still open and noone processed it ....... I may have to close it. 
     473       
     474    end 
     475   
     476    def read_ebXML_message_info ebXML_message_parameters_file_path 
     477      if (FileTest.exists?(ebXML_message_parameters_file_path) && FileTest.readable?(ebXML_message_parameters_file_path)) then 
     478        return YAML.load(File.open(ebXML_message_parameters_file_path)) 
     479      else 
     480        return nil 
     481      end 
     482    end 
     483 
     484    def deliver transaction  
     485      transaction.transition_to_new_state "ebXML message delivery process started" 
     486      @logger.debug "DELIVER...........:::" 
     487      transaction.add_comment "YEP cool dude." 
     488      transaction.succeed "OKEY DUDES. DONE." 
     489      return true 
     490    end 
     491 
     492    def process_new_directive2 command, command_hash, transaction 
     493       
     494      b2b_system = @b2b_systems[command_hash['b2b_system_name']] 
     495      if b2b_system.nil? then 
     496        @logger.warn "There is no B2B system with the name #{command_hash['b2b_system_name']}." 
     497        return false 
     498      end 
     499       
     500      begin 
     501        directive = HefeWeizen::HefeWeizenLibrary::HefeWeizenDirective.new(@config, command_hash['file']) 
     502#        transaction.remember_file_to_remove command_hash['file'] if command_hash['file'] 
     503      rescue Exception => e 
     504 
     505        @logger.warn "Unable to process Directive: #{e.to_s}" 
     506        target_directory = b2b_system.get_error_directory 
     507        success = HefeWeizen::HefeWeizenLibrary::HefeWeizenDirective.create_error_directive_and_save target_directory, "HefeWeizen system is unable to process a directive.", e.to_s, command_hash['file'] 
     508        if success == false then 
     509          @logger.error "Unable to create and store Error Directive" 
     510        end 
     511        transaction.close_transaction("failed", "Unable to process directive") 
     512        return false 
     513      end 
     514       
     515      # @logger.debug "Directive successfully read" 
     516      # directive.print_directive_tags 
     517      # @logger.debug "The directive is a ebMS signal: #{directive.is_a_ebMS_signal?.to_s}" 
     518       
     519      # This is a new transaction so we have to set the root cause of this new transaction. 
     520      if !transaction.set_root_cause directive then 
     521        @logger.error "Unable to store the directive as root cause to the new transaction" 
     522        return false 
     523      else 
     524        @logger.debug "Succesfully stored the directive as root cause" 
     525      end 
     526       
     527      if !b2b_system.supports_directive? directive then 
     528        @logger.warn "B2BSystem #{b2b_system.system_name} does not support the directive." 
     529        return false 
     530      end 
     531         
     532      begin 
     533        # this creates a plain ebXML message 
     534        metadata = b2b_system.process_directive directive 
     535      rescue Exception => e 
     536        @logger.warn "B2BSystem #{b2b_system.system_name} is unable to create an ebXML message: #{e.to_s}; #{e.backtrace}" 
     537        return false 
     538      end 
     539 
     540      transaction.attach_file metadata['complete_ebXML_message_file_path'], "outgoing ebXML message" 
     541      transaction.attach_file metadata['complete_ebXML_message_parameters_file_path'], "outgoing ebXML message parameters" 
     542 
     543      # a plain ebXML message has been created. 
     544      transaction.transition_to_new_state "plain ebXML message created" 
     545 
     546      # signing first 
     547      if ((signing = true) == true) then 
     548        @logger.debug "ebXML message must be signed. Starting a signer tasker" 
     549        command, expectation = start_a_signing_tasker metadata, transaction.transaction_id, b2b_system.system_name 
     550        # SET EXPECTED NEW STATE 
     551        transaction.set_next_expectation(expectation) 
     552        return command 
     553      else 
     554        @logger.debug "ebXML message must NOT be signed." 
     555      end 
     556       
     557      # very interesting ... if the above code thinks the ebXML message must be signed then 
     558      # this code will never be called. only in the case the ebXML message must not be signed then 
     559      # this code will be called. 
     560      if ((encryption = false) == true) then 
     561        @logger.debug "ebXML message must be encrypted. Starting an encrypting tasker" 
     562        command, expectation = start_an_encrypting_tasker metadata, transaction.transaction_id, b2b_system.system_name 
     563        # SET EXPECTED NEW STATE 
     564        transaction.set_next_expectation(expectation) 
     565        return command 
     566      else 
     567        @logger.debug "ebXML message must NOT be encrypted." 
     568      end 
     569       
     570      return true 
     571    end 
     572 
     573    def start_a_signing_tasker metadata, transaction_id, b2b_system_name 
     574      expectation = "signed_ebXML_message_done" 
     575      command_hash = { 
     576        "from" => "big_ania",  
     577        "to" => "ania",  
     578        "command" => "start_tasker", 
     579        "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_sign_ebXML_message.rb", 
     580        "tasker arguments" => "--b2b-system-name #{b2b_system_name} --pipe-to-ania #{@config['PIPE_TO_ANIA']} --config #{@config['CONFIG_DIR']}/hefeweizen.conf --ebXML-message-file-path #{metadata['complete_ebXML_message_file_path']} --parameters-file-path #{metadata['complete_ebXML_message_parameters_file_path']} --transaction-id #{transaction_id} --state-expectation #{expectation}", 
     581        "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid 
     582      } 
     583      @logger.debug "Call tasker to send ebXML message." 
     584      command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" 
     585       
     586      return command, expectation 
     587       
     588    end 
     589 
     590    def start_an_encrypting_tasker metadata, transaction_id, b2b_system_name 
     591      expectation = "encrypt_ebXML_message_done" 
     592      command_hash = { 
     593        "from" => "big_ania",  
     594        "to" => "ania",  
     595        "command" => "start_tasker", 
     596        "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_encrypt_ebXML_message.rb", 
     597        "tasker arguments" => "--b2b-system-name #{b2b_system_name} --pipe-to-ania #{@config['PIPE_TO_ANIA']} --config #{@config['CONFIG_DIR']}/hefeweizen.conf --ebXML-message-file-path #{metadata['complete_ebXML_message_file_path']} --parameters-file-path #{metadata['complete_ebXML_message_parameters_file_path']} --transaction-id #{transaction_id} --state-expectation #{expectation}", 
     598        "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid 
     599      } 
     600      @logger.debug "Call tasker to send ebXML message." 
     601      command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" 
     602       
     603      return command, expectation 
     604       
     605    end 
     606 
     607 
     608 
     609 
     610 
     611    ################# rewrite 
     612    ################# rewrite 
     613    ################# rewrite 
     614    ################# rewrite 
     615     
     616 
     617 
     618 
     619 
     620 
     621 
     622 
     623 
     624    def old_____process_command_with_transaction transaction, command, command_hash 
    404625      ######################################### 
    405626      # the commands below are related to: 
     
    560781    end 
    561782 
     783     
    562784    # This method handles a new directive. 
    563785    # --> includes the creation of a new HefeWeizenDirective object.  
     
    572794          # do compensation/rollback 
    573795          transaction.remember_file_to_remove command_hash['file'] 
    574           transaction.close_transaction("failed", error
     796          transaction.close_transaction("failed", "Unable to process Directive"
    575797          return true 
    576798        end 
     
    10221244  big_ania.run 
    10231245else 
    1024   exit -1 
     1246  exit(-1) 
    10251247end 
  • branches/message-handling-refactor-branch/src/hefeweizen_library_b2b_system.rb

    r177 r227  
    159159      end 
    160160 
     161      def get_error_directory 
     162        @parameters['integration-points'].first.get_error_directory 
     163      end 
     164 
     165 
     166      # This message processes a directive. This typically invloves to create an ebXML message. 
     167      def process_directive directive 
     168        # get the ebXML Message information 
     169        # this will hold all the required information about what has to be 
     170        # in the ebXML message plus how it has to be sent. 
     171        ebMS_message_info = get_ebMS_message_info directive 
     172        if ebMS_message_info.nil? then 
     173          throw Exception.new( "CPA Manager could not provide a valid ebXML Message information." ) 
     174        end 
     175         
     176        @logger.debug "Creating plain (not signed not encrypted) ebXML message" 
     177        metadata = @ebMS_message_manager.create_plain_message directive, ebMS_message_info 
     178        if metadata.nil? then 
     179          throw Exception.new( "Error creating ebXML message" ) 
     180        end 
     181        @logger.debug "Creating ebXML message done. ebXML message is created." 
     182 
     183        return metadata 
     184      end 
     185 
    161186      private  
     187 
    162188       
    163189      def has_identity? id 
     
    179205        @system_name = File.basename(system_path) 
    180206        @system_name.freeze 
    181  
     207         
    182208        @logger = @config['LOGGER'] 
    183  
     209         
    184210        @cpa_manager = nil 
    185  
     211         
    186212        require @config['LIB_DIR'].strip + "/hefeweizen_library_cpa" 
    187  
     213        require @config['LIB_DIR'].strip + "/hefeweizen_library_ebMS_message2" 
     214         
    188215        result = load_parameters 
    189216        if result.nil? then 
    190           @logger.error "Error loading configuration." 
    191           raise "Errro loading configuration" 
     217          throw Exception.new( "Errro loading configuration" ) 
     218        end 
     219 
     220        @ebMS_message_manager = HefeWeizen::HefeWeizenLibrary::EBMessageManager.new @config, @system_name 
     221        if @ebMS_message_manager.nil? then 
     222          throw Exception.new( "Error creating an ebXML Message Manager for B2B System #{@system_name}." ) 
    192223        end 
    193224 
     
    221252      #   validating a signature will be done by a tasker. 
    222253      def load_parameters 
    223         if @parameters == nil then 
     254        if @parameters.nil? then 
    224255          @parameters = Hash.new 
    225256        else 
     
    403434      # - implementation 
    404435      def validate 
    405       end 
    406  
     436        return true 
     437      end 
    407438 
    408439    end 
  • branches/message-handling-refactor-branch/src/hefeweizen_library_directive.rb

    r220 r227  
    9090<?xml version="1.0" encoding="UTF-8"?> 
    9191<Error> 
    92   <Type>Directive</CpaId
     92  <Type>Directive</Type
    9393  <DateTime>#{Time.now.to_s}</DateTime> 
    9494  <Description>#{common_error_description}</Description> 
     
    9999 
    100100          error += "<ErrorFileContent>" 
    101           error += File.read(optional_file) 
     101          opt_file = File.open(optional_file, "r") 
     102          opt_file.each_line{ | line | 
     103            if line =~ /.*<\?xml.*/ then 
     104              # we are not copying xml instruction 
     105            else 
     106              error += line 
     107            end 
     108          } 
     109          opt_file.close 
    102110          error += "</ErrorFileContent>" 
    103111        end 
     
    111119        file.sync = true 
    112120        file.close 
     121 
     122        return true 
    113123      end 
    114124 
  • branches/message-handling-refactor-branch/src/hefeweizen_library_integration_point.rb

    r220 r227  
    3131                  line =~ /^(outgoing: directive-directory:)\s*(.*)$/ or  
    3232                  line =~ /^(outgoing: payload-directory:)\s*(.*)$/ or  
    33                   line =~ /^(error-directory: )\s*(.*)$/ then 
     33                  line =~ /^(error-directory:)\s*(.*)$/ then 
    3434                @logger.debug "Integration point: #{$1} with value #{$2}." 
    3535                integration_point_config[$1] = $2 
     
    6464        @integration_config.each_pair{ | usage, path | 
    6565          path = "#{@config['SPOOL_DIR']}/#{path}" 
    66           if FileTest.exist?(path) and FileTest.executable?(path) and FileTest.readable?(path)
    67             and FileTest.owned?(path) then 
     66          if FileTest.exist? path and FileTest.executable? path and FileTest.readable? path
     67            and FileTest.owned? path then 
    6868            @logger.info "Integration Point: path directory (#{path} does already exist. Nothing to do." 
    6969          else 
    70             FileUtils.mkdir_p(path) 
    71             sleep (0.2) 
     70            FileUtils.mkdir_p path 
     71            sleep 0.2 
    7272            @logger.info "Integration Point: created directory #{path} for #{usage}." 
    7373          end 
  • branches/message-handling-refactor-branch/src/hefeweizen_library_transactions.rb

    r223 r227  
    156156      end 
    157157       
     158      def add_comment comment 
     159        get_state.add_comment comment 
     160      end 
     161 
    158162      def set_root_cause cause 
    159163        path = "#{@transaction_path}/root_cause" 
    160         if !(FileTest.exists?(path) and FileTest.directory?(path) and FileTest.owned?(path)) then 
    161           FileUtils.mkdir(path) 
     164        if !(FileTest.exists? path  and FileTest.directory? path  and FileTest.owned? path) then 
     165          FileUtils.mkdir path 
    162166        end 
    163167        if cause.class == HefeWeizenDirective then 
    164           FileUtils.mv(cause.file, path, :force => true) 
     168          FileUtils.mv cause.file, path, :force => true 
    165169          if !cause.payloads.nil? and !cause.payloads.empty? then 
    166170            @logger.debug "Also copying referenced payloads as root causes. Number of payloads in directives are #{cause.payloads.size.to_s}." 
     
    168172              uuid = HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid 
    169173              target = "#{path}/payload_#{payload_path.gsub(/\//, "@@@@")}_uuid_#{uuid}" 
    170               FileUtils.cp(payload_path, target) 
     174              FileUtils.cp payload_path, target 
    171175            } 
    172176          end 
    173177          return true 
    174178        elsif cause.class == String then 
    175           FileUtils.cp(cause, path) 
     179          FileUtils.cp cause, path 
    176180          return true 
    177181        else 
     
    241245       
    242246      def succeed comment 
    243         return close_transaction "succeeded", comment 
     247        return close_transaction( "succeeded", comment ) 
    244248      end 
    245249 
    246250      def fail comment 
    247         return close_transaction "failed", comment 
     251        return close_transaction( "failed", comment ) 
    248252      end 
    249253 
     
    346350      end 
    347351 
     352      def add_comment comment 
     353        FileUtils.touch "#{@directory}/#{@name}/comment__#{comment}" 
     354      end 
     355 
    348356    end 
    349357 
  • branches/message-handling-refactor-branch/src/taskers/hefeweizen_tasker_application_dir_observer.rb

    r176 r227  
    133133           
    134134              command = HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash 
     135              puts command 
    135136              write_to_ania command 
    136137 
  • branches/message-handling-refactor-branch/test/test-systems/Coronation/infrastructure/integration-points/filebased-integration.conf

    r110 r227  
    11# This file defines one or multiple file and directory based integration points. 
    2 # There are two main types and each type has 2 subtypes: 
     2# There are three main types. These types are incoming, outgoing, and errors 
    33 
    44# incoming:   -> An incoming ebXML message will get unpacked. Metadata will be written to 
     
    1414#                as well as to read and remove the payload files. 
    1515#                 
    16 # example: incoming: directive-dir: <directory> 
    17 # incoming: payload-dir: <directory> 
     16# example: incoming: directive-directory: <directory> 
     17# incoming: payload-directory: <directory> 
    1818# 
    1919# the directory is added to the SPOOL_DIR definition in the HefeWeizen configuration file. 
    2020# 
    2121# so: 
    22 # incoming: directive-dir: /coronation/incoming/directives 
     22# incoming: directive-directory: /coronation/incoming/directives 
    2323# becomes: 
    24 # outgoing: directive-dir: /var/spool/hefeweizen/coronation/incoming/directives 
     24# incoming: directive-directory: /var/spool/hefeweizen/coronation/incoming/directives 
    2525# 
    2626 
    27 incoming: directive-dir: /coronation/incoming/directives 
    28 incoming: payload-dir: /coronation/incoming/payloads 
     27incoming: directive-directory: /coronation/incoming/directives 
     28incoming: payload-directory: /coronation/incoming/payloads 
    2929 
    3030# outgoing:   -> The backend application has to write the payload (the business documents, 
     
    4343 
    4444# there are three configurations required 
    45 # outgoing: directive-dir: <directory> 
    46 # outgoing: payload-dir: <directory> 
    47 # outgoing: error-dir: <directory> 
     45# outgoing: directive-directory: <directory> 
     46# outgoing: payload-directory: <directory> 
    4847# 
    4948# the directory is added to the SPOOL_DIR definition in the HefeWeizen configuration file. 
    5049# 
    5150# so: 
    52 # outgoing: directive-dir: /outgoing/directives  
     51# outgoing: directive-directory: /outgoing/directives  
    5352# becomes: 
    54 # outgoing: directive-dir: /var/spool/hefeweizen/outgoing/directives 
     53# outgoing: directive-directory: /var/spool/hefeweizen/outgoing/directives 
    5554# 
    5655 
    57 outgoing: directive-dir: /coronation/outgoing/directives 
    58 outgoing: payload-dir: /coronation/outgoing/payloads 
    59 outgoing: error-dir: /coronation/outgoing/errors 
     56outgoing: directive-directory: /coronation/outgoing/directives 
     57outgoing: payload-directory: /coronation/outgoing/payloads 
     58 
     59# errors:  -> This is the way HefeWeizen can communicate errors to the backend applications. 
     60#             The HefeWeizen system will create an XML file that includes errors and will 
     61#             store those files in an error directory. 
     62#             Any errors will be reported here. Any means for processing of  
     63#             o outgoing directives 
     64#             o incoming ebXML messages 
     65#              
     66#             System Errors will not be reported here. Only what is relevant to this B2B party. 
     67# syntax: 
     68# error-directory: <directory> 
     69# example: 
     70# error-directory: /coronation/error-directory 
     71# becomes: 
     72# error-directory: /var/spool/hefeweizen/coronation/error-directory 
     73 
     74error-directory: /coronation/errors 
  • branches/message-handling-refactor-branch/test/test-systems/Gnaraloo/infrastructure/integration-points/filebased-integration.conf

    r115 r227  
    11# This file defines one or multiple file and directory based integration points. 
    2 # There are two main types and each type has 2 subtypes: 
     2# There are three main types. These types are incoming, outgoing, and errors 
    33 
    44# incoming:   -> An incoming ebXML message will get unpacked. Metadata will be written to 
     
    1414#                as well as to read and remove the payload files. 
    1515#                 
    16 # example: incoming: directive-dir: <directory> 
    17 # incoming: payload-dir: <directory> 
     16# example: incoming: directive-directory: <directory> 
     17# incoming: payload-directory: <directory> 
    1818# 
    1919# the directory is added to the SPOOL_DIR definition in the HefeWeizen configuration file. 
    2020# 
    2121# so: 
    22 # incoming: directive-dir: /gnaraloo/incoming/directives 
     22# incoming: directive-directory: /gnaraloo/incoming/directives 
    2323# becomes: 
    24 # outgoing: directive-dir: /var/spool/hefeweizen/gnaraloo/incoming/directives 
     24# incoming: directive-directory: /var/spool/hefeweizen/gnaraloo/incoming/directives 
    2525# 
    2626 
    27 incoming: directive-dir: /gnaraloo/incoming/directives 
    28 incoming: payload-dir: /gnaraloo/incoming/payloads 
     27incoming: directive-directory: /gnaraloo/incoming/directives 
     28incoming: payload-directory: /gnaraloo/incoming/payloads 
    2929 
    3030# outgoing:   -> The backend application has to write the payload (the business documents, 
     
    4343 
    4444# there are three configurations required 
    45 # outgoing: directive-dir: <directory> 
    46 # outgoing: payload-dir: <directory> 
    47 # outgoing: error-dir: <directory> 
     45# outgoing: directive-directory: <directory> 
     46# outgoing: payload-directory: <directory> 
    4847# 
    4948# the directory is added to the SPOOL_DIR definition in the HefeWeizen configuration file. 
    5049# 
    5150# so: 
    52 # outgoing: directive-dir: /outgoing/directives  
     51# outgoing: directive-directory: /outgoing/directives  
    5352# becomes: 
    54 # outgoing: directive-dir: /var/spool/hefeweizen/outgoing/directives 
     53# outgoing: directive-directory: /var/spool/hefeweizen/outgoing/directives 
    5554# 
    5655 
    57 outgoing: directive-dir: /gnaraloo/outgoing/directives 
    58 outgoing: payload-dir: /gnaraloo/outgoing/payloads 
    59 outgoing: error-dir: /gnaraloo/outgoing/errors 
     56outgoing: directive-directory: /gnaraloo/outgoing/directives 
     57outgoing: payload-directory: /gnaraloo/outgoing/payloads 
     58 
     59# errors:  -> This is the way HefeWeizen can communicate errors to the backend applications. 
     60#             The HefeWeizen system will create an XML file that includes errors and will 
     61#             store those files in an error directory. 
     62#             Any errors will be reported here. Any means for processing of  
     63#             o outgoing directives 
     64#             o incoming ebXML messages 
     65#              
     66#             System Errors will not be reported here. Only what is relevant to this B2B party. 
     67# syntax: 
     68# error-directory: <directory> 
     69# example: 
     70# error-directory: /gnaraloo/error-directory 
     71# becomes: 
     72# error-directory: /var/spool/hefeweizen/gnaraloo/error-directory 
     73 
     74error-directory: /gnaraloo/errors