This example shows how to startup a case. The example covers following:

Part A)

  • Simple onboarding for a case with a single company

  • The service functions ImportCompany, AnalyzeImport and PerformImport to fill a new case with data from external services

  • Adding an applied installment loan

  • Adding an existing installment loan

  • Adding a guarantor as collateral

  • Store a case in the database

  • Create a deep-link to a specific case in the GUI

  • Store documents, that is provided by the external service mentioned above, in the database

Part B)

  • Fetch a case from the database

  • Fetch a document that is attached to the case

Part C)

  • Calculate and get calculated results from a company in the case

Part D)

  • Create a credit PM

Part E)

  • Delete a case

Part F)

  • List cases by a company organisation number

Part X) (Additional functionality)

  • Adding/updating imported bails.

  • Webhook

initService

public static ApplicationserviceImplSEI initService() {
/* Creates an instance of the webservice client */
ApplicationserviceImpl appImp = new ApplicationserviceImpl();
ApplicationserviceImplSEI app = appImp.getApplicationserviceImplSEIPort();
/* Set endpoint url, username and password (http basic auth) */
Map<String, Object> reqContext = ((BindingProvider) app).getRequestContext();
reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, WebServiceTests.ENDPOINT);
reqContext.put(BindingProvider.USERNAME_PROPERTY, WebServiceTests.USERNAME);
reqContext.put(BindingProvider.PASSWORD_PROPERTY, WebServiceTests.PASSWORD);
return app;
}

A-F Startup case

//-------------------------------------------------------------------------------
//A) USECASE - Create new case and fill with some data and store the case
//-------------------------------------------------------------------------------
 
//---- STEP A.1 Create an empty case or fetch an existing case that should be updated ----
 
//Create empty case
CompanyCalcInput caseData = new CompanyCalcInput();
caseData.setCalculationDate(new Date());
caseData.getCalculationDate().setYear(2021);
caseData.getCalculationDate().setMonth(4);
caseData.setCalcInformation(new CalcInformation());
caseData.getCalcInformation().setCalcName("New application form");
DateWithDayAndTime createdDate = new DateWithDayAndTime();
createdDate.setYear(2023);
createdDate.setMonth(10);
createdDate.setDay(26);
caseData.getCalcInformation().setCreatedDateTime(createdDate);
caseData.getCalcInformation().setStatus(Status.IN_PROGRESS);
caseData.getCalcInformation().setUserName(USERNAME); //Handläggare
caseData.setMainCurrency(Currency.SEK);
//Custom data like keys/id to connect the case to another system can be stored in the case
caseData.setCustomJson("{\"CRM_CASEID\": 123456}");
 
//Fetch your global settings and assign them to the case.
//These are controlled by admin users in the GUI.
//Among other things, the settings for the default simulation,
//also known as the credit calculation (kreditkalkylen), are loaded here.
CalcSettings calcSettings = app.getSettings();
caseData.setCalcSettings(calcSettings);
 
//Create the company in the case and set the organization number
Company company = new Company();
caseData.getCompanies().add(company);
company.setID(guid());
CompanyInformation companyInformation = new CompanyInformation();
companyInformation.setOrgNo("5560756792");
company.setCompanyInformation(companyInformation);
 
//Other default simulation settings, i.e. the simple simulations
//conventionally named "Worst", "Likely" etc in the GUI,
//must be assigned to each company for which they should be calculated.
//Each simulation in the list produces a separate output and repayment
//capacity score (meter).
company.getSimulations().addAll(calcSettings.getOtherDefaultSimulations());
 
//---- STEP A.2 Fetch new external data and merge it with the case
 
//Get external data from plugin/service that provides company data
//In this example Swedish UC (capitex.companycalc.services.imp.uc.ImportCompany)
CompanySearch companySearch = new CompanySearch();
companySearch.setOrgNo("5560756792");
companySearch.setSourcename("capitex.companycalc.services.imp.uc.ImportCompany");
ImportData dataFromPluginUC = app.importCompany(companySearch);
 
ImportAnalyzeInput importAnalyzeInput = new ImportAnalyzeInput();
importAnalyzeInput.setImportData(dataFromPluginUC);
importAnalyzeInput.setInputData(caseData);
importAnalyzeInput.setImportType(ImportType.UPDATE_COMPANY);
importAnalyzeInput.setImportScope(ImportScope.COMPANY_AND_GROUP);
 
