{"componentChunkName":"component---src-templates-default-template-tsx","path":"/documentation/integration/SAP/SAP-ActionHandler/","result":{"data":{"asciidoc":{"id":"3c0e5300-4f40-5932-9570-7d82490ead39","html":"<div id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">Table of Contents</div>\n<ul class=\"sectlevel1\">\n<li><a href=\"#_introduction\">Introduction</a></li>\n<li><a href=\"#_prerequisites\">Prerequisites</a></li>\n<li><a href=\"#_defining_docker_composition_docker_compose_yml\">Defining docker composition (docker-compose.yml)</a></li>\n<li><a href=\"#_using_certificates_for_secure_connectivity\">Using certificates for secure connectivity</a>\n<ul class=\"sectlevel2\">\n<li><a href=\"#_sample_kis_for_testing_from_hiro\">Sample KIs for testing from HIRO</a></li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_introduction\">Introduction</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Action Handlers are integration components of the HIRO&#8482; system. They are used to\ninvoke actions on target systems. This document walks you through the configuration procedure of the HIRO&#8482; SAP&#8482; Action Handler.</p>\n</div>\n<div class=\"paragraph\">\n<p>From a technical perspective, the SAP&#8482; Action Handler is an additional capability using the HIRO&#8482; HTTP Action Handler, which is included in the <a href=\"/7.0/documentation/integration/AHconfig/\">Standard Docker image for Action Handlers</a>.</p>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_prerequisites\">Prerequisites</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Before you can configure the SAP Action Handler, make sure the following prerequisites are fulfilled:</p>\n</div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>\n<p>You have configured your SAP according to the HIRO&#8482; for SAP Operations - Implementation Guide. This document will be provided to you by us in the implementation phase of your project.</p>\n</li>\n<li>\n<p>You have followed the instructions in <a href=\"/7.0/documentation/integration/AHconfig/\">Standard Docker image for Action Handlers</a> to setup the Action Handler Docker container. Please ensure that you are able to process HTTP requests from HIRO.</p>\n</li>\n</ol>\n</div>\n<div class=\"paragraph\">\n<p>Arago has a SAP demo instance, which customers may use on request for testing purposes. We can provide you with the IP and credentials for this demo instance.</p>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_defining_docker_composition_docker_compose_yml\">Defining docker composition (docker-compose.yml)</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In order to make use of the SAP&#8482; Action Handler capability, you need to add the following handler definition to your docker composition file:</p>\n</div>\n<div class=\"listingblock\">\n<div class=\"title\">Extensions to docker-compose.yml</div>\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-yml\" data-lang=\"yml\">environment:\n  AH_CONFIG: &gt;\n    {\n      \"handlers\": [\n        {\n          \"name\": \"SAPHandler\",\n          \"capability\": \"SAPRequest\",\n          \"implementation\": \"HTTP\",\n          \"url\": \"https://&lt;IP of your SAP System&gt;:&lt;Port&gt;/jsonbc/$${function}\",\n          \"params\": \"$${destination}\",\n          \"body\": \"$${parameters}\",\n          \"insecure\": \"false\",\n          \"method\": \"post\",\n        }\n      ]\n    }</code></pre>\n</div>\n</div>\n<div class=\"paragraph\">\n<p>Please refer to <a href=\"/7.0/ah_capability_config/\">How to configure capabilities in the standard Action Handler (Docker image)</a> for details on the configuration map.</p>\n</div>\n</div>\n</div>\n<div class=\"sect1\">\n<h2 id=\"_using_certificates_for_secure_connectivity\">Using certificates for secure connectivity</h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In case your SAP System requires a secure connection using certificates, you need to include these in your handler configuration as well:</p>\n</div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-yml\" data-lang=\"yml\">environment:\n  AH_CONFIG: &gt;\n    {\n      \"handlers\": [\n        {\n          \"name\": \"SAPHandler\",\n          \"capability\": \"SAPRequest\",\n          [...]\n          \"client_certificate\": \"/&lt;virtual path to certificate&gt;/cert.crt\",\n          \"client_key\": \"/&lt;virtual path to certificate&gt;/cert.key\"\n        }\n      ]\n    }</code></pre>\n</div>\n</div>\n<div class=\"paragraph\">\n<p>Also, please ensure the certificates are either included in your docker image, or accessible as <code>volumes</code> or alike.\nHere is an example using <code>volumes</code> in <code>docker-compose.yml</code>:</p>\n</div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-yml\" data-lang=\"yml\">environment:\n  AH_CONFIG: &gt;\n    {...}\nvolumes:\n  - type: bind\n        source: /&lt;actual path to certificate&gt;/cert.crt\n        target: /&lt;virtual path to certificate&gt;/cert.crt\n  - type: bind\n        source: /&lt;actual path to certificate&gt;/cert.key\n        target: /&lt;virtual path to certificate&gt;/cert.key</code></pre>\n</div>\n</div>\n<div class=\"sect2\">\n<h3 id=\"_sample_kis_for_testing_from_hiro\">Sample KIs for testing from HIRO</h3>\n<div class=\"paragraph\">\n<p>Once you have successfully configured and started the Action Handler, you can test it by triggering the follow KI from HIRO&#8482;:</p>\n</div>\n<div class=\"listingblock\">\n<div class=\"title\">Sample KI for an SAP request</div>\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-bash\" data-lang=\"bash\">on\n  ogit/_id\nwhen\n  ProcessIssue == \"TestSAPRequest\"\ndo\n  stdout: LOCAL::OUTPUT,\n  stderr: LOCAL::ERROR,\n  rc: LOCAL::SYSTEMRC = action(\"SAPRequest\",\n    function :\"RFC_GET_SYSTEM_INFO\"\n  )\n  if LOCAL::SYSTEMRC == 0 then\n    log(\"SUCCESS: ${LOCAL::OUTPUT}\")\n  else\n    log(\"ERROR ${LOCAL::ERROR}\")\n  end\n\n  stdout: LOCAL::OUTPUT,\n  stderr: LOCAL::ERROR,\n  rc: LOCAL::SYSTEMRC = action(\"SAPRequest\",\n    function :\"RFC_READ_TABLE\",\n    parameters: '{\n      \"QUERY_TABLE\": \"T000\"\n    }'\n  )\n  if LOCAL::SYSTEMRC == 0 then\n    log(\"SUCCESS: ${LOCAL::OUTPUT}\")\n  else\n    log(\"ERROR ${LOCAL::ERROR}\")\n  end\n\n  delete(ProcessIssue)</code></pre>\n</div>\n</div>\n</div>\n</div>\n</div>","document":{"main":"SAP™ Action Handler Installation Guide (Docker Image)","title":"SAP™ Action Handler Installation Guide (Docker Image)","subtitle":""},"fields":{"toc":true,"location":["documentation","integration","SAP","SAP-ActionHandler"]}},"sidebarYaml":{"id":"6d066bdd-c982-5a69-b909-a31e6fc044e0","showIndex":null}},"pageContext":{"id":"3c0e5300-4f40-5932-9570-7d82490ead39","parent":"documentation"}},"staticQueryHashes":["1010459453","1010459453","2356112386","2356112386","2603905930","2603905930","3026652197","3026652197","3167850324","3167850324","63159454","63159454"]}