view · edit · sidebar · attach · print · history

Index>

20170530-virbac-error

Summary

  • Virbac cannot find current_order
  • Port sandoz.bbmb.ch to use the rack based SBSM
  • Port sandoz.xmlconv.bbmb.ch to use the rack based SBSM
  • Keep in Mind

Commits

Index

Virbac cannot find current_order

Found the following lines in the app.log of yesterday

I, [2017-05-29T21:20:33.989202 #5838]  INFO -- : login.rb:19:in `login' BBMB::Html::State Login login markus.nydegger@bluewin.ch e2c3144b0deec6c90f94d3400e60f804  NilClass
I, [2017-05-29T21:20:33.998361 #5838]  INFO -- : session.rb:35:in `login' BBMB::Html::Util::Session login markus.nydegger@bluewin.ch e2c3144b0deec6c90f94d3400e60f804  BBMB::Html::Util::KnownUser BBMB.auth #<Yus::Server:0x007f734c03bb70> auth_session #<Yus::EntitySession:0x007f734c373130>
I, [2017-05-29T21:20:34.002520 #5838]  INFO -- : global.rb:26:in `initialize' BBMB::Html::State Global session BBMB::Html::Util::Session model SBSM::UnknownUser
D, [2017-05-29T21:20:34.002619 #5838] DEBUG -- : session.rb:218:in `block in process_rack' active_state.trigger state 69817374528740 BBMB::Html::State::CurrentOrder remember nil
I, [2017-05-29T21:20:34.005598 #5838]  INFO -- : session.rb:244:in `rescue in process_rack' Error in process_rack /var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/bbmb-2.2.5/lib/bbmb/html/state/current_order.rb:20:in `init'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/sbsm-1.4.1/lib/sbsm/session.rb:224:in `block in process_rack'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/sbsm-1.4.1/lib/sbsm/session.rb:208:in `synchronize'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/sbsm-1.4.1/lib/sbsm/session.rb:208:in `process_rack'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/sbsm-1.4.1/lib/sbsm/app.rb:119:in `call'
/var/www/virbac.bbmb.ch/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/lint.rb:49:in `_call'

markus.nydegger@bluewin.ch is recogniced by Yus as a valid customer, but searching for a customer with this email as admin user does not produce any result. Must we check during the login whether it is a valid customer, too? Or should we have found http://virbac.bbmb.ch/de/bbmb/customer/customer_id/700952?

The existing code ignores protected fields like email. Changing the code to change the e-mail address if we have a valid e-mail and the given e-mail is a valid YUS-Entry.

Pushed commits

Port sandoz.bbmb.ch to use the rack based SBSM

Must show nicer error when renaming a user fails. Done with commit Show error, not traceback, when changing a email fails

After adding a method set_email_without_yus in lib/bbmb/model/customer.rb. It was possible to set the email (but only without checking yus). If we want to check whether thy exist in Yus we have to add the admin username and password in etc/config.yml.

Tested with two newly added e-mails that I could see them in the admin interface, change their password and logging in with the new password. Both have an empty archive.

Port sandoz.xmlconv.bbmb.ch to use the rack based SBSM

Start changing Gemfile, config.ru, etc.

Looking at the Apache config I remark, various lines like ScriptAlias /sunstore /var/www/sandoz.xmlconv.bbmb.ch/doc/sunstore.rbx. These script are similar, but use differnt

  • transaction.reader
  • transaction.writer
  • transaction.partner
  • 'Bbmb', 'inject', ENV['ACCESS_BBMB'],
  • xmlconv.dispatch(transaction) or print xmlconv.execute_with_response(transaction)

Are all of them still in use? pharmatic.rbx propharma.rbx soap.rbx sunstore.rbx unilog.rbx volksapotheke.rbx wbmb.rbx?? Zeno said that only propharma.rbx is still needed.

Also thinking about how much and how we move stuff from bin/xmlconvd into the config.ru. E.g. Shouldn't we share the XMLConv.logger?

But first I must port xmlconv itself to use rack. xmlconv has a few failing unit tests which are worth looking at.

view · edit · sidebar · attach · print · history
Page last modified on May 30, 2017, at 04:10 PM