Create channel in PDX
Receive Gateway API-token
Provide your PDX contact with a company name you want to use for this test-adapter, and ask them to provide you with the following:
- a test-adapter
API-token,adapterId, andchannelId
Add your IDs + company name
Inside the Getting Started project, locate the channel setup inside the class:
src/main/java/sdk/getting/started/generator/examples/channels/NoAuthenticationChannel.javaand replace the parameters of the ChannelBuilder.defaultChannel as follows:
channelId(the providedchannelIdwithout the ending "-channel")adapterApplicationName(the providedadapterId)channelName(a human readable name for your channel)
Run code
Generate the channel configuration by running:
./gradlew runExtractorThis runs YourChannelGenerator and produces five JSON files in the project root
directory: the channel configuration, the data standard version, the business
rules version, the generator info version, and a seed file.
Why a dedicated task?
The Getting Started project ships two@AdapterApplicationmain classes
(YourChannelAdapterandYourChannelGenerator), so a plain./gradlew bootRun
fails with "Unable to find a single main class …". TherunExtractortask pins
the generator's main class (sdk.getting.started.generator.YourChannelGenerator);
its counterpartrunAdapterruns the adapter. Both are defined inbuild.gradle.
Verify that the following files are generated in the root directory of the project:
[company-name]-channel.businessrulesversion.json
[company-name]-channel.channel.json
[company-name]-channel.generatorinfoversion.json
[company-name]-channel.seed.json
[company-name]-channel.version.jsonSeed via Gateway API
Once you have done this, put this channel into your PDX UI by running the seed script found in the root of the project.
bash seed.sh API-token ENVIRONMENTwhere API-token is the token you received above, and ENVIRONMENT is one of preprod or prod. The script targets:
preprod→https://pdx-preprod.stibosystems.comprod→https://pdx.stibosystems.com
Verify channel found in API
Verify that your channel was created by using the following link using the channelId you received:
And perform the following steps:
- choose adapter-gateway from the "select a definition"-menu
- provide your
API-tokenby clicking the lock-symbol to the right of the call - run
GET-method/external/channels/{channelId}and provide the channel ID
If your channel was correctly created, you should receive a response similar to the [your-company]-channel.json:
{
"id": "your-company-channel",
"name": "Your Company [SDK-Channel]",
"visibility": "Private",
"externalChannelAttributes": {
"submitTopic": "Publish-adapter-gateway",
"channelAdapterServiceName": "adapter-gateway",
"channelAdapterSupportsAuthentication": false,
"legacyDownloadSupported": false,
"enableAccountsValidation": false,
"invitationOnly": false,
"channelAuthenticationMethod": "SYNCHRONOUS"
},
"currentDatastandardVersionId": "your-company-channel_v2023-10-23T16:29:18",
"currentBusinessRulesVersionId": "your-company-channel_v2023-10-23T16:29:18",
"logoURL": "https://pdx-channel-api-resources.s3.amazonaws.com/SDK_Channel.svg",
"allowMultipleAccounts": false,
"requiredClientAttributes": [],
"hierarchy": {
"isHierarchical": false,
"levels": []
},
"parameters": {}
}Verify channel found in PDX
Use or create user on PDX preprod:
Next, make sure that Private Channels are enabled for your account by contacting PDX representative. Finally:
- go to
Channels>Channels Management - search for your channel and add it
Please ask your contact at PDX if any of the steps above are not working!
Updated 13 days ago
