Skip to Content
Technical Articles

Getting started with Workflow in SAP Business Application Studio


SAP Business Application Studio is the next-generation SAP Web IDE, available on SAP’s multi-cloud environment (Cloud Foundry).

With Application Studio, you no longer need a Neo account to develop for Cloud Foundry.

SAP Business Application Studio comes with a rich set of tools and templates, including tools for developing workflows with SAP Cloud Platform Workflow Management.

In this blog, we will show how to create a first Workflow application in the Cloud Foundry environment of SAP Cloud Platform.



Before we continue, please make sure you have the following things in place:

  • SAP Cloud Platform account with Cloud Foundry enabled (Trial also works)
  • Entitlements for Portal, Workflow, Application Runtime and Application Studio
  • Workflow service is configured, including FLP site with My Inbox and Monitor Workflow tiles (follow the steps in the tutorial)
  • Application Studio is configured (see documentation)


Create a Dev Space

Note: If you have followed the tutorial to deploy the FLP site, then you can skip this step, and just continue with creating the application in your existing workspace in Application Studio

If you have not open Application Studio yet, you can start it from the “Subscriptions” tab in your Cloud Cockpit, and create a new Dev Space.

Make sure to select “SAP Fiori” and enable the “Workflow Management” extension on the right hand side.

Once the dev space is ready (it might take a while), go ahead and open it.

Finally you need to open a new workspace. Select the “projects” folder and proceed.

Create MTA application

For creating a deployment artifact, we need to create an MTA application.

Open a new terminal window and enter the “yo” command.

Select “Basic Multitarget Application” and enter a project name, e.g. “myworkflowapp”.

A new folder with the project name will now appear in the Explorer view.

It contains a “mta.yaml” file, which describes the application.


Create Workflow module

We can now proceed with creating a Workflow module within the MTA project.

In the terminal, go into the application folder below the “projects” folder via the command “cd <folder name>”, e.g. “cd myworkflowapp”.

Then enter “yo” again and select the “workflow/workflow Module” template.

Give a name for the workflow module (e.g. “myworkflow”), the workflow itself (e.g. “SimpleApproval”) and a description.
Confirm to overwrite the “mta.yaml” file.

Now you should see the newly created workflow in the editor.

To fill it with sample data, click on the Start event and go to the “Details” tab in the properties section.

Click on the checkbox “Configure Sample Content”, and then click on “Create File” link.

Enter a file name (e.g. “sampledata”) and continue.


Adding a User Task

Let’s add a user task to the workflow for a simple approval.

From the palette, select Tasks -> User Task and click on the connector between Start and End Event.

Click on the User Task, go to the “Details” tab in the properties sheet and enter a task subject (“e.g. Approval”).

The subject will be shown in the task list in My Inbox.

You also need to assign a recipient for the task. In the “Users” field, enter your own user ID (for instance your email address, if you are using the SAP ID service).

If you are using a custom Identity Provider, you need to enter the what is configured as the “Subject Name Identifier” (see documentation).

Finally, we need to define the form, which will be shown when the task is opened in the My Inbox.

In the user task properties, go to the “User Interface” tab.

Select “Type: Form” and click on the “Create File” link.

Now enter a name, ID and Revision for the new form (e.g. “SimpleApprovalForm”, “1.0”).

Once the form editor opens, add a new field of type “String” with label “Product”.
In the “Context Path” column, enter “${context.product}”.
This expression refers to the “product” attribute in the sample JSON file which we have created in the previous step.

In the Form editor, switch from “Fields” to “Decisions” and add a new decision called “Approve”.


Build and deploy

We are now ready to build and deploy the Workflow.

Right-click on the “mta.yaml” file in your main application folder and select “Build MTA”.

Note: In case of Trial, you need to edit the mta.yaml file and change the service plan for Workflow from “standard” to “lite”.

Once the build is completed, a new folder “mta_archives” will appear under your application folder.

Right-click on the .mta file and select “Deploy MTA Archive”.

