Posts

Showing posts with the label IBM Sterling File Gateway

Java Task Service - Sterling Integrator

import com.sterlingcommerce.woodstock.workflow.Document; import java.io.InputStream; import java.io.InputStreamReader; import java.io.BufferedReader; Document doc = wfc.getPrimaryDocument(); Document outPutDoc = wfc.newDocument(); ; InputStream inS = doc .getInputStream(); BufferedReader br = new BufferedReader( new InputStreamReader( inS )); String strData = “<SampleData>” ; String strLine; while ((strLine = br .readLine()) != null ) {     strData = strData.concat(strLine); } br.close(); strData = strData + “</SampleData>”; outPutDoc. setBody( strData .toString().getBytes()); wfc.putPrimaryDocument( outPutDoc );

Update sharedLocation in InstallationManager (IBM Sterling B2B Integrator)

First of all the following value has to be unique to each install of Sterling Integrator. If you accidentally used shared location for cluster installation your second node installation not going to work. So here is how we can fix this. 1. Go to user home and move $USERHOME$/IBM/IBMSHARED to new local location. 2. Update the reference in  /home/user/var/ibm/InstallationManager/installRegistry.xml           That's it. This will fix First node IBMSHARED location and we can proceed with second node installation. How to verify? 1. Go to InstallManager tools     cd /InstallationManager/IM_Linux/tools  2. ./imcl listInstalledPackages -verbose Validate the output something like below, [Shared] Shared resources directory: /opt/ibm/IBMIMShared [Package group] Name: Sterling Integrator Installation directory: /opt/ibm/sfg Translations: Architecture: 64-bit [Package] Name: IBM Sterling B2B Integrator (com.ibm.sterling.in...

PGP - Generate Import Export PGP Keys

Generate PGP Keys gpg --gen-key Enter Key details, Email, Expiration etc., Export Secret Key gpg --export-secret-key -a MY_PGP_KEY >> /tmp/MY_PGP_KEY.key Export Public Key gpg --export -a MY_PGP_KEY >> /tmp/MY_PGP_KEY.asc Import Secret Key gpg --import /tmp/MY_PGP_KEY.key Import Public Key gpg --import /tmp/MY_PGP_KEY.asc Update Key Trust Trust after importing the Key gpg --edit-key $trust $5 $save

Sterling Integrator User, Workflow Queries

Active Worksflows in Sterling Integrator select DISTINCT NAME , WC2.WORKFLOW_ID, sysdate - START_T AS TIMEDIFF From WORKFLOW_CONTEXT WC, ( SELECT MAX(STEP_ID) STEP_ID , MIN(START_TIME) START_T, WORKFLOW_ID FROM WORKFLOW_CONTEXT GROUP BY WORKFLOW_ID ) WC2, WFD WHERE WC.WORKFLOW_ID = WC2.WORKFLOW_ID AND WC.STEP_ID = WC2.STEP_ID AND WC.NEXT_AI_ID != -1 AND WC.WFD_ID = WFD.WFD_ID AND WC.WFD_VERSION = WFD.WFD_VERSION AND BASIC_STATUS = 0 Sterling Integrator User & User Associated Groups List  select YFS_USER.LOGINID, YFS_USER_GROUP.USERGROUP_NAME from YFS_USER, YFS_USER_GROUP, YFS_USER_GROUP_LIST where YFS_USER.USER_KEY=YFS_USER_GROUP_LIST.USER_KEY and YFS_USER_GROUP.USERGROUP_KEY=YFS_USER_GROUP_LIST.USERGROUP_KEY

SSHKeyGrabber in Sterling Integrator not working

http://www-01.ibm.com/support/docview.wss?uid=swg21628336 Sometimes SSHKeyGrabber don't work when we trying to extract Known Host Key from Sterling Integrator UI. The work around for this is disable StrictHostKeyChecking and download the Key from Linux/Windows and Check in the key to Sterling Integrator. $ssh -o StrictHostKeyChecking=no user@sftp.host.com -p 22 Above command will save host key to known_hosts file located .~/.ssh/known_hosts Note: Remove excess content from host key and just keep the key from ssh-rsa followed the key. 

Install 3rdParty JAR on IBM B2B Sterling Integrator

If we want to install external JARs (3rdParty JARs) on Sterling Integrator here are the steps, 1. Stop B2BI Cluster (All Nodes) by running hardStop.sh/cmd. 2. install3rdParty.sh -j          -j = JAR          -l = Library File 3. Run setupfile.sh 4. Repeat Step 2 and 3 on all Nodes. 5. Restart B2BI Cluster. Validation Procedure: If installation was successful then you will see an entry for your new JAR file in dynamicclasspath.cfg file.  

