This post will show how to resend a file using jacl script in IBM WebSphere Partner Gateway (WPG), WPG is an AS2 file exchange software developed by IBM. Some times we have to resend a failed file to AS2 partners. This action can be down from hubadmin console but if we know how to resend a file using jacl script, we can schedule the task. the following scripts are working with WPG6.0, not test on other WPG version.
To resend a failed file, we have to know he failed file name, VUID and resend id.
1) we can get VUID from the back-end Database table LG_ACTIVITY_DTL table using the SQL statment, and then insert the failed file name, VUID and generated RESENDID into table LG_RESEND
CONNECT TO BCGAPPS USER username USING password
INSERT INTO LG_RESEND(RESENDID,VUID,UPDATEDATE) SELECT INTEGER(SUBSTR(CAST(TIMESTAMP(GENERATE_UNIQUE()) AS VARCHAR(27)),21)),VUID FROM LG_ACTIVITY_DTL WHERE ORIGINALFILENAME='test.txt' AND HDRFLG=1;
Note: RESENDID can not be duplicated.
2) Check the record with bad filename\VUID\RESENDID are insert into table LG_RESEND
3) run the following JACL statement to resend the file.
set id "BCGInt:code=com.ibm.bcg.resend.ResendEngine,name=Resend_Inbound,type=Document Aquisition"
$AdminControl invoke $id startResend
then the command can be put into one shell script and then schedule a job. check the records in the table LG_RESEND are gone.
No comments:
Post a Comment