| 734 | | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_send_ebXML_message.rb", |
|---|
| 735 | | "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 #{ebXML_message_file_path} --parameters-file-path #{ebXML_message_parameters_file_path} --transaction-id #{@transaction.transaction_id} --state-expectation #{expectation}", |
|---|
| | 764 | # "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_send_ebXML_message.rb", |
|---|
| | 765 | # "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 #{ebXML_message_file_path} --parameters-file-path #{ebXML_message_parameters_file_path} --transaction-id #{@transaction.transaction_id} --state-expectation #{expectation}", |
|---|
| | 766 | |
|---|
| | 767 | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_send_ebXML_message.sh", |
|---|
| | 768 | "tasker arguments" => "#{@config['CONFIG_DIR']}/hefeweizen.conf #{@b2b_system_name} #{@transaction.transaction_id} #{@config['PIPE_TO_ANIA']} #{ebXML_message_file_path} #{expectation} #{ebXML_message_parameters_file_path}", |
|---|
| 2845 | | def start_a_signing_tasker metadata |
|---|
| 2846 | | expectation = "signed_ebXML_message_done" |
|---|
| 2847 | | command_hash = { |
|---|
| 2848 | | "from" => "big_ania", |
|---|
| 2849 | | "to" => "ania", |
|---|
| 2850 | | "command" => "start_tasker", |
|---|
| 2851 | | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_sign_ebXML_message.rb", |
|---|
| 2852 | | "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.transaction_id} --state-expectation #{expectation}", |
|---|
| 2853 | | "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid |
|---|
| 2854 | | } |
|---|
| 2855 | | @logger.debug "Call tasker to send ebXML message." if @debug |
|---|
| 2856 | | command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" |
|---|
| 2857 | | |
|---|
| 2858 | | return command, expectation |
|---|
| 2859 | | |
|---|
| 2860 | | end |
|---|
| | 2881 | def start_a_signing_tasker metadata |
|---|
| | 2882 | expectation = "signed_ebXML_message_done" |
|---|
| | 2883 | command_hash = { |
|---|
| | 2884 | "from" => "big_ania", |
|---|
| | 2885 | "to" => "ania", |
|---|
| | 2886 | "command" => "start_tasker", |
|---|
| | 2887 | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_sign_ebXML_message.rb", |
|---|
| | 2888 | "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.transaction_id} --state-expectation #{expectation}", |
|---|
| | 2889 | "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid |
|---|
| | 2890 | } |
|---|
| | 2891 | @logger.debug "Call tasker to send ebXML message." if @debug |
|---|
| | 2892 | command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" |
|---|
| 2862 | | def start_an_encrypting_tasker metadata |
|---|
| 2863 | | expectation = "encrypt_ebXML_message_done" |
|---|
| 2864 | | command_hash = { |
|---|
| 2865 | | "from" => "big_ania", |
|---|
| 2866 | | "to" => "ania", |
|---|
| 2867 | | "command" => "start_tasker", |
|---|
| 2868 | | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_encrypt_ebXML_message.rb", |
|---|
| 2869 | | "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.transaction_id} --state-expectation #{expectation}", |
|---|
| 2870 | | "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid |
|---|
| 2871 | | } |
|---|
| 2872 | | @logger.debug "Call tasker to send ebXML message." if @debug |
|---|
| 2873 | | command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" |
|---|
| 2874 | | |
|---|
| 2875 | | return command, expectation |
|---|
| 2876 | | |
|---|
| 2877 | | end |
|---|
| | 2894 | return command, expectation |
|---|
| | 2896 | end |
|---|
| | 2897 | |
|---|
| | 2898 | def start_an_encrypting_tasker metadata |
|---|
| | 2899 | expectation = "encrypt_ebXML_message_done" |
|---|
| | 2900 | command_hash = { |
|---|
| | 2901 | "from" => "big_ania", |
|---|
| | 2902 | "to" => "ania", |
|---|
| | 2903 | "command" => "start_tasker", |
|---|
| | 2904 | "tasker" => "#{@config['BIN_DIR']}/hefeweizen_tasker_application_encrypt_ebXML_message.rb", |
|---|
| | 2905 | "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.transaction_id} --state-expectation #{expectation}", |
|---|
| | 2906 | "uuid" => HefeWeizen::HefeWeizenLibrary::HefeWeizenUUID.uuid |
|---|
| | 2907 | } |
|---|
| | 2908 | @logger.debug "Call tasker to send ebXML message." if @debug |
|---|
| | 2909 | command = "#{HefeWeizen::HefeWeizenLibrary::HefeWeizenCommand.hash_to_command command_hash}" |
|---|
| 2880 | | def get_ebXML_message_parameters_file_content ebXML_message_id |
|---|
| 2881 | | file_path = @message_state_manager.get_ebXML_message_info_file_path ebXML_message_id |
|---|
| 2882 | | if FileTest.exists? file_path and FileTest.readable? file_path then |
|---|
| 2883 | | return YAML.load((File.open file_path, "r")) |
|---|
| | 2911 | return command, expectation |
|---|
| | 2912 | |
|---|
| | 2913 | end |
|---|
| | 2914 | |
|---|
| | 2915 | |
|---|
| | 2916 | def get_ebXML_message_parameters_file_content ebXML_message_id |
|---|
| | 2917 | file_path = @message_state_manager.get_ebXML_message_info_file_path ebXML_message_id |
|---|
| | 2918 | if FileTest.exists? file_path and FileTest.readable? file_path then |
|---|
| | 2919 | return YAML.load((File.open file_path, "r")) |
|---|
| | 2920 | else |
|---|
| | 2921 | @logger.warn "#{me}: There is no ebXML message parameters file for ebXML message with id '#{ebXML_message_id}' in the path of '#{file_path}'." if @warn |
|---|
| | 2922 | return nil |
|---|
| | 2923 | end |
|---|
| | 2924 | end |
|---|
| | 2925 | |
|---|
| | 2926 | |
|---|
| | 2927 | def exists_ebXML_message_by_id? referenced_ebXML_message_id |
|---|
| | 2928 | path = @message_state_manager.get_ebXML_message_directory referenced_ebXML_message_id |
|---|
| | 2929 | if FileTest.exists? path and FileTest.directory? path then |
|---|
| | 2930 | ebXML_message = path + "/ebXML_message.ebMS2" |
|---|
| | 2931 | if FileTest.exists? ebXML_message then |
|---|
| | 2932 | return true |
|---|
| 2885 | | @logger.warn "#{me}: There is no ebXML message parameters file for ebXML message with id '#{ebXML_message_id}' in the path of '#{file_path}'." if @warn |
|---|
| 2886 | | return nil |
|---|
| 2887 | | end |
|---|
| 2888 | | end |
|---|
| 2889 | | |
|---|
| 2890 | | |
|---|
| 2891 | | def exists_ebXML_message_by_id? referenced_ebXML_message_id |
|---|
| 2892 | | path = @message_state_manager.get_ebXML_message_directory referenced_ebXML_message_id |
|---|
| 2893 | | if FileTest.exists? path and FileTest.directory? path then |
|---|
| 2894 | | ebXML_message = path + "/ebXML_message.ebMS2" |
|---|
| 2895 | | if FileTest.exists? ebXML_message then |
|---|
| 2896 | | return true |
|---|
| 2897 | | else |
|---|
| 2898 | | @logger.warn "#{me}: Message with id #{referenced_ebXML_message_id} does have a directory but does not contain an ebXML_message.ebMS2 message." if @warn |
|---|
| 2899 | | return false |
|---|
| 2900 | | end |
|---|
| 2901 | | else |
|---|
| 2902 | | @logger.warn "#{me}: Message with id #{referenced_ebXML_message_id} does not exist in the message store" if @warn |
|---|
| | 2934 | @logger.warn "#{me}: Message with id #{referenced_ebXML_message_id} does have a directory but does not contain an ebXML_message.ebMS2 message." if @warn |
|---|