Saturday, May 1, 2021

OIC - ERP Import Technique 3 - Multi steps

The following high level steps need to follow:

  1. Create an OIC_Encrypt_Import appdriven Orchestration
  2. Create assign required Variables
  3. Encrypt file
  4. Update job options for callback
  5. Upload to UCM
  6. append comment
  7. submit ESS job
  8. getESSJobStatus of that import request
  9. Get the child process id if any of the import process
  10. Get the ESS job status of the child process of the import process.

Create an OIC_Encrypt_Import appdriven Orchestration:
Use following Rest Service Payload:
Request:
Relative resource URI: /
Verb: POST
{
"base64FileReference": "ref",
"filename": "name",
"documentTitle": "title",
"documentAccount": "account",
"encryptFlag":"Y",
"encryptMethod": "PGPUNSIGNED",
"fusionDecryptKeyAlise": "key",
"jobName": "name",
"JobParameters":"Params",
"notifyServiceAccount":"Y",
"fusionAcountingHubFlag:"Y",
"callBackFlag:"Y"
}
Response:
{
"essLoadRequestId:"",
"essLoadStatus:"",
"essImportRequestID":"",
"essImportStatus":"",
"essChildRequestID:"",
"essChildRequestStatus":"",
"ExceptionCode:"",
"ExceptionReason:"",
"ExceptionDetails:""
}


Test Payload:

{

  "jobName": "/oracle/apps/ess/financials/subledgerAccounting/shared,XLATXNIMPORT",

  "fileName": "XlaTransactionUpload_FAH.zip",

  "base64FileReference": "ref",

  "documentAccount": "fin$/fusionAccountingHub$/import$",

  "encryptMethod": "PGPUNSIGNED",

  "fusionAccountingHubFlag": "Y",

  "callbackFlag": "Y",

  "jobParameters": "9500,XlaTransactionUpload_FAH.zip,#NULL,#NULL,Y,F,S,Y,Y,Y",

  "encryptFlag": "N",

  "documentTitle": "FAH <System Name> System Encrypted File",

  "notifyServiceAccount": "N",

  "fusionDecryptKeyAlias": "Test_KEY"

}


Create assign required Variables:

I_content: encodeBase64ToReference(FileReference)
x_val: jobParameters >>"9500,XlaTransactionUpload_FAH.zip,#NULL,#NULL,Y,F,S,Y,Y,Y",
p_argument1: substring($x_val,1.0,index-within-string($x_val,n','))>>
x_val: substring-after($x_val,concat($p_argument1,","))
p_argument2: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument2,","))
p_argument3: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument3,","))
p_argument4: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument4,","))
p_argument5: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument5,","))
p_argument6: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument6,","))
p_argument7: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument7,","))
p_argument8: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument8,","))
p_argument9: substring($x_val,1.0,index-within-string($x_val,n','))
x_val: substring-after($x_val,concat($p_argument9,","))
p_argument10:$x_val
p_jobPackage: substring-before(jobName,",")
p_jobName: substring-after(jobName,",")
I_encryptOption: ""
I_jobOptions: ""
I_encryptOptionAppendComment: ""
I_jobOptionsApppendComment: ""



Encrypt file:

IF encryptFlag="Y"

Configure Stage file action>>Choose operation: encrypt file, >>Specify file reference $I_content>>Specify the file name>>specify the output directory /output>>Specify the PGP key to encrypt Test_key.


updateVariables:

I_content: encodeReferenceToBase64(FileReference)
I_encryptOption: concat("FileEncryption=", encryptMethod,",FA_ALIAS=",fusionDecryptKeyAlias, ",CUSTOMER_ALIAS=",fusionDecryptKeyAlias)

I_encryptOptionAppendComment: concat("FileEncryption=", encryptMethod,";FA_ALIAS=",fusionDecryptKeyAlias, ";CUSTOMER_ALIAS=",fusionDecryptKeyAlias)

Otherwise:
I_content= encodeReferenceToBase64(FileReference)


Update job options for callback:

If callBackFlag !=N

I_jobOptions: concat("EnableEvent=Y,", $I_encryptOption)
I_jobOptionsAppendComment: concat("EnableEvent=Y;", $I_encryptOptionAppendComment)

Otherwise:
I_jobOptions: $I_encryptOption
I_jobOptionsAppendComment: $I_encryptOptionAppendComment

Upload to UCM
Configure Oracle ERP Cloud Endpoint >>Select Query create , update or delete information>>Browse by services, Select ERPIntegrationService ,,uploadFileToUCM operation>>Done




Map to UCM:

Content:$I_content(encodeReferenceToBase64() one of the zip file)
FileName: File name of the zip file
Content Type : zip
Document Title: "FAH CAS Encrypted file"
DocumentSecurityGroup: 'FAFusionImportExport'
DocumentAccount: "fin$/fusionAccountingHub$/import$"



append comment(if encryptFlag="Y")
Configure Oracle ERP Cloud Endpoint >>Select Query create , update or delete information>>Browse by services, Select ERPIntegrationService ,,apendFileComment operation>>Done



Document id: result from upload file to UCM >>153017
Comments: I_jobOptionsAppendComment

submit ESS job
Configure Oracle ERP Cloud Endpoint >>Select Query create , update or delete information>>Browse by services, Select ERPIntegrationService ,,submitESSJobRequest operation>>Done



Job package name: p_jobPackage>>/oracle/apps/ess/financials/subledgerAccounting/shared
job definition name: p_JobName >>XLATXNIMPORT
paramList:
p1>>result of UCM upload>>153017
p2>>file name >>from rest payload>>XlaTransactionUpload_FAH.zip
p3>>p_argument3>>#NULL
p4>>p_argument4>>#NULL
p5>>p_argument5>>Y
p6>>p_argument6>>F
p7>>p_argument7>>S
p8>>p_argument8>>Y
p9>>p_argument9>>Y
p10>>p_argument10>>Y


Now just send the import request id as response from this reusable integration.


Get ESS job status for the import:
Follow my below blog for the steps:


How to get child process id:

To get the Ess job status of the child process of the import process if any:

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...