Skip to Content
Author's profile photo Former Member

How to start a process using SAP NW BPM OData Services


In my previous blog post (Working with SAP NW BPM and SAPUI5: Using SAP NW BPMs OData-Services) I wrote about SAPUI5, and how to use the new OData Services provided by SAP.

I also wrote about problems using the OData-Service for starting a new SAP NW BPM Process. This blog posts provides the solution for these problems. We investigated the issue with Andre Backofen (Andre Backofen) and it turns out the problem was our WSDL / Web Service used as Start service. It seems as a combination of anonymus complex types and naming clashes between operation and parameter caused the problem. When creating the demo I assembled the service and data type using eclipses defauld xsd / wsdl tools and haven’t checked it again as it was validated by eclipse.

However, I’d like to share the new WSDL as well as the SAPUI5 view / controller with which I was able to successfully start a Process using BPM’s OData Service.:

XSD Type:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="" targetNamespace="" xmlns:tns="$" elementFormDefault="qualified">
    <complexType name="Antrag">
    <element name="Mitarbeiter" type="string"></element>
    <element name="Vorgesetzter" type="string"></element>
    <element name="Titel" type="string"></element>
    <element name="Beschreibung" type="string"></element>
    <element name="Status" type="string"></element>


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="" xmlns:tns="" xmlns:wsdl="" xmlns:xsd="" name="Start_Bewilligung_Async" targetNamespace="">
    <xsd:schema targetNamespace="" xmlns:Q1="">
            <xsd:import schemaLocation="Antrag.xsd" namespace=""></xsd:import>
            <xsd:element name="Antrag" type="Q1:Antrag">
  <wsdl:message name="StartBewilligungRequest">
    <wsdl:part element="tns:Antrag" name="parameters"/>
  <wsdl:portType name="Start_Bewilligung_Async">
    <wsdl:operation name="StartBewilligung">
      <wsdl:input message="tns:StartBewilligungRequest"/>
  <wsdl:binding name="Start_Bewilligung_AsyncSOAP" type="tns:Start_Bewilligung_Async">
    <soap:binding style="document" transport=""/>
    <wsdl:operation name="StartBewilligung">
      <soap:operation soapAction=""/>
        <soap:body use="literal"/>
  <wsdl:service name="Start_Bewilligung_Async">
    <wsdl:port binding="tns:Start_Bewilligung_AsyncSOAP" name="Start_Bewilligung_AsyncSOAP">
      <soap:address location=""/>

SAPUI5 view:

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" xmlns:c="sap.ui.commons"
  controllerName="demo.StartAntrag" xmlns:l="sap.ui.layout" xmlns:f="sap.ui.layout.form" xmlns:html="">
  <Panel id="Panel">
    defaultSpan="L12 M12 S12"
    <f:SimpleForm id="Formular"
          <core:Title text="Antragsdaten" />
          <Label text="Titel" />
          <Input id="Titel" value="{/Titel}" />
          <Label text="Status" />
          <Select id="Status" selectedKey="{/Status}" width="100%">
              <core:Item text="" key="" />
              <core:Item text="Entwurf" key="Entwurf" />
              <core:Item text="Beantragt" key="Beantragt" />
              <core:Item text="Bewilligt" key="Bewilligt" />
              <core:Item text="Korrektur" key="Korrektur" />
              <core:Item text="Abgelehnt" key="Abgelehnt" />
          <Label text="Beschreibung" />
          <TextArea id="Beschreibung" value="{/Beschreibung}" rows="8" />
          <core:Title text="Beteiligte" />
          <Label text="Mitarbeiter" />
          <Input id="Mitarbeiter" value="{/Mitarbeiter}" />
          <Label text="Vorgesetzter" />
          <Input id="Vorgesetzter" value="{/Vorgesetzter}" />
           <Button id="Abschliessen" text="Bewilligungsprozess starten" press="handleAbschliessenPress" />