//Analyze how the data from the plugin would affect the case.
ImportActions actions = app.analyzeForImport(importAnalyzeInput);
 
//Present actions, questions and possible answers to the user.
for (ImportAction action : actions.getActions()) {
System.out.println(action.getDescription());
Question question = action.getQuestion();
if (question != null) {
System.out.println(question.getQuestion() + " [" + question.getQuestionID() + "]");
for (Answer possibleAnswer : ((SimpleMultiChoiceQuestion)question).getPossibleAnswers()) {
System.out.println("( ) " + possibleAnswer.getAnswer() + " [" + possibleAnswer.getAnswerID() + "]");
}
}
}
/*
Bokslut saknas för ett eller flera år för Nya Levator Industrihus AB (5560756792).
Vad vill du göra med de år som saknar bokslut? [NEWACTUAL]
( ) Mata in uppgifter från årsredovisning manuellt. [MANUAL]
( ) Skapa en ny automatisk prognos. [AUTO]
( ) Använda samma uppgifter som senast utfall. [FLAT]
*/
 
PerformImportInput performImportInput = new PerformImportInput();
 
//In this test-code we just emulate the user answers
// (*) Skapa en ny automatisk prognos.
AnsweredQuestion auto = new SimpleMultiChoiceAnswer();
auto.setQuestionID("NEWACTUAL");
((SimpleMultiChoiceAnswer)auto).setAnswerID("AUTO");
performImportInput.getAnsweredQuestions().add(auto);
 
performImportInput.setImportData(dataFromPluginUC);
performImportInput.setInputData(caseData);
//Import as new company overwrites all existing info about the company
performImportInput.setImportType(ImportType.IMPORT_TO_NEW_COMPANY);
performImportInput.setImportScope(ImportScope.COMPANY_AND_GROUP);
 
//Perform the merge of the external data into the case based on
//the answers of the questions.
caseData = app.performImport(performImportInput);
 
//---- STEP A.3 Repeat step 2 for other data sources and merge with the case
 
//Get external data from file based service
//In this example Swedish SIE-file
CompanyFileImport companyFileImport = new CompanyFileImport();
companyFileImport.setSourcename("capitex.companycalc.services.imp.sie.ImportCompany");
companyFileImport.getFileContents().add(readWholeFile("5560756792.sie"));
ImportData dataFromPluginSIE = app.importCompanyFromFile(companyFileImport);
 
//Normally we should do as in step 2 and analyze how the data from the plugin would affect the case, present
//actions, questions and possible answers to the user. But in this test there will be no questions so we don't
//need to send in any answers either, just do the merge directly. (there will be no questions because the file
//only contains accounting data for two years that are missing in the UC import in this specific case)
performImportInput.setImportData(dataFromPluginSIE);
performImportInput.setInputData(caseData);
//Update company merges data
performImportInput.setImportType(ImportType.UPDATE_COMPANY);
performImportInput.setImportScope(ImportScope.COMPANY_AND_GROUP);
 
//Perform the merge of the external data into the case based on
//the answers of the questions.
caseData = app.performImport(performImportInput);
 
//---- STEP A.4 Directly update/merge the case with some data from internal systems etc using custom logic
//instead of the logic in analyze/perform feature.
 
//Here just a very simplified example where we replace/set some data completely because we
//now it's a new empty case.
 
//Actual date should always be updated when working with the case
caseData.setActualDate(now());
 
//The applied loan
InstallmentLoan appliedLoan = new InstallmentLoan();
caseData.getCompanies().get(0).getAppliedLoans().add(appliedLoan);
appliedLoan.setLoanID(guid());
CurrencyValuePair loanAmount = new CurrencyValuePair();
loanAmount.setAmount(200_000);
loanAmount.setCurrency(Currency.SEK);
appliedLoan.setLoanAmount(loanAmount);
appliedLoan.setLoanTermMonths(36);
appliedLoan.setAmortization(new AmortizationStraight());
appliedLoan.setCreditAvailableFromDate(date(2021, 4, 1)); //Credit available from april 2021
MarginalRate rate = new MarginalRate();
rate.setBaseRate(AvailableBaseRate.STIBOR_90);
rate.setRatePercentage(4.3);
appliedLoan.setInterestRate(rate);
appliedLoan.setArrangementFeePercentage(1);
appliedLoan.setStatus(AppliedLoanStatus.NEW);
 
