Can I build a job that listen to an SNMP Trap from a third party system, and reacts according to it?
You will find general guide for this type of agent:
But UC4 does not support a direct connection of Jobs to SNMP, but the script statement :SEND_SNMP_TRAP can be used to monitor Jobs.
:SET &NAME# = SYS_ACT_ME_NAME()
:SET &ID# = SYS_ACT_ME_NR()
:SET &JPNAME# = SYS_ACT_PARENT_NAME()
:SET &CLIENT# = SYS_ACT_CLIENT()
:SET &STATUS# = GET_UC_OBJECT_STATUS()
:IF &STATUS# < "1900"
: PRINT &STATUS#
: PRINT "Client: &CLIENT#, JOBNAME: &NAME#"
: PRINT &NAME#
: SEND_SNMP_TRAP 801450, "&CLIENT#", "&NAME#",, "Problems in processing!"
The script function GET_UC_OBJECT_STATUS can be used to find out the Job's end status and react to it accordingly. This solution can be implemented in the direct form of a script or in a reusable form as an Include object.