ITQuants blog

Fusion Invest/Capital Sophis v7: how to update third parties?

Apr 28

Written by:
4/28/2016 6:11 PM  RssIcon

For clients on which the Sophis Risque or Sophis Value was already installed, during the migration, it is quite easy to detect which modifications have to be done when comparing the code. But this step is only one of the different tasks that have to be done. For example, almost nothing was changed on the interface CSRThirdParty (eq CSMThirdParty in C#) concerning the third parties (entities, depositaries, counterparties, brokers...). But unlucky, when trying to use some piece of code that permits to update the external reference, the domiciliation, the broker or whatever which field, you will got an exception in v7, indicating that the method is not implemented. This is can be detected only during the migrations tests of non-regression.

For example, the following code that worked fine before:

const sophis::backoffice_kernel::CSRThirdParty* third = sophis::backoffice_kernel::CSRThirdPartyDlg::GetCSRThirdParty(someIdent);
if(third!=NULL)
{
    sophis::backoffice_kernel::CSRThirdPArty  thirdToSave = third->Clone();
    try
    {
        thirdToSave->SetDomicile(szDomiciliation);
        thirdToSave->Save(sophis::backoffice_kernel::smApi);
    }
}
catch(sophis::tools::VoteException& exception)
{
   CSRFitDialog::Message((const char*)exception);
}

 

And should be replaced by this one:

sophis::backoffice_kernel::CSRThirdPartyDlg* dlg = sophis::backoffice_kernel::CSRThirdPartyDlg::GetCSRThirdParty(someIdent);
if(dlg!=NULL)
{
    dlg = dlg->Clone();
    try
    {
        if(dlg->Load())
        {
            dlg->SetDomicile(szDomiciliation);
            dlg->Save(sophis::backoffice_kernel::smApi);
        }
        catch(sophis::tools::VoteException& exception)
        {
             CSRFitDialog::Message((const char*)exception);
        }
        delete dlg;
}

 

  In conclusion, you just have to use the right class!!

 

1 comment(s) so far...


Gravatar

Re: Fusion Invest/Capital Sophis v7: how to update third parties?

Sorry, for but unknown reason, I'm not able to put the bracket at the right place using the C++ syntax recognizer in the last paragraph.

By Philippe Bonneau on   4/28/2016 6:41 PM

Search blog