Skip to Content
Technical Articles
Author's profile photo Venugopal Chembrakalathil

SAP Cloud Platform Workflow Sample Application in Cloud Foundry


As part of SAP Cloud Platform multi cloud strategy, SAP Cloud Platform Workflow is available in AWS Frankfurt data center in  Cloud Foundry environment. See more details in this blog.

Workflow application from Neo environment requires a few migration steps to deploy in Cloud Foundry. We have migrated our sample application Employee Onboarding from Neo and it is available now in SAP WebIDE full stack to deploy and run in Cloud Foundry environment.

This blog will guide you to import, configure ,deploy and run the workflow sample application in SAP Cloud Platform Cloud Foundry Environment.

Pre requisite

  • You have  a SAP Cloud Platform – Cloud Foundry account  in AWS Frankfurt DC with entitlements to Workflow ,Portal , HTML5 Application Repository and  runtime of HTML5 Application Repository.
  • You have created a  Space in your Cloud foundry org and assigned Space Developer role to your user. Please go through the help portal to create a space in a sub account.
  • You have created an instance of workflow and portal service in your Cloud Foundry Space. Please go through the help portal.
  • You have created a portal site to create Monitor Workflow and My Inbox tiles. Please go through the hep portal to learn how to create a monitor workflow and My Inbox tiles.
  • You have a Neo sub account with Web IDE full stack subscription.

Setup Sample Application

  1. Open SAP Web IDE full stack in Neo environment and enable workflow feature.

2. Create a   Multi Target Application using a Sample application.

3. Select the Cloud Foundry version of Employee Onboarding Sample Application.

4. Accept License agreement and click Finish button.

Configure Employee Onboarding Sample Application

Employee Onboarding Sample Application is now imported into your work space. You have to make couple of configuration changes before deploy and run the application in your account.