IBM Sterling B2B Integrator Map Editor Rules Hierarchy

Here is how IBM Sterling B2B Integrator map editor translator controller parse and executes the Rules. Pre-Session (Variable Declarations & Hard Coded Values) Root On Begin    Root Exedend Rules Record On Begin Standard Rule & Exedend Rule Record On End Root On Begin Post-Session (Executes before end of map)

Calling B2BI WebService from SOAP UI

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mesa="http://www.sterlingcommerce.com/mesa"    soapenv:Header/    soapenv:Body       mesa:DEMO_WEB_SERVICE xmlns:mesa="http://www.sterlingcommerce.com/mesa" Payload goes here....       /mesa:DEMO_WEB_SERVICE    /soapenv:Body /soapenv:Envelope Need to add namespace xmlns:mesa="http://www.sterlingcommerce.com/mesa under soapenv:Body.

Setting up VisualVM from Sterling Integrator

1. Download  VisualVM      https://java.net/projects/visualvm/downloads/download/release138/visualvm_138.zip 2. Find the value of the property called  ACTIVEMQ_JMX_PORT from sandbox.cfg. 3. Add Remote Host First and under Remote Host add Add JMX Connection.      < SI HOST Name >:< ACTIVEMQ_JMX_PORT >     No need of providing user credentials and Save the connection. 

Enable External Purge in Sterling Integrator

Starting an External Purge Procedure If you have a cluster installation, make sure that you are not running the external purge on another node of the cluster. If you are running the external purge on more than one node, it will cause database locks. For more information, see  Monitoring an External Purge . Important:  It is the customer's responsibility to keep exactly one of these external purge processes running in the cluster. If you need to shut down the hardware that is running the external purge, you must run the external purge on a different node. Disable the default Purge service. Click  Deployment  >  Schedules , search for PurgeService, and then clear the  Enabled  checkbox for PurgeService. Note:  If you have customized the Schedule_PurgeService business process, you need to add your customized code to the new Schedule_PurgeService business process. The new Schedule_PurgeService business process includes a warning mess...

Remove SFG Partner Profile (Hard Delete if SFG removal fails)

There was bug in SFG (old versions) where it leaves some orphan entries in DB when you try to remove the trading partner from SFG UI. To solve the problem here are steps to do hard delete of partner profile. Attempt to delete from SFG in regular way and then remove from Dashboard --> Trading Partner (All Contracts, Document Exchange, Profile, Routing Channels, Mailbox Virtual Roots if any etc.) Make sure the following table should not return any entry for Trading Partner, If it returns then remove the entry manually... This example Partner Name is : EDI select 'YFS_USER' from YFS_USER where UPPER(USERNAME) like '%EDI%'  UNION select 'YFS_ORGANIZATION' from YFS_ORGANIZATION where UPPER(ORGANIZATION_KEY) like '%EDI%'  UNION select 'MBX_ACTION'  from MBX_ACTION where UPPER(USER_ID) like '%EDI%'  UNION select 'MBX_MAILBOX'  from MBX_MAILBOX where UPPER(PATH) like '%EDI%'  UNION select 'SCI_CONTRACT' fro...

Encoding a Payload in Sterling Integrator using Java Task

import java.io.InputStream; import java.lang.StringBuilder; import com.sterlingcommerce.woodstock.workflow.Document; import com.sterlingcommerce.woodstock.util.Base64; Document doc = wfc.getPrimaryDocument(); InputStream in = doc.getInputStream(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < in.available(); i++) {    sb.append(in.read()); } byte data[] = sb.toString().getBytes(); byte newdata[] = Base64.encode(data); doc.setBody(new String( " "+ new String(newdata)+" ").getBytes()); return new String(sb.toString());

Sterling Integrator Purge All Tables

1.  EDI_COMPLIANCE_RPT 2.  EDI_DOCUMENT_STATE 3.  WF_INST_S 4.  WORKFLOW_CONTEXT 5.  WORKFLOW_LIFESPAN 6.  WORKFLOW_DATA 7.  EDIINTDOC 8.  MSGMDNDUP 9.  MSGMDNCORRELATION 10. WEBX_MINED_DATA 11. WF_INACTIVE 12. GENERIC_ACK 13. CORRELATION_SET 14. ACT_SESSION 15. ACT_AUTHENTICATE 16. ACT_AUTHORIZE 17. ACT_XFER 18. ACT_NON_XFER 19. DATA_FLOW 20. DMI_ROUTE 21. DMI_ROUTE_FACT 22. MBX_MESSAGE 23. TRANS_DATA

