<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Call API-Trigger from automation. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804951#M2025216</link>
    <description>&lt;P&gt;Hello Archana,&lt;/P&gt;&lt;P&gt;unfortunately this does not work: &lt;/P&gt;&lt;P&gt;Here is my process (and I saved and gave it values of corse) that doesnt work. &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181915-2023-06-28-19-06-09-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181916-2023-06-28-19-01-56-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;I am not sure, what I do wrong here. &lt;/P&gt;&lt;P&gt;Can you guide me please?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 06:23:29 GMT</pubDate>
    <dc:creator>FabriceArmbrust32</dc:creator>
    <dc:date>2023-06-29T06:23:29Z</dc:date>
    <item>
      <title>Call API-Trigger from automation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804949#M2025214</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
  &lt;P&gt;I like to call an API-Trigger during an automation to start a workflow. &lt;/P&gt;
  &lt;P&gt;I have tested the trigger with &lt;A href="https://api.sap.com/api/SPA_Workflow_Runtime/tryout" target="test_blank"&gt;https://api.sap.com/api/SPA_Workflow_Runtime/tryout&lt;/A&gt; and got a positive result: &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2176459-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Unfortunately I am not able to call the trigger from the automation. &lt;/P&gt;
  &lt;P&gt;I tried it with the js-code-snippet from &lt;A href="https://api.sap.com/api/SPA_Workflow_Runtime/tryout" target="test_blank"&gt;https://api.sap.com/api/SPA_Workflow_Runtime/tryout&lt;/A&gt;, but this just gives me the error:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;var data = JSON.stringify({
  "definitionId": "eu10.hh8fmvfy8w5fn4lj.supplyon2.kundenauftragAnlegen",
  "context": {
    "kundenauftrag": ""
  }
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = false;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

//setting request method
//API endpoint for API sandbox 
xhr.open("POST", "https://spa-api-gateway-bpi-eu-prod.cfapps.eu10.hana.ondemand.com/public/workflow/rest/v1/workflow-instances");


//adding request headers
xhr.setRequestHeader("Accept-Language", "Provide a preferred language. If a translation is available, relevant texts are returned in this language.");
xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHBzOi8vaGg4Zm12Znk4dzVmbjRsai5hdXRoZW50aWNhdGlvbi5ldTEwLmhhbmEub25kZW1hbmQuY29tL3Rva2VuX2tleXMiLCJraWQiOiJkZWZhdWx0LWp3dC1rZXktLTEzMzYyNDMwMDAiLCJ0eXAiOiJKV1QiLCJqaWQiOiAiYWFUYWVMQmVtTHlRdU9YTGY4SlZ4eE0zL1NsaXBpbGxkWXVEUi9vbUxERT0ifQ.eyJqdGkiOiIzYjYxZWE0YTlmYzg0MDU5ODdiMWU5N2Y4YzdkNmZlNiIsImV4dF9hdHRyIjp7ImVuaGFuY2VyIjoiWFNVQUEiLCJzdWJhY2NvdW50aWQiOiJiMDYwYW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_bNk-Lat_d9bHcpYH49cWKgYrXC3kydu7Iup2tI-fUIUb-36EJyT55O_w-YkfoAXA5esMOmlvVnRHl66LpG3smAJFB-J7u-6M9Q6P08aL8yGJThb6bCjmcaXDF6e4m2-_FXWfyWG851dvFzpG5rdZLgaNYdoEve_RT33Yfv1FTRut11imn0TrY_MQqLwsfHwk0l1MqYndYYJpe_QvhEu4BxzLtmmKXBkzRcS6llvLndcPuQxEJN-NKr4AzpURMB6EnbNtZ5ufqTB4ZlgTDg3AZ5GbklI_XdvQBUYlXEVLLmf0UdcAtg");
xhr.setRequestHeader("DataServiceVersion", "2.0");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/json");


//sending request
xhr.send(data);&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2176460-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Can you help me here please? What code do I need to use? &lt;/P&gt;
  &lt;P&gt;Thanks a lot!&lt;/P&gt;
  &lt;P&gt;Fabrice Armbruster&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 09:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804949#M2025214</guid>
      <dc:creator>FabriceArmbrust32</dc:creator>
      <dc:date>2023-06-12T09:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Call API-Trigger from automation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804950#M2025215</link>
      <description>&lt;P&gt;Hello Fabrice,&lt;/P&gt;&lt;P&gt;Now you do not need to use Web Service and code to call SBPA process in the automation. We have introduced the new activity in automation where you can discover and directly call the process. &lt;A href="https://help.sap.com/docs/build-process-automation/sap-build-process-automation/add-process-to-automation?locale=en-US"&gt;Refer this documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;BR /&gt;Archana&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 14:27:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804950#M2025215</guid>
      <dc:creator>Archana</dc:creator>
      <dc:date>2023-06-15T14:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call API-Trigger from automation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804951#M2025216</link>
      <description>&lt;P&gt;Hello Archana,&lt;/P&gt;&lt;P&gt;unfortunately this does not work: &lt;/P&gt;&lt;P&gt;Here is my process (and I saved and gave it values of corse) that doesnt work. &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181915-2023-06-28-19-06-09-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181916-2023-06-28-19-01-56-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;I am not sure, what I do wrong here. &lt;/P&gt;&lt;P&gt;Can you guide me please?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 06:23:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804951#M2025216</guid>
      <dc:creator>FabriceArmbrust32</dc:creator>
      <dc:date>2023-06-29T06:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Call API-Trigger from automation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804952#M2025217</link>
      <description>&lt;P&gt;Hello Archana,&lt;/P&gt;&lt;P&gt;unfortunately this does not work:&lt;/P&gt;&lt;P&gt;Here is my process (and I saved and gave it values of corse) that doesnt work.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181915-2023-06-28-19-06-09-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2181916-2023-06-28-19-01-56-process-test-sap-build-process.png" /&gt;&lt;/P&gt;&lt;P&gt;I am not sure, what I do wrong here.&lt;/P&gt;&lt;P&gt;Can you guide me please?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 06:52:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804952#M2025217</guid>
      <dc:creator>FabriceArmbrust32</dc:creator>
      <dc:date>2023-06-29T06:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Call API-Trigger from automation.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804953#M2025218</link>
      <description>&lt;P&gt;It´s solved now: &lt;/P&gt;&lt;P&gt;-&amp;gt; Calling the process though an automation works, but it has limitations in the testing environment. Therefore you get an error message. One solution is to make a try-catch around it and test it manually. (I hope that SAP will catch up here and provide this in a future release). &lt;/P&gt;&lt;P&gt;-&amp;gt; Also check, if there are any certificates needed, as most companies require those for security reasons. Try to test it from another device, which doesn´t have this limitations. &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Fabrice &lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 05:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-api-trigger-from-automation/m-p/12804953#M2025218</guid>
      <dc:creator>FabriceArmbrust32</dc:creator>
      <dc:date>2023-07-13T05:40:43Z</dc:date>
    </item>
  </channel>
</rss>