SAP Cloud Platform Workflow supports Multi Target Application model  to create,build and deploy workflow applications in cloud foundry environment. A multi target application contains multiple modules created with different services, build and deployed to different targets but with a common life cycle. A MTA model is a platform independent description of the different modules , their dependencies and configuration data they expose and the resource they require to run. This model is specified  using YAML(

Update mta.yaml file

Expand the project sample.onboarding.mta and open the mta.yaml file. If you have already created a Workflow Service Instance in your  space, Select the Resources tab and update your workflow instance name. Change the type as org.cloudfoundry.existing-service

Modify the Workflow Sample Data

Modify the workflow SampleInputContex.json by updating appropriate onboarding userId from Successfactors. You could add your Cloud Platform userId as both buddyId and managerId.

Build and Deploy Sample Application

  1. Right click project sample.onboarding.mta and select Build.

A successful build will create a mta-archives folder under the sample.onboarding.mta project.

2. Select the build archive ,right click and select Deploy

A successful deployment will show a message on the top right corner and the build logs in the console.

Create a Destination to call SuccessFactors APIs

The sample workflow application is calling SuccessFactors to get the user details of the new hire and the team members. A destination (SFSF) is used in the Workflow model to call these apis.

Go to your SAP Cloud Platform Cockpit and select your subaccount where you have deployed the workflow sample application. Select Connectivity->Destination and click New Destination.

Enter the Name as SFSF and provide the API url based on your SuccessFactors Data Center. Please refer the note to get the correct api url. You can get a new SuccessFactors test tenant using your S-user account from here.

Use basic authentication and provide the user name as UserName@CompanyID. Company ID is the SuccessFactors company Id.


Execute workflow Sample Application

  1. Logon to your Fiori Launch Pad where you have configured Monitor Workflows  application and My Inbox. Select Workflow Definitions to see all deployed workflow definitions.

2. You can see the deployed onboard workflow. Select onboard workflow definition and click Start New Instance to create a workflow instance.

3. Enter the workflow context json payload. Make sure you enter a valid SuccessFactors user Id and for testing use your cloud Platform user Id as buddyId and managerId. Click Start New Instance button.

4. Click Show Instances button to see all workflow Instances of onboard workflow definition.

5. You could see the newly created workflow instance details including context data and workflow logs.

6. Go home page and click My Inbox to see the use task created. The count at the My Inbox tile indicates there is a task instance to the user. Click My Inbox tile.

7. The Workflow task Confirm or Change Equipment is displayed. You can click the + button to add any new equipment. Click Confirm button to complete the task. On completion the task will disappear from the list.

8. If you have assigned the buddyId and managerId as the same user, refresh My Inbox to get the Approve Equipment task. If it is two different users, logoff and logon using the manager user id and access My Inbox. Approve Equipment task will show the equipment configured by the buddy. The manager could either Approve or Reject the proposed equipment for the new hire. Click Approve button to complete the task.

9. If you have assigned buddyId and managerId as the same user, refresh My Inbox to get the Accept Workplace task. If it is two different users, logoff and logon using the buddy user id and access My Inbox. Click Accept Workplace button to complete the task.

10. This will change the workflow status to completed. Go to home screen and click on Monitor workflow Workflow Instances tile. In order to see the completed instance click the filter button and add Completed status.

11. You could see the workflow instance is completed.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Pankaj Kamble
      Pankaj Kamble

      Hi Venugopal,

      I am trying to enable Workflow service in SAP Cloud Foundry from “Service Marketplace” but not able to see “Workflow” service but when checked under NEO Trial then Workflow, Portal services are there. Please help me to enable Workflow service in SAP Cloud Foundry.

      Author's profile photo sergio congia
      sergio congia

      Hi Pankaj

      Were you able to activate Workflow on your trial CF account?


      Author's profile photo kiran kumar kandakatla
      kiran kumar kandakatla

      When i am trying to Deploy the application i am getting an error "User does not have sufficient privilages"

      My user ID has Admin Privileges in neo account.

      How to address this error

      Author's profile photo Venugopal Chembrakalathil
      Venugopal Chembrakalathil
      Blog Post Author

      When you deploy a workflow MTA application in CF, the user configured for deployment requires a Developer role in CF space. Please check your use has the required role in your CF space.

      Author's profile photo Manjunath GUDISI
      Manjunath GUDISI

      Hi Venugopal Chembrakalathil

      I have done the following and deployment of MTA project is failed.

      1. Created project from sample application
      2. Changed the workflow service as I already have workflow instance
      3. Built the project using "Build with Cloud MTA build Tool"
      4. mtar file got created
      5. Getting error while deploying



      Preparing to deploy /sample.onboarding.mta/mta_archives/sample.onboarding.mta_0.0.1.mtar
      Prepare deployment files
      Checking if there are conflicting processes
      Found 1 conflicting processes
      Aborting process f17015b4-4694-11ea-8037-eeee0a8f8f6d
      Uploading mtar archive
      Starting deployment
      Deploying in org "in-workflow-demos-org" and space "demos"
      Detected MTA schema version: "3"
      Detected deployed MTA with ID "sample.onboarding.mta" and version "0.0.1"
      Detected new MTA version: "0.0.1"
      Deployed MTA version: "0.0.1"
      Processing service "sample_onboarding_html5_repo_host"...
      Updating application "uiDeployer"...
      Application "uiDeployer" attributes are not modified and will not be updated
      Uploading application "uiDeployer"...
      Staging application "uiDeployer"...
      Application "uiDeployer" staged
      Starting application "uiDeployer"...
      Application "uiDeployer" started
      Error executing application "uiDeployer": Deployment of html5 application content failed [Deployment Id: deploy-86fe8518-4695-11ea-9480-eeee0a8bd1ec]
      Stopping application "uiDeployer"...
      A step of the process has failed. Retrying it may solve the issue.
      To download logs of the process, use the multi-target application plug-in for the Cloud Foundry CLI command "cf dmol -i 86fe8518-4695-11ea-9480-eeee0a8bd1ec" directly in your Cloud Foundry space.
      For more information see
      Job failed.
      8:30:34 PM (DeploymentToCF) Deployment of the "sample.onboarding.mta" project failed.(Response state is FAILED)
      Author's profile photo Archana Shukla
      Archana Shukla

      Hello Manjunath,

      this issue comes if you do not have the needed html quota. Also sometimes due to service downtime also the deployment fails. Mostly redeployment after some time helps and solves the issue.

      Author's profile photo Raman Baskaran
      Raman Baskaran

      Hi Archana/@venugopal,

      Thanks for the details and post. Is there any sample application or steps to do the same from consumer.


      1. From consumer create the WF definition

      2. And through provider all the GET and other operations should be possible using multitenant.


      Currently I am.trying to create PaaS solution to create WF definition and SaaS for GET task and instances. As my  application is SaaS and WF is bundled as a part of subscription. Is this fine or any other recommendations