Out Testers are activating objects inside the Automation engine from within a shellscript by calling the CallAPI.
How can they obtain the returncode of the activated object from inside the Automation engine within their shellscript to see if the object worked nicely?
At the moment all they get is the returncode of the CallAPI script, which is mainly "0" because the CallAPI itself is always activated without any error.
Perhaps while you are designing the call, you can use the solution application within PAM to get a better return code. Here is some documentation on that:
Create a Solution Using an API Activity - CA Process Automation - 04.3.03 - CA Technologies Documentation
Hmm thats a bit tricky as the CALL API is not designed for returning infos except the RUn ID to the OS...
the possibilities that come to my mind are:
* start the CALL API via Automic OS job and check the children's status in PostProcess with script commands.* start the CALL API via OS command and create a "Report file" containing the Status info with an OS job afterwards on a defined drive or share
* you could send an email with the values afterwards...* possibly there is an additional way using JAVA API ...
I observed a script trick from a colleague lately to get the child Status from the call API....
if you put a stop msg at the end of the script that is used by the call api its output gets inserted into the call api output:
:set &OBJ# = 'SCRI.UC4.CALLAPITEST':set &jobnr# = activate_uc_object(&OBJ#,WAIT):if &jobnr# = '0000000': stop msg,51,'Failure at starting job &OBJ#':else: set &STAT# = GET_UC_OBJECT_STATUS (,&jobnr#): PRINT 'Job $OBJECT with jobnumber &jobnr# started': PRINT 'Status: &STAT#': stop msg,50,'Job &OBJ# with jobnumber &jobnr# and Status &STAT# started.':endif
Output from the CALL API on OS level:
20190102/090857.023 - U03000000 Program 'UC4 Call Interface' version '11.2.2+build.622' started.
20190102/090857.023 - U03000017 2016-06-20|21:27:52|20190102/090857.458 - U03000004 RunID '327720598'
20190102/090857.459 - U00000050 Job SCRI.UC4.CALLAPITEST with jobnumber 0327720599 and Status 1900 started.
20190102/090857.459 - U03000001 Program 'UC4 Call Interface' version '11.2.2+build.622' ended normally.
Disadvantage: the API* Object fails with FAULT_OTHER-1820 because of the STOP MSG.....