EPM Integration Agent를 사용하여 쓰기 되돌림하는 경우 데이터를 테이블에 삽입하기 전에 BefExport
이벤트를 사용하여 작업을 수행하거나 기본 삽입 처리를 대체할 수 있습니다.
다음 스크립트 예제는 쓰기 되돌림 전에 실행되는 외부 API를 호출하는 방법을 보여줍니다.
이 예제의 BefExport
이벤트는 다음을 수행합니다.
agentContextParams
맵의 콘텐츠를 인쇄합니다.EPM_APP_DATA_HOME\logs
의 프로세스 로그 및 epmagent.log
에 기록됩니다.EPM Integration Agent 컨텍스트 함수에 대한 자세한 내용은 EPM Integration Agent 컨텍스트 함수를 참조하십시오.
이 스크립트는 예제로만 제공되며 결함이 없다고 보증되지 않으므로 사용자는 스크립트와 관련된 질문 또는 이슈에 대해 오라클 고객지원센터에 서비스 요청을 제출할 수 없습니다.
import sys import java ''' Before export custom script. This script will be called before the writeback begins execution. ''' #print Begin: BefExport.py #print 'Event Type is: ' + event ''' Print the contents of the agentContextParams map which is an unmodifiable map. ''' #print 'JOBTYPE: ' + agentContext["JOBTYPE"] #print 'EPM_APP_DATA_HOME: ' + agentContext["EPM_APP_DATA_HOME"] #print 'WRITEBACK_DATA_FILE: ' + agentContext["WRITEBACK_DATA_FILE"] #print 'JOBID: ' + str(agentContext["JOBID"]) #print 'INTEGRATION: ' + agentContext["INTEGRATION"] #print 'LOCATION: ' + agentContext["LOCATION"] #print 'SOURCE_APPLICATION: ' + agentContext["SOURCE_APPLICATION"] #print 'TARGET_APPLICATION: ' + agentContext["TARGET_APPLICATION"] ''' getTable() Method to fetch the table name into which the data will be inserted. This is passed from cloud to the agent during the writeback execution call. ''' #print "Printing Table Name: " + agentAPI.getTable() ''' getInsertQuery() Method to fetch the insert query. This is the query which is passed from cloud to the agent during the writeback execution call. ''' #print "Printing Query: " + agentAPI.getInsertQuery() ''' Log an info message to the agent process log. This entry will be logged only to the process log in EPM_APP_DATA_HOME\logs folder and not to epmagent.log. The log entry will be created at INFO log level. ''' #agentAPI.logInfo("SAMPLE: INFO log message from script") ''' Log an severe message to the agent process log. This entry will be logged into the process log in EPM_APP_DATA_HOME\logs folder and also into epmagent.log. The log entry will be created at SEVERE log level. ''' #agentAPI.logError("SAMPLE: SEVERE log message from script") ''' Uncomment to skip the export data execution. The writeback execution can be skipped only during the BEFORE_EXPORT event. This will skip the execution of the insert statements. The cloud process will be marked as failed in the Export data step. ''' #agentAPI.skipAction('true') ''' Return false in case of error, which will throw an exception in the agent. ''' #print "End: BefExport.py"