B2B Integration

 View Only
Expand all | Collapse all

Sterling B2B CI/CD Deployments

  • 1.  Sterling B2B CI/CD Deployments

    Posted Tue October 29, 2019 10:32 PM
    Hello,

    What are your thoughts on integrating Sterling B2B with devops tools( like azure devops or IBM UrbanCode) to achieve continuous integration and continuous deployment. Is it possible by using the B2bi API's? We are trying to automate our deployment of maps,codelists & business processes. Are they any other ways to automate deployments in Sterling B2B and ITXA?

    ------------------------------
    Kishore Reddy
    ------------------------------

    #SupplyChain
    #B2BIntegration


  • 2.  RE: Sterling B2B CI/CD Deployments

    Posted Wed October 30, 2019 09:27 AM
    Hi 
    We  can achieve this requirement now also with little customization. I have done one integration with Microsoft soft VSTS in my previous project. This Integration was done  for deploying maps automatically in to B2Bi. You can take .map and .txo file and pass them to the B2Bi adapters which will bootstrap a BP. In B2Bi write a bp with import service. This will deploy the maps automatically.

    ------------------------------
    Ashok Babu Makkena
    ------------------------------



  • 3.  RE: Sterling B2B CI/CD Deployments

    Posted Fri November 01, 2019 04:05 PM
    How to use IBM Connect:Direct to transfer a file to SFG and change the file name using the contents in Text2 Box: $OFNAME_$MM     ?

    ------------------------------
    Len Sasso
    ------------------------------



  • 4.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 08:44 AM
    we use custom protocol to add ConnectDirect to SFG , here is the documentation on how to do

    _https://www.ibm.com/support/knowledgecenter/en/SS4TGX_2.2.0/com.ibm.help.sfg_sys_admin.doc/SFGAddCustomProtocols.html

    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 5.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 09:30 AM
    Thank you, but could you please provide an example where the Name of the Consumer's File contains the value of the Original File Name ($OFNAME) followed by and underscore (_) and the Current Month ($MM)? 

    Example: Original File Name: ABCD.123

    Resulting Consumer's File Name: ABCD.1234_10

    Thanks!


    ------------------------------
    Len Sasso
    ------------------------------



  • 6.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 09:39 AM
    you can achieve ​this using SFG Template , here is the example matching to your use case..


    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 7.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 09:43 AM
    I am unable to read it - far too small.

    ------------------------------
    Len Sasso
    ------------------------------



  • 8.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 11:30 AM
    I am able to read it.  What do you mean by "you can achieve ​this using SFG Template" ?  Do you mean we need to create a new Business Process?  Please explain.

    ------------------------------
    Len Sasso
    ------------------------------



  • 9.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 11:42 AM

    2 different tasks

    1.       Renaming file from source to a destination (use SFG Template) .

    2.       Transmitting using Connect direct Protocol , you need a BP for custom protocol in SFG .






  • 10.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 04, 2019 11:56 AM
    We have a BP for custom protocol in SFG (transmitting using Connect:Direct Protocol), but I believe you mean we need a NEW Routing Channel Template for "Renaming file from source to a destination" - Correct?

    ------------------------------
    Len Sasso
    ------------------------------



  • 11.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 05, 2019 03:06 AM
    Len - Try clicking on the image, it will expand and then you can read the example.

    ------------------------------
    Marcus Langford
    ------------------------------



  • 12.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 05, 2019 08:52 AM
    Hi Mark !   I was eventually able to read it.  Thanks !

    ------------------------------
    Len Sasso
    ------------------------------



  • 13.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 11, 2019 01:52 PM
    1. I have a RCT to compress a file into GZIP format.

    2. I have a RCT that renames a file - placing the year, month and day at the end of the filename.

    How do I code a RCT to do both?

    Any help or manuals you could provide would be greatly appreciated.

    Thanks !

    ------------------------------
    Len Sasso
    ------------------------------



  • 14.  RE: Sterling B2B CI/CD Deployments

    Posted Mon November 11, 2019 05:06 PM
      |   view attached
    ​Len,
    You will be updating file name under consumer tab under Consumer File Structure of your RCT ,
    i have attached word doc with screen shot of how to update the consumer file name with date time stamp and also zipping and encrypting in a single RCT , hope that will help...

    ------------------------------
    MOHAMMED HAJI
    ------------------------------

    Attachment(s)

    docx
    sfg_rct_screenshots.docx   66 KB 1 version


  • 15.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 12, 2019 08:21 AM
    Edited by System Wed March 22, 2023 11:47 AM
    Thank you so much!

    Question: Is it possible to create the Internal file name in lowercase and suffix it with ".dat"?  If so, how?

    Also, are there manuals/User Guides available?  If so, could you please provide links? 

    I also need to know how to extract a string from the original file name and use it in the consumer's filename.

    I really appreciate any additional help you could provide.

    Thanks !

    ------------------------------
    Len Sasso
    ------------------------------



  • 16.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 12, 2019 12:33 PM
    ​Len,
    here is the link for the documentation for SFG RCT

    _https://www.ibm.com/support/knowledgecenter/en/SS4TGX_2.2.0/com.ibm.help.sfg_route_prov.doc/SFGCreateRoutgChannels.html

    i am not entirely following your question

    Question: Is it possible to create the Internal file name in lowercase and suffix it with ".dat"?  If so, how? 

    in SFG RCT is only meant for file naming , zipping and encryption etc.,  you might be creating a file some where else , you use SFG for transmitting and naming of the files.

    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 17.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 12, 2019 03:45 PM
    I understand we "use SFG for transmitting and naming of the files."  I would like to know if it is possible to name a consumer's file with:

    1. Lowercase letters
    2. ".dat" as the tail

    Ex. Original Filename: ABC.123.xyz          Consumer Filename: abcd.dat

    I would also like to know if it is possible to extract a portion of the original filename and use it in the consumer's filename.

    Ex. Original Filename: ABC.CYC123.xyz          Consumer Filename: DAILY.CHECKS.CYC123 

    Any help you could provide would be greatly appreciated.

    Thanks !


    ------------------------------
    Len Sasso
    ------------------------------



  • 18.  RE: Sterling B2B CI/CD Deployments

    Posted Wed November 13, 2019 06:19 AM
    Hi Len,

    To convert ABC.CYC123.xyz to DAILY.CHECKS.CYC123 you need to do something like this:
    - Define your producer file structure regular expression as (.+)/.(.+)/.(.+) and under facts specify myFilePrefix, myFilePart,myFileSuffix; each section in brackets () is extracted and stored as a "fact" which you can then reference later
    - Define your consumer file structure as DAILY.CHECKS.${myFilePart}

    To add a .dat suffix is easy i.e. just add the literal .dat to the end of the name in the consumer file structure so for example to take the original filename and add .dat just use ${ProducerFilename}.dat

    To convert the entire filename to lowercase you may need to create a customer delivery protocol (as referenced in an earlier answer) which uses xpath or a Java task service (i.e. Java String toLowerCase method) to convert the name to lowercase before delivering the file e.g. in an SFTP PUT or C:D Send service or a Mailbox Add if they're not a listening consumer.



    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 19.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 07:58 AM
    Questions:

    1. Is it possible to copy an existing Code List?

    2. Are there REST APIs for Sterling File Gateway?  If so, could you please provide a link(s)?

    Thank You,

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 20.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 08:21 AM
    Hi Len,

    I believe you can use the export/import utilities to export a code list from one environment and then import to another. 

    REST APIs including code list APIs have been available since 5.2.6.1 but each new version introduces more for example v6.0.2 brought in myFileGateway 2.0 which required adding a bunch of mailbox and document handling APIs. The B2Bi REST APIs in 5.2.6.1 are documented here: https://www.ibm.com/support/knowledgecenter/en/SS4TGX_2.2.0/com.ibm.help.sfg_reference.doc/B2B_APIs_avail.html
    If you follow the "Reference" breadcrumb at the top of the page you will also see a link to the partner onboarding REST APIs page. You can also change version to see APIs in newer or your particular version. 6.0.2 is the current version with 6.0.3 due out before the end of the year.

    Regards,
    Richard.

    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 21.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 08:35 AM
    Hi Richard!

    Thank you for the quick response.

    I want to be able to make a copy of an existing Code List in the CURRENT environment and give it a different name - Same as copying an existing Routing Channel Template. 

    Thank You,

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 22.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 09:15 AM
    Hi Richard!

    I'm looking for a REST API to access a Producer Site (United States Postal Service) and PULL a file to SFG and send to the Consumer (us). 

    Is this possible?

    Thanks,

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 23.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 09:38 AM
    Hi Len,

    Depends what's available from USPS. Do you mean retrieve the file via a REST call to USPS? If so then you'd need to use the HTTP Client adapters to connect to and issue the relevant HTTP calls to get the file from USPS's REST server. The Client GET (or POST) service will store the response as a document in your BP. You may then need to use something like the MIME service to extract the file and store it to a mailbox from which normal SFG routing is triggered. It's easier from 6.0.1 as there's now a REST API Client adapter: https://www.ibm.com/support/knowledgecenter/en/SS3JSW_6.0.1/integrating/integrating/integrator/REST_Client_Adapter.html
    If on the other hand you mean is there a REST API to trigger for example an SFTP PULL from USPS then you can implement that by setting up an HTTP Server Adapter with a URI that triggers a BP that does the SFTP PULL and again stores it to a mailbox from which SFG routing is triggered. There are plans for a REST Server adapter but as of the last I heard that's planned for next year some time...as always roadmap plans are subject to change :-)

    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 24.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 09:51 AM
      |   view attached
    Richard:

    I have attached the USPS Documentation.  I have no experience with JASON or REST APIs.

    Thank You,

    Len

    ------------------------------
    Len Sasso
    ------------------------------

    Attachment(s)

    doc
    epf-restful-ws.doc   82 KB 1 version


  • 25.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 10:36 AM
    This will be easier with SFG v6 as you can use the REST API Client for all calls except the document get plus you have the JSON Transform service to convert between the JSON input/output and ProcessData XML. The challenge with the document get is that you need to save the Logon and Token keys from the HTTP Response Headers - I suggest opening an RFE to be able to get the HTTP Response Headers from a REST call passed into ProcessData - for now if you use the HTTP POST Client with rawresponse set to Yes then you can do this (wrap the request with a HTTP Session Begin and Session End service) although you'll then need to use MIME to extract the document from the response.
    Even in 5.2.6.x you can do this but for each REST call you need to use a HTTP Session Begin, HTTP POST, and then an HTTP Session End service call. You can build/parse the JSON using some code in via Java task service call.
    Note that the USPS implementation isn't the best as it only supports one connection per userid so you'd have to a) use the lock service to ensure only 1 instance of your BP runs at a time, and b) serialise the downloads of the files - i.e. you can't initiate multiple parallel downloads, and each document is provided as a single HTTP response with no option to retrieve in chunks nor restart.
    You'll need to build a BP, or set of BPs, to logon, get a list of files to download, download the files one by one and write them to a mailbox, and then logout. Either just schedule the BP or create a listening producer that uses it as a custom protocol.
    Definitely best to work with a business partner to do this.

    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 26.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 11:02 AM
    We are using SFG Version 6.

    ------------------------------
    Len Sasso
    ------------------------------



  • 27.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 11:27 AM
    In v6 for each REST call just build the parameters using Assign into an area of ProcessData, then use the XML JSON Transform service (https://www.ibm.com/support/knowledgecenter/en/SS3JSW_6.0.1/integrating/integrating/integrator/XML-JSON_service.html) to convert to JSON and pass it to the REST Client service making sure to specify the content type and accept correctly - no need for any auth as userid/password is provided in the JSON to the Logon API call and then you just store and use the Logon and Token keys between each subsequent call in the JSON parameters. The response doc from the REST API can then be converted back to XML and stored to ProcessData using the XML JSON Transform service.
    The only awkward one as I said is the document retrieval where the keys needed for the next call are returned in the HTTP response headers with the document as the response body. I'm not sure you can get to the headers in your BP so you'd have to fall back on the old method of using HTTP Client Begin Session, HTTP Client POST service passing your JSON parameter document with rawresponse=yes and then MIME service to split headers and body from the response, finishing with HTTP Client End Session.

    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 28.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 11:32 AM
    We only retrieve a single TAR File from USPS.  It contains several files, but we only need one Zip file from the TAR File.

    Thank you!

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 29.  RE: Sterling B2B CI/CD Deployments

    Posted Wed November 20, 2019 07:34 AM
    I'll be even more specific, I want to be able to make a copy of a specific Code in the SAME Code List.

    Thanks !

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 30.  RE: Sterling B2B CI/CD Deployments

    Posted Wed November 27, 2019 12:38 PM
    I'm trying to setup a PULL and for the past few days, I have been receiving the following Error message:

    An ERROR has occurred in process = CSRA_SFTPPull_Wrapper_m_emed_test_p1_Len4Paul.

    Error in Process - : Mandatory Parameter for service missing


    I have checked the Business Processes>Monitor>Current Processes for the particular ID and the clicking on the info Icon in the "Data" column displays the following:
    Mandatory Parameter Missing Error: RemoteHost in service SFTPClientBeginSession
    I have no idea how to provide the RemoteHost to that service.

    Any help you could provide would be greatly appreciated.

    Thanks

    Len


    ------------------------------
    Len Sasso
    ------------------------------



  • 31.  RE: Sterling B2B CI/CD Deployments

    Posted Wed November 27, 2019 01:50 PM
    You need to provide the parameters to the SFTP Client Begin Session service to tell it how to connect to the SFTP Server. RemoteHost is the IP address or DNS of the SFTP Server you want to connect to. You can either specify it directly or it could be got from the SSH Remote Profile (set these up through the B2Bi Admin dashboard) which provides the SSH key. See the docs for the service here: https://www.ibm.com/support/knowledgecenter/en/SS3JSW_6.0.1/integrating/integrating/integrator/SFTP_Client_Begin_Session_svc.html

    ------------------------------
    RICHARD CROSS
    ------------------------------



  • 32.  RE: Sterling B2B CI/CD Deployments

    Posted Mon December 02, 2019 09:10 AM

    Len,
    If you build the connection using the Trading Partner > SSH > Remote Profile menu, you can set the connection to the remote host using the ProfileId parameter of the SFTP Client Begin service.  This will provide all the necessary information, including: 

    PreferredAuthenticationMethod, CompressionMethod, ConnectionRetries, KnownHostKeyId, LocalPortRange, PreferredCipher, PreferredMAC, RemoteHost, RemotePasswd, RemotePort, RemoteUserId, ResponseTimeout, RetryDelay and UserIdentityKeyId

    (the above values, if assigned in the output block below, will override the values set in the ProfileId)

    <operation name="SFTP Client Begin Session Service">
      <participant name="SFTPClientBeginSession"/>
      <output message="SFTPClientBeginSessionServiceTypeInputMessage">
        <assign to="ProfileId">{someID}</assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="SFTPClientBeginSessionServiceResults" from="*"></assign>
      </input>
    </operation>


    Once SFTP Begin returns the session id, you can then pass that to other SFTP services (CD, LIST, GET/PUT/DELETE, END).


    ------------------------------
    Michael Geier
    IT Engineer 3
    Enterprise Holdings, Inc
    St. Louis MO
    ------------------------------



  • 33.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 08:43 AM
    1. Is it possible to copy an existing Code List?
    ​Yes, it is possible to copy existing code list . You just need to search the code list and there is option to copy then give a new name for the list you want to copy.
    2. Are there REST APIs for Sterling File Gateway?  If so, could you please provide a link(s)?
    _https://www.ibm.com/support/knowledgecenter/SS4TGX_2.2.0/com.ibm.help.sfg_reference.doc/B2B_APIs_avail.html

    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 34.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 08:57 AM
    I'll be more specific, I want to be able to make a copy of a specific Code in a Code List.

    Thanks !

    Len

    ------------------------------
    Len Sasso
    ------------------------------



  • 35.  RE: Sterling B2B CI/CD Deployments

    Posted Tue November 19, 2019 09:03 AM
    ​Yes, when your coping the new code list you need to pick and choose which one you want to include in the new code list.

    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 36.  RE: Sterling B2B CI/CD Deployments

    Posted Wed November 13, 2019 08:38 AM
    ​Len,
    there is no restriction as such for naming consumer file it's not case sensitive you can rename however you want . and also you can use provisioning fact's to retain the port of producer file name and use as part of the consumer file name .

    see below example  , you can save (.+) into a variables like myVar1 and myDate and use in the consumer file name.

    Producer tab
    (.+)[-]PayAll-xxx[-](.+).pgp
    myVar1,myDate

    Consumer tab
    ${myVar1}-PayAll-xxx-${myDate}.dat

    ------------------------------
    MOHAMMED HAJI
    ------------------------------



  • 37.  RE: Sterling B2B CI/CD Deployments

    Posted Fri March 12, 2021 03:55 PM
    Hi Kishore,

    We are also looking for options to implement deployments using any CD tools. Have you guys found any solution? Can you please share your thoughts?

    Thanks
    Srini

    ------------------------------
    Srini Parise
    ------------------------------



  • 38.  RE: Sterling B2B CI/CD Deployments

    Posted Wed March 17, 2021 10:06 AM
    Hi Srini, 

    No, we haven't found any solution for it. 

    One option is to use b2b restapi's. We haven't explored them yet.

    ------------------------------
    Kishore Reddy
    ------------------------------



  • 39.  RE: Sterling B2B CI/CD Deployments

    Posted Thu March 18, 2021 01:18 AM

    Hi guys,

     

    Have you looked at the scripts in the bin directory:

     

    importBPs.sh

    importMAPs.sh

     

     




    Confidential communication
    Westpac Banking Corporation (ABN 33 007 457 141, AFSL 233714)
    Westpac Institutional Bank is a division of Westpac Banking Corporation