Note: You might be asked to log in to your Cloud Foundry space. Enter the right API endpoint depending on your region (e.g., your username and password, and select your Cloud Foundry org and space.


Run the workflow

After deployment has finished, open the Fiori Launchpad site which contains the Workflow applications (refer to the pre-requisites section).

Open the Monitor Workflow (Workflow Definitions) application and select the “SimpleApproval” workflow definition.

Click on “Start new instance”.

Now, go back to the home page and open the “My Inbox” application.

There should be a task “Approval” with a form, showing the product name and an “Approve” button.



You have now modeled your first workflow with SAP Business Application Studio on Cloud Foundry.

SAP Business Application Studio is a very powerful development environment, tightly integrated with the SAP Cloud Platform and well suited for developing business applications.

There is lots more to explore, for instance creating a Fiori SAPUI5 component or calling other services.

We will follow up on this in a future blog.

You must be Logged on to comment or reply to a post.
  • Hello Christian! Thanks for this blog. We need more info about this now that the Neo environment and Web IDE are going to disappear!

    I follow you steps but had some errors at the deployment.  I can image that it is because I still don’t have the FLP with the workflow apps tiles configured. I tried to follow these steps but I cannot find the Fiori Launchpad module inside the Fiori project as the documentation says. Could you please document step by step about how did you do this? or share your projects? I would be so much easier to understand how to do it.

    Thank you in advance!

    • Hi Mariajose,

      The easiest and fastest way to set up the FLP is to import the sample project from the starter tutorial:

      After import, make sure to check the mta.yaml for the right service plans - "lite" for Trial, "standard" or "workflow" for a paid plan (you can check the entitlements in your Cloud Cockpit account).


      • Thank you for your fast reply Christian!

        I found a simpler way to enable the FLP. I did something similar as the link you shared with me.

        What I did was to enable both Workflow Management in the entitlements and later started the Booster. After having this process done, I went to the Workflow Management in the Subscriptions and clicked on "go to application": this link is the FLP already integrated with my default workflow instance. This was without the need to import any other project :). I hope this can be useful for any other developer around!

        • Yes, this will work for the simple example above.

          However, if you want to have a start form, or want to use SAPUI5 to build the task UIs, you'll still need to have a separate FLP site, as those cannot be integrated into the Workflow Management app.


  • Hi Max,


    You can start it via the Public REST API.

    So if you can add some custom controller code to your Fiori Elements application you can start the workflow instance via JavaScript code.





  • Dear Christian Loos

    Thank you for posting this wonderful blog.
    I deployed a workflow based on this blog and got the following error.
    Could you please tell me what is the problem with this?

    Creating service key "approvals-workflow_mta2-credentials" for service "workflow_mta2"...
    Uploading content module "approvals" in target service "workflow_mta2"...
    Deploying content module "approvals" in target service "workflow_mta2"...
    [approvals] [ERROR] Deployment of purchase.workflow failed due to invalid response code 422 from runtime server, Response Details: {"error":{"code":"","message":"Validation of the workflow model failed.","details":[{"severity":"error","message":"Mandatory attribute(s) 'timeDuration' on element 'idba6ebcbd-5f98-45a9-aa84-4988add22d70' not available. Make sure that it has been provided.","modelElement":"idba6ebcbd-5f98-45a9-aa84-4988add22d70","modelElementName":null}]}}
    [approvals] [FATAL] Deployment of purchase.workflow failed , Error Details: while trying to invoke the method org.springframework.http.ResponseEntity.getStatusCode() of a null object loaded from local variable 'response'


    I would appreciate it if you could tell me.


    Kai Umeki

    • Hi Kai,


      Do you get a validation error in the editor / model? Sounds like the duration on a timer or boundary event is not correctly set.

      If there is no validation error in the editor please create a support ticket.



      • Dear Christian

        Thank you for replying.

        I tried to deploy the workflow again, and I don’t know why but it succeeded.

        Anyway, thank you for your answer.


        Kai Umeki