//Existing loans
ExistingInstallmentLoan existingInstallmentLoan = new ExistingInstallmentLoan();
caseData.getCompanies().get(0).getExistingLoans().add(existingInstallmentLoan);
existingInstallmentLoan.setIsLoanInOtherBank(false);
existingInstallmentLoan.setStatus(ExistingLoanStatus.KEEP);
existingInstallmentLoan.setLoanID(guid());
loanAmount = new CurrencyValuePair();
loanAmount.setAmount(200_000);
loanAmount.setCurrency(Currency.SEK);
existingInstallmentLoan.setLoanAmount(loanAmount);
existingInstallmentLoan.setLoanTermMonths(36);
existingInstallmentLoan.setAmortizationPercentage(2);
Rate simpleRate = new Rate();
rate.setRatePercentage(7.2);
existingInstallmentLoan.setInterestRate(simpleRate);
 
//Add collaterals
CollateralRights collaterals = new CollateralRights();
caseData.getCompanies().get(0).setSecurities(collaterals);
 
//Add guarantor as collateral (privat borgen)
Guarantor guarantor = new Guarantor();
collaterals.getCollateralRights().add(guarantor);
guarantor.setCollateralCurrency(Currency.SEK);
guarantor.setCollateralType(CollateralType.GENERAL);
guarantor.setID(guid());
 
BailValue bailValue = new BailValue();
guarantor.getCollateralValues().add(bailValue);
bailValue.setTypeOfBail(TypeOfBail.SOLIDARITY);
bailValue.setID(guid());
bailValue.setValue(300_000); //The agreed collateral amount
AutoOrValuePair estimatedValue = new AutoOrValuePair();
estimatedValue.setValue(100); //The estimated value in percentage of the collateral amount
bailValue.setEstimatedValuePercentage(estimatedValue);
 
Bondsman bondsman = new Bondsman();
bailValue.getBondsmen().add(bondsman);
bondsman.setIdentificationNumber("7308082899");
bondsman.setAddress("Storgatan 22, 123 56 Staden");
bondsman.setName("Kalle Svensson");
 
/* Add information about personal check with ID ImportPersonUC named UC. The ID and the name must match the
* customer specific configuration. */
PersonalCheck personalCheck1 = new PersonalCheck();
caseData.getPersonalChecks().add(personalCheck1);
personalCheck1.setIdentificationNumber("7308082899");
personalCheck1.setDataSourceID("ImportPersonUC");
personalCheck1.setDataSourceName("UC");
DateWithDay checkDate1 = new DateWithDay();
personalCheck1.setCheckDate(checkDate1);
checkDate1.setDay(20);
checkDate1.setYear(2023);
checkDate1.setMonth(3);
/* If the status comes directly unchanged from the underlying system like UC or auto calculated using other
integrated systems you should use one of the following statuses AUTO_APPROVED, AUTO_REJECTED or NEED_REVIEW.
*/
personalCheck1.setPersonalCheckStatus(PersonalCheckStatus.AUTO_APPROVED);
//Approval text from UC
personalCheck1.setCommentOnPersonalCheckStatus("Inga anmärkningar.");
 
// Add advice and comments from the UC credit check on the whole company.
// In this simple case ScoringAndRisk is already known to be null for company 0, so create a new instance.
ScoringAndRisk scoringAndRisk = new ScoringAndRisk();
caseData.getCompanies().get(0).setScoringAndRisk(scoringAndRisk);
scoringAndRisk.setAdviceFromCreditCheck(CreditCheckAdviceStatus.NEED_REVIEW);
scoringAndRisk.setCommentsFromCreditCheck("Företaget har 2 betalningsanmärkningar");
 
//Step A.5 Store the case in the database
InfoResponse saveResponse = app.saveCalculation(caseData);
 
System.out.println("saveResponse.Information: " + saveResponse.getInformation());
Assert.assertEquals(true, saveResponse.isOk());
String caseID = saveResponse.getInformation();
 
//Now it's possible to a create a deep link to the user interface for this case:
String deeplink = "<a href=\"https://server/context/startCompanyCalc.html?standalone=1&opencase="
+ caseID +"\">Open the case</a>";
 