SAPUI5 controller:"demo.Util");"sap.m.MessageBox");
sap.ui.controller("demo.StartAntrag", {
  getFormFragment : function() {
  return sap.ui.xmlfragment("demo.Antrag", this);
  * Called when a controller is instantiated and its View
  * controls (if available) are already created. Can be used
  * to modify the View before it is displayed, to bind event
  * handlers and do other one-time initialization.
  * @memberOf demo.Antrag
  onInit : function() {
  var oPanel = this.getView().byId("Panel");
  this.antragModel = new sap.ui.model.json.JSONModel();
  var oMitarbeiter = this.getView().byId("Mitarbeiter");
  oMitarbeiter.setValue("Nyfeler Jan");
  var oVorgesetzter = this.getView().byId("Vorgesetzter");
  oVorgesetzter.setValue("Nyfeler Jan");
  var oStatus = this.getView().byId("Status");
handleAbschliessenPress : function() {
  var that = this;
  var startProcessSvcURL = "/bpmodata/startprocess.svc/";
  var oModel = new sap.ui.model.odata.ODataModel(startProcessSvcURL, true);
  var startData = {};
  startData.ProcessStartEvent = {};
  startData.ProcessStartEvent.Antrag = this.antragModel.getProperty("/");
  oModel.create("/StartData", startData, null, function(oData, oResponse) {"Der Prozess wurde erfolgreich gestartet. Sie können das Fenster schliessen.", sap.m.MessageBox.Icon.SUCCESS, "Prozess erfolgreich gestartet");
  }, function(oEvent) {"Fehler beim Prozessstart.", sap.m.MessageBox.Icon.ERROR, "Fehler beim Prozessstart");

I’d like to thank Andre Backofen (Andre Backofen) as well as my colleagues Patrick Wenger (Patrick Wenger) and Werner Schwarz (Werner Schwarz) for their support.




I’d like to mention that you have to use not the data object as mentioned in the official documentation BPM OData Service for Starting BPM Processes – Modeling Processes with Process Composer – SAP Library for starting a process but the used data type name instead

In  example I provided, data object name as well as data type name were the same so it worked…..

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Piyas Kumar Das
      Piyas Kumar Das

      Hi Jan,

      Very nice blog, and well explained. Every Minute details are covered and the code spinster are a added bonus.



      Author's profile photo Maurice Meurer
      Maurice Meurer

      Hi Jan

      Awesome, this was exactly, what i was looking for.

      Keep up the good work.

      Best regards


      Author's profile photo Karthik S
      Karthik S

      Hi Jan,

      Is it possible to trigger the BPM process from SAP UI5 application.

      For example : When User submits a request in UI5 application, it should trigger the bpm process. In this case, how the integration works.

      My Flow is like BPM(1st Process) -> UI5 ---> BPM(2nd Process)

      Please share some examples.



      Karthik S

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Karthik


      I'm not sure if I understand your question correctly. But in general, of course you can start a bpm process or trigger an intermediate message event from sapui5.

      If you want to achieve this in a certain sequence, you can nest odata-model success handlers or use jquery deferred/promise.

      Regarding what odata services exist, please visit

      Author's profile photo Karthik S
      Karthik S

      Hi Jan Nyfeler,

      I am getting error when I try to post the data in /StartData. My post action fails. I don't know the root cause of the error. I followed the steps which you have given in the blog.

      Error Message :

      2017-05-11 : The following problem occurred: HTTP request failed500,Internal Server Error,{"error":{"code":"INVALID_DATA","message":{"lang":"en","value":"An error occurred. 500 Internal Server Error. Log ID: C000A2352055475F0000000001120078"}}} -

      My XSD structure :

      <xsd:complexType name="Form">
      <xsd:element maxOccurs="1" minOccurs="1" name="Name"
      type="xsd:string" />
      <xsd:element maxOccurs="1" minOccurs="1" name="Age"
      type="xsd:string" />
      <xsd:element maxOccurs="1" minOccurs="1" name="Country"
      type="xsd:string" />


      UI5 Submit Button  Action:


      var startProcessSvcURL =
      this.processStartODataModel = new sap.ui.model.odata.ODataModel(startProcessSvcURL, true);

      var startData = {};
      startData.ProcessStartEvent = {};
      var jsonModel = this.getView().getModel();

      startData.ProcessStartEvent.Form = [{Name : "karthik", Age :"26", Country :"India"}];
      this.processStartODataModel.create("/StartData", startData,null,

      function sendData_OnSuccess(oData, response) {
      alert("Task has been completed successfully");
      function sendData_OnError(oError) {
      alert("Task could not be completed");



      Karthik S