Get Exit Code Before Adding Attachment
When I create a filter and add a Set Fields action and set an Exit Code field to: $PROCESS$ PERFORM-ACTION-ADD-ATTACHMENT 536870914 $Server Cmd$ Everything is fine. The Exit Code field is set to 0 (successful) and the attachment is added to my attachment field. But if the file does not exist (let's say I type arerror%.log for example), I get the error: File pointer is NULL or invalid file pointer. (ARERR 295) And all further workflow processing is stopped (the Exit Code does not get set to 2 which is Failed for example). Is there a way I can grab the exit code first, and if 0 then proceed with the adding of the attachment? If it's not there ( Exit code 2) skip the add of the attachment and go to the next workflow item. ARS 7.6.4 sp2 (Linux) Oracle DB Lisa Kemes Remedy Consultant Dev Technology Group DLA Office: (717) 770-6437 Cell Phone: (717) 602-6430 lisa.ke...@devtechnology.com ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years
Re: Get Exit Code Before Adding Attachment
Hi Lisa, Try creating an Error Handler within the filter. Essentially create another filter which will handle the error in a way that it sets your Exit Code to 2 (Failure)and reference the error handler filter from the filter where the set fields fails. Hope this helps. Regards, Ryan. From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Kemes, Lisa A DLA CTR INFORMATION OPERATIONS Sent: Tuesday, June 11, 2013 2:35 PM To: arslist@ARSLIST.ORG Subject: Get Exit Code Before Adding Attachment ** When I create a filter and add a Set Fields action and set an Exit Code field to: $PROCESS$ PERFORM-ACTION-ADD-ATTACHMENT 536870914 $Server Cmd$ Everything is fine. The Exit Code field is set to 0 (successful) and the attachment is added to my attachment field. But if the file does not exist (let's say I type arerror%.log for example), I get the error: File pointer is NULL or invalid file pointer. (ARERR 295) And all further workflow processing is stopped (the Exit Code does not get set to 2 which is Failed for example). Is there a way I can grab the exit code first, and if 0 then proceed with the adding of the attachment? If it's not there ( Exit code 2) skip the add of the attachment and go to the next workflow item. ARS 7.6.4 sp2 (Linux) Oracle DB Lisa Kemes Remedy Consultant Dev Technology Group DLA Office: (717) 770-6437 Cell Phone: (717) 602-6430 lisa.ke...@devtechnology.com _ARSlist: Where the Answers Are and have been for 20 years_ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years
Re: Get Exit Code Before Adding Attachment
Very much so!!! Thank you -Original Message- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Downing, Ryan Sent: Tuesday, June 11, 2013 3:38 PM To: arslist@ARSLIST.ORG Subject: Re: Get Exit Code Before Adding Attachment ** Hi Lisa, Try creating an Error Handler within the filter. Essentially create another filter which will handle the error in a way that it sets your Exit Code to 2 (Failure)and reference the error handler filter from the filter where the set fields fails. Hope this helps. Regards, Ryan. From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Kemes, Lisa A DLA CTR INFORMATION OPERATIONS Sent: Tuesday, June 11, 2013 2:35 PM To: arslist@ARSLIST.ORG Subject: Get Exit Code Before Adding Attachment ** When I create a filter and add a Set Fields action and set an Exit Code field to: $PROCESS$ PERFORM-ACTION-ADD-ATTACHMENT 536870914 $Server Cmd$ Everything is fine. The Exit Code field is set to 0 (successful) and the attachment is added to my attachment field. But if the file does not exist (let's say I type arerror%.log for example), I get the error: File pointer is NULL or invalid file pointer. (ARERR 295) And all further workflow processing is stopped (the Exit Code does not get set to 2 which is Failed for example). Is there a way I can grab the exit code first, and if 0 then proceed with the adding of the attachment? If it's not there ( Exit code 2) skip the add of the attachment and go to the next workflow item. ARS 7.6.4 sp2 (Linux) Oracle DB Lisa Kemes Remedy Consultant Dev Technology Group DLA Office: (717) 770-6437 Cell Phone: (717) 602-6430 lisa.ke...@devtechnology.com _ARSlist: Where the Answers Are and have been for 20 years_ _ARSlist: Where the Answers Are and have been for 20 years_ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Where the Answers Are, and have been for 20 years