//Step A.6 - Import documents directly to the case in the database
ImportAndSaveDocumentsParameters importDocsInput = new ImportAndSaveDocumentsParameters();
//To what case should the documents be saved.
importDocsInput.setCaseID(caseID);
importDocsInput.setCompanySearch(companySearch);
for (Document docInfo : dataFromPluginUC.getDocuments()) {
importDocsInput.getDocumentTypes().add(docInfo.getDocumentType());
}
app.importAndSaveDocumentsForCalculation(importDocsInput);
 
//-------------------------------------------------------------------------------
//B) USECASE - Read a stored case
//-------------------------------------------------------------------------------
Id id = new Id();
id.setID(caseID);
caseData = app.fetchCalculation(id);
 
//B.2 - Read info about documents connected to a case
List<CompanyCalcDocument> documents = app.listAllDocumentsForCalculation(id);
 
//B.3 - Read the first document
Id docid = new Id();
docid.setID(documents.get(0).getDocumentID());
CompanyCalcDocument document = app.getDocumentForCalculation(docid);
Assert.assertEquals("%PDF", (new String(document.getDocument().getDocumentData())).substring(0, 4));
 
//-------------------------------------------------------------------------------
//C) USECASE - Get calculated results
//-------------------------------------------------------------------------------
CaseCalcOutput calculatedData = app.doCaseCalculation(caseData);
 
//Check Repayment Capacity, not secured part of credit and ECL
CompanyCalcOutput resultsForCompany =
calculatedData.getDetailedResultsPerCompany().get(0);
//Repayment capacity for the forecast that you can change in the UI and actual interest rates
Assert.assertEquals(0, resultsForCompany.getCalculatedScoring().getRepaymentCapacityScore(), 1);
//Repayment capacity for the forecast specified in the credit rules and higher interest rates
Assert.assertEquals(56, resultsForCompany.getCalculatedScoring().getDefaultSimulationRepaymentCapacityScore(), 1);
Assert.assertEquals(100_000, resultsForCompany.getCollateralRights().getNotSecuredPartOfCredit(), 1);
Assert.assertEquals(40, resultsForCompany.getCollateralRights().getExpectedCreditLossECL(), 1);
 
//The RepaymentCapacityScore is the value
//that is shown by the meters in the GUI.
//This is the Current (Aktuell) meter in the GUI,
//i.e. results after financing, but without simulated strain.
double currentScenarioRepaymentCapacity
= resultsForCompany.getCalculatedScoring().getRepaymentCapacityScore();
//This is the Credit calculation (Kreditkalkyl) in the GUI,
//i.e. with standard simulated strain applied.
//This simulation always calculated for all companies,
//regardless of the contents in company.getSimulations().
double creditCalcRepaymentCapacity
= resultsForCompany.getCalculatedScoring().getDefaultSimulationRepaymentCapacityScore();
 
//These are the other simulations applied to the company
//in the list company.getSimulations().
//Each input element in the list has a corresponding
//output element in resultsForCompany.getSimulations().
//The names in the output elements correspond to
//the names of the input elements, which are normally set
//on the company object from the CalcSettings, as was shown above
//when the company object was initialized.
//In other words, the names are ultimately determined
//by the admin in control of the settings in the GUI.
double worstCaseScenarioRepaymentCapacity =
getSimulationResultByName("Worst", resultsForCompany.getSimulations()).getRepaymentCapacityScore();
double likelyScenarioRepaymentCapacity =
getSimulationResultByName("Likely", resultsForCompany.getSimulations()).getRepaymentCapacityScore();
 
//RepaymentCapacityScore spans from 0 to 100, where 100 is best.
//This logic is used by the meters and corresponds
//to the colors of the KPI values:
//Red: 0 <= x < 25
//Yellow: 25 <= x < 50
//Green: 50 <= x <= 100
boolean currentMeterIsGreen = currentScenarioRepaymentCapacity >= 50.0;
boolean creditCalcIsYellow = creditCalcRepaymentCapacity >= 25.0 && creditCalcRepaymentCapacity < 50.0;
boolean worstCaseMeterIsRed = worstCaseScenarioRepaymentCapacity < 25.0;
boolean likelyMeterIsYellow = likelyScenarioRepaymentCapacity >= 25.0 && likelyScenarioRepaymentCapacity < 50.0;
 
//-------------------------------------------------------------------------------
//D) USECASE - Get the Credit PM from the case
//-------------------------------------------------------------------------------
CreateDocument createDocument = new CreateDocument();
createDocument.setDocumentFormat("PDF");
createDocument.setInputData(caseData);
createDocument.getPrintouts().add(new CreditPMPrintout());
byte[] creditPMAsPDF = app.createDocument(createDocument).getDocument();
 
//Check the filetype signature
Assert.assertEquals("%PDF", (new String(creditPMAsPDF)).substring(0, 4));
 
//-------------------------------------------------------------------------------
//E) USECASE - Delete a case
//-------------------------------------------------------------------------------
 
//E.1 - Delete documents connected to a case
for (CompanyCalcDocument doc: documents) {
Id docId = new Id();
docId.setID(doc.getDocumentID());
app.deleteDocumentForCalculation(docId);
}
 
//E.2 - Delete the case
app.deleteCalculation(id);
 
//-------------------------------------------------------------------------------
//F) USECASE - Find cases by organisation number
//-------------------------------------------------------------------------------
ListAllCalculationsForACompanyInput query = new ListAllCalculationsForACompanyInput();
query.setCompanyOrgNo("5560756792");
List<CalculationInfo> list = app.listAllCalculationsForACompany(query);
//We deleted the case previously so no case should be found
Assert.assertEquals(0, list.size());

X) Additional functionality

X.1 Modify/add information on bails from external sources.

capitex_config.xml (for on-prem installations of Capitex Business Loan)

<plugin ID="ImportPersonUC" pluginImpl="capitex.companycalc.services.imp.generic.ImportPerson" inkludera="true" >
<FriendlyName>UC</FriendlyName>
<ReportSpecification>
{
"datatype": "capitex.companycalc.services.dto.ReportSpecification",
"ReportSectionSpecifications": [
{
"datatype": "capitex.companycalc.services.dto.ReportSectionSpecification",
"ReportSectionName": "Kreditråd UC",
"ReportSectionID": "CreditAdviceUC",
"ParameterDeclarations": [
{
"datatype": "capitex.companycalc.dto.ParameterDeclaration",
"FriendlyParameterName": "Datum",
"ParameterName": "Date",
"ParameterType": "Date",
"ReadOnly": true
},
{
"datatype": "capitex.companycalc.dto.ParameterDeclaration",
"FriendlyParameterName": "Sökt belopp",
"ParameterName": "AppliedAmount",
"ParameterType": "Number",
"ReadOnly": true
},
{
"datatype": "capitex.companycalc.dto.ParameterDeclaration",
"FriendlyParameterName": "Kreditråd",
"ParameterName": "Status",
"ParameterType": "StringRestricted",
"ReadOnly": true,
"ExtendedDetails": "Beviljas:Beviljas;Prövning:Prövning;Avslag:Avslag"
},
{
"datatype": "capitex.companycalc.dto.ParameterDeclaration",
"FriendlyParameterName": "Kommentar",
"ParameterName": "AdditionalInformation",
"ParameterType": "StringMultiline",
"ReadOnly": true
}
]
}
]
}
</ReportSpecification>
</plugin>

X.1.1 Add customized report section to personal bails (Privat borgen)

// X.1.1 Add customized report section to personal bails (Privat borgen).
// Fields here must map against fields specified in capitex_config.xml for specific import plugin.
PersonReport personReport = new PersonReport();
caseData.getPersonalChecks().get(0).setPersonReport(personReport);
 
ReportSection reportSection = new ReportSection();
personReport.getReportSections().add(reportSection);
reportSection.setReportSectionID("CreditAdviceUC");
reportSection.setReportSectionName("Kreditråd UC");
 
NameValues nameValues = new NameValues();
reportSection.setReportSectionParameters(nameValues);
nameValues.getNamedValues()
.addAll(Arrays.asList(new NamedValue(), new NamedValue(), new NamedValue(), new NamedValue()));
nameValues.getNamedValues().get(0).setName("Date");
nameValues.getNamedValues().get(0).setValue("2023-05-07");
nameValues.getNamedValues().get(1).setName("AppliedAmount");
nameValues.getNamedValues().get(1).setValue("1000000");
nameValues.getNamedValues().get(2).setName("Status");
nameValues.getNamedValues().get(2).setValue("Prövning"); //Valid values defined in configuration: Beviljas;Prövning;Avslag
nameValues.getNamedValues().get(3).setName("AdditionalInformation");
nameValues.getNamedValues().get(3).setValue("Comments from UC");

X.1.2 Modify imported fields for business bails (Företagsborgen)

// X.1.2 Modify imported fields for business bails (Företagsborgen)
BusinessBail businessBail = new BusinessBail();
caseData.getCompanies().get(0).getSecurities().getCollateralRights().add(businessBail);
businessBail.setID(guid());
businessBail.setCollateralType(CollateralType.GENERAL);
BailValue businessBailValue = new BailValue();
businessBail.getCollateralValues().add(businessBailValue);
businessBailValue.setID(guid());
businessBailValue.setTypeOfBail(TypeOfBail.LIMITED);
BusinessBondsman businessBondsman = new BusinessBondsman();
businessBailValue.getBondsmen().add(businessBondsman);
businessBondsman.setIdentificationNumber("1231231231");
 
PersonalCheck businessBailPersonalCheck = new PersonalCheck();
caseData.getPersonalChecks().add(businessBailPersonalCheck);
businessBailPersonalCheck.setIdentificationNumber(businessBondsman.getIdentificationNumber());
businessBailPersonalCheck.setDataSourceID("ImportPersonJuridicalPerson");
businessBailPersonalCheck.setDataSourceName("UC");
businessBailPersonalCheck.setPersonalCheckStatus(PersonalCheckStatus.AUTO_APPROVED);
businessBailPersonalCheck.setCommentOnPersonalCheckStatus("Status baserat på rekommendation från UC tjänsten.");
 
DateWithDay checkDate2 = new DateWithDay();
businessBailPersonalCheck.setCheckDate(checkDate2);
checkDate2.setYear(2024);
checkDate2.setMonth(1);
checkDate2.setDay(2);
 
PersonReport businessBailReport = new PersonReport();
businessBailPersonalCheck.setPersonReport(businessBailReport);
 
ReportSection reportSectionBasis = new ReportSection();
businessBailReport.getReportSections().add(reportSectionBasis);
reportSectionBasis.setReportSectionID("BASIS");
reportSectionBasis.setReportSectionName("Underlag/ansökan");
 
NameValues basisParameters = new NameValues();
reportSectionBasis.setReportSectionParameters(basisParameters);
basisParameters.getNamedValues().addAll(Arrays.asList(new NamedValue(), new NamedValue()));
basisParameters.getNamedValues().get(0).setName("APPLIED_AMOUNT");
basisParameters.getNamedValues().get(0).setValue("1000000");
basisParameters.getNamedValues().get(1).setName("ORDER_DATE");
basisParameters.getNamedValues().get(1).setValue("2023-05-07");
 
ReportSection reportSectionRisk = new ReportSection();
businessBailReport.getReportSections().add(reportSectionRisk);
reportSectionRisk.setReportSectionID("RISK");
reportSectionRisk.setReportSectionName("Risk");
 
NameValues riskParameters = new NameValues();
reportSectionRisk.setReportSectionParameters(riskParameters);
riskParameters.getNamedValues().addAll(Arrays.asList(new NamedValue(), new NamedValue()));
riskParameters.getNamedValues().get(0).setName("PROBABILITY_OF_DEFAULT_PD_PERCENTAGE");
riskParameters.getNamedValues().get(0).setValue("1.34");
riskParameters.getNamedValues().get(1).setValue("DISCRETE_RATING_FROM_CREDIT_CHECK");
riskParameters.getNamedValues().get(1).setValue("B");
 
ReportSection reportSectionAdvice = new ReportSection();
businessBailReport.getReportSections().add(reportSectionAdvice);
reportSectionAdvice.setReportSectionID("ADVICE");
reportSectionAdvice.setReportSectionName("Råd och kommentarer");
 
NameValues adviceParameters = new NameValues();
reportSectionAdvice.setReportSectionParameters(adviceParameters);
adviceParameters.getNamedValues().addAll(Arrays.asList(new NamedValue(), new NamedValue(), new NamedValue()));
adviceParameters.getNamedValues().get(0).setName("CREDIT_LIMIT_FROM_CREDIT_CHECK");
adviceParameters.getNamedValues().get(0).setValue("250000");
adviceParameters.getNamedValues().get(1).setName("CREDIT_ADVICE");
adviceParameters.getNamedValues().get(1).setValue("Prövning");
adviceParameters.getNamedValues().get(2).setName("COMMENT");
adviceParameters.getNamedValues().get(2).setValue("Comments");