Sterling Integrator Blogs

https://edigkim.wordpress.com/ http://i2b2b.blogspot.com/

Avoid duplicate file processing in Sterling File Gateway (SFG)

The actual error we see in the logs is just the way SFTP in SI detects duplicate files and since you have the option in the mailbox.properties set to: disallowDuplicateMessages=false This means that duplicate files are allowed and therefore SFG processed those duplicate uploads. So the partner should investigate why did their application trigger a duplicate upload of the same file. If you want to avoid duplicate uploads, you should consider setting the option disallowDuplicateMessages to true in both nodes, this will stop SI from accepting duplicate files. If you want to make that change, you will need to modify\create your customer_overrides.properties on both nodes and add the following line: mailbox.disallowDuplicateMessages=true Both nodes need to be restarted for the change to take effect.

Attach multiple SSH Authorized User Key to Sterling File Gateway (SFG) Profile

Multiple source systems can talk to one Sterling Integrator SFTP server and the Authorized User Key for the remote servers could be different. The limitation with SFG is we can’t attach multiple Authorized user key to SFG profile, if we edit the profile SFG will list all the user profiles in drop down it mean we can select only One. To overcome this problem   DO NOT attach SSH Authorized User Keys from SFG instead go to Sterling Integrator Dashboard and edit the SFG Profile User there is page to attach multiple SSH Authorized User   Keys to one user. SI Dashboard > Account > User Accounts > Account Name (Search on Account Name), Edit the user and assign multiple SSH Authorized User Keys. 

IBM B2B Sterling Integrator (SI) and Sterling File Gateway Installation Procedure

1. Install and Configure Sterling Integrator DB. Follow the below link to create and configure database,          http://sirishg.blogspot.com/2012/12/sterling-integrator-oracle-user-and.html 2. Update License Set.    Need to update the License Set because while installing SI it will take the out of box license file which needs to be overriden after post installation. Below command will update the Sterling Integrator license,          InstallDirectory/bin$ AddLicenseSet.sh          3. Start SI and go to Operations --> System --> Licenses and do List All and check all carefully that we have got license for all    required SI components for instance File Gateway Core    Note: Check under InstallDirectory/properties/licensefiles for SI and SFG License.   4. Shutdown Sterling Integrator and proceed for Sterling File Gateway Installation ...

Uninstall​ IBM Sterling File Gateway (SFG) from IBM B2B Sterling Integrator (SI) Installation

Below process explains how to remove IBM Sterling File Gateway (SFG) from IBM B2B Sterling Integrator(SI) Installations. Please do not consider this as an official procedure, This is a just a WORK AROUND to remove SFG from SI. 1. Shutdown all Sterling Integrator nodes and perform below tasks on all nodes. 2. Go to installFolder/container/Applications - Remove filegateway exploded folder and filegateway.war. 3. Go to installFolder/noapp/deploy - Remove filegateway exploded folder and filegateway.war. 4. Go to installFolder/jar/ - Remove filegateway folder. 5. Go to installFolder/properties/ dynamicclasspath.cfg.in - Remove entries for FileGateway-ui.jar and filegateway.jar. 6. Run setupfiles.cmd/sh 7. Run deployer.cmd/sh 8. Bring up Sterling Integrator. Note: ​ Please note that above process will not clean database and it will leave few database tables related to SFG but they don't harm any of the SI processes. ​

Remove Custom Service from Sterling Integrator

If we need to uninstall a custom service in IBM B2B Sterling Integrator follow the blow steps. Please note you have to clean from File system and from database as well. File System Cleanup C:\Sirish\SterlingIntegrator\install\installed_data\ Your  Custom Service Name directory. C:\Sirish\SterlingIntegrator\install\jar\ Your  Custom Service Name directory. C:\Sirish\SterlingIntegrator\install\properties\lang\en\Your  Custom Service Name_en.properties C:\Sirish\SterlingIntegrator\install\properties\services\Your  Custom Service Name.xml Database Cleanup select * from service_def_guid where current_id = 461; select * from service_def_parms where def_id = 461 select * from service_def where def_lookup_name like '%com.mypackage%';   Note:   Please check def_look_up name in service instance page under Development --> Services --> Installation/Setup   delete from service_def_guid where current_id = 461; delete fr...