Table of Contents

BolagsverketRollLookupValve

Warning

This valve is blocking - this may hurt throughput and cause performance issues since other pipes won't be able to execute while this valve is waiting on a long-running operation in the same instance of the pipes module, for example due to a network request, disk access or similar. Try to limit the usage of blocking valves, try to ensure that they are fast to execute, and if needed, consider deploying multiple instances of the pipes module.

Note

Valve for performing a person/organization lookup against Bolagsverket to fetch person roles for the organization.

This valve works on an item with a property containing the user's personnummer, a property containing a list of organization numbers and a property containing a list of organization type codes (företagsformer) for each organization number.

After execution, two new items will be created, populated with values fetched from Bolagsverket:

  • organization_rollintyg_id (multivalue, list of rollintygsID)
  • organization_firmatecknare (multivalue, list of firmatecknare)

This valve is normally used in combination (executed after) BolagsverketEngagemangLookupValve.

Properties

Name Description Default value Mandatory Supports property expansion.
keystore_path File path to p12 client certificate file. Yes No
keystore_password Keystore (p12) password. Yes No
endpoint_url Bolagetsverket endpoint URL. Defaults to Bolagsverket test environment endpoint url. https://ssbtgu-accept2.bolagsverket.se/ssbtro-dft-web/SsbtServicePorts/Test/SsbtRoTestService No No
organization_nr_end_customer Organization number. Yes No
organization_display_name_end_customer Organization display name. Yes No
personnr_property_name Item property name containing the user's personnummer. Personnummer must be in format YYYYMMDDXXXX. Yes No
person_display_name_property_name Item property name containing the user's display name. Yes No
status_property_name Item property name that will be populated with the status of the lookup operation. bolagsverket_roll_status No No
service_name E-service (consumer) name. Yes
engagemang_organisationer_property_name Item property containing list of organizations. Yes
engagemang_organisationer_foretagsformer_property_name Item property containing list of organization type codes (företagsformer). Yes
proceed_on_error If the bolagsverket api call fails for some reason (for example, when a user lacks engagements), the pipe will continue executing. false No No

Example Configuration

            {
                "name": "BolagsverketRollLookupValve",
                "config": {
                    "keystore_path": "/opt/PhenixID/Server/4_3/keystore/bv.p12",
                    "keystore_password": "abc123",
                    "endpoint_url":          "https://ssbtgu-accept2.bolagsverket.se/ssbten-dft-web/SsbtServicePorts/Test/SsbtEnTestService",
                    "personnr_property_name": "pnr",
                    "person_display_name_property_name": "pname",
                    "organization_display_name_end_customer": "X AB",
                    "organization_nr_end_customer": "5569991010",
              "service_name" : "TEST",
              "engagemang_organisationer_property_name" : "organization_number",
              "engagemang_organisationer_foretagsformer_property_name" : "organization_type_code"
                }
            }

Requirements

This information must be obtained from Bolagsverket.

  • Client certificate and password in p12 format to contact the web service

  • Host IP (PAS server) allowance to contact the web service

  • Organization number

  • Organization name

  • e-service (consumer) name