使用 EPM 集成代理进行回写时,可在向表中插入数据之后使用 AftExport
执行任何后处理清除操作。
以下脚本示例显示如何调用在回写之后执行的外部 API。
此示例中的 AftExport
事件:
agentContextParams
映射的内容EPM_APP_DATA_HOME\logs
中的进程日志。EPM_APP_DATA_HOME\logs
中的进程日志。有关 EPM 集成代理上下文函数的信息,请参阅“EPM 集成代理上下文函数”。
请注意,此脚本只是一个示例,不保证无任何缺陷,用户不能就与该脚本相关的任何疑问或问题向 Oracle 支持部门提出服务请求。
import sys ''' After export custom script. This script will be called after the writeback finishes execution. ''' #print "Begin: AftExport.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"] ''' 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") ''' Return false in case of error, which will throw an exception in the agent. ''' returnValue = 'true' #print "End: AftExport.py"