{"id":11355,"date":"2014-07-20T07:00:16","date_gmt":"2014-07-20T07:00:16","guid":{"rendered":"http:\/\/erpschools.com\/?p=11355"},"modified":"2014-11-30T20:22:13","modified_gmt":"2014-11-30T20:22:13","slug":"respond-to-workflow-notification-from-a-db-procedure","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure","title":{"rendered":"Respond to workflow notification from a DB procedure"},"content":{"rendered":"<p>The \u00a0below script can be used to auto approve notifications through database procedure.<\/p>\n<p>Write your business logic with in the below procedure ,register it as a concurrent program and schedule it as needed to run periodically. The same script can also be used in custom forms, custom or third party applications to respond to notifications from backend procedure.<\/p>\n<p><code> PROCEDURE approve_reject_proc (pAction IN VARCHAR2, --APPROVE\/REJECT<br \/>\npComments IN VARCHAR2, -- User Comments -- Optional<br \/>\npNotification_id IN NUMBER, -- Notification ID<br \/>\npStatus OUT VARCHAR2,<br \/>\npMessage OUT VARCHAR2<br \/>\n)<br \/>\nIS<br \/>\nl_user_name VARCHAR2(250);<br \/>\nBEGIN<br \/>\nBEGIN<br \/>\nSELECT RECIPIENT_ROLE<br \/>\nINTO l_user_name<br \/>\nFROM WF_NOTIFICATIONS<br \/>\nWHERE notification_id = pNotification_id;<br \/>\nEXCEPTION<br \/>\nWHEN OTHERS THEN<br \/>\nl_user_name := NULL;<br \/>\nEND;<br \/>\nwf_notification.SETATTRTEXT(pNotification_id,'RESULT',pAction);<br \/>\nwf_notification.Respond(pNotification_id,<br \/>\npComments,<br \/>\nl_user_name,<br \/>\npAction);<br \/>\npStatus := 'S';<br \/>\npMessage := 'Successfully '||initcap(pAction);<br \/>\nCOMMIT;<br \/>\nEXCEPTION<br \/>\nWHEN OTHERS THEN<br \/>\npStatus := 'E';<br \/>\npMessage := 'Unexpected error while Approve\/Reject the notification: '||SQLERRM;<br \/>\nEND approve_reject_proc;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The \u00a0below script can be used to auto approve notifications through database procedure. Write your business logic with in the below procedure ,register it as a concurrent program and schedule it as needed to run periodically. The same script can also be used in custom forms, custom or third party applications to respond to notifications from backend procedure.<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,499],"tags":[],"class_list":["post-11355","post","type-post","status-publish","format-standard","hentry","category-scripts","category-workflow-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Respond to workflow notification from a DB<\/title>\n<meta name=\"description\" content=\"Respond to workflow notification from a DB procedure\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Renuka\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\"},\"author\":{\"name\":\"Renuka\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249\"},\"headline\":\"Respond to workflow notification from a DB procedure\",\"datePublished\":\"2014-07-20T07:00:16+00:00\",\"dateModified\":\"2014-11-30T20:22:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\"},\"wordCount\":66,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"articleSection\":[\"Scripts\",\"workflow scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\",\"url\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\",\"name\":\"Respond to workflow notification from a DB\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"datePublished\":\"2014-07-20T07:00:16+00:00\",\"dateModified\":\"2014-11-30T20:22:13+00:00\",\"description\":\"Respond to workflow notification from a DB procedure\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Respond to workflow notification from a DB procedure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249\",\"name\":\"Renuka\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g\",\"caption\":\"Renuka\"},\"url\":\"https:\/\/erpschools.com\/erps\/author\/renuka\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Respond to workflow notification from a DB","description":"Respond to workflow notification from a DB procedure","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure","twitter_misc":{"Written by":"Renuka","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure"},"author":{"name":"Renuka","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249"},"headline":"Respond to workflow notification from a DB procedure","datePublished":"2014-07-20T07:00:16+00:00","dateModified":"2014-11-30T20:22:13+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure"},"wordCount":66,"commentCount":0,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"articleSection":["Scripts","workflow scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure","url":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure","name":"Respond to workflow notification from a DB","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"datePublished":"2014-07-20T07:00:16+00:00","dateModified":"2014-11-30T20:22:13+00:00","description":"Respond to workflow notification from a DB procedure","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/scripts\/respond-to-workflow-notification-from-a-db-procedure#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"Respond to workflow notification from a DB procedure"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/cbade316c91d3f36ba5339e274c76249","name":"Renuka","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cce370e0af70415e6928d71fa62e268258b9b5de89d5d65e0d14c63abd3cad0c?s=96&d=blank&r=g","caption":"Renuka"},"url":"https:\/\/erpschools.com\/erps\/author\/renuka"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/11355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=11355"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/11355\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=11355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=11355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=11355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}