Step 1: Open SAP Web IDE Full-Stack
- In your Web browser, open the cockpit of SAP Cloud Platform.
- Choose Neo Trial.
- Select Services from the left-hand navigation.
- Search for the Workflow service. Then select it, and choose SAP Web IDE Full-Stack.
Step 2: Create a form for a user task
-
In the SAP Web IDE Full-Stack, open the MyFirstWorkflow.workflow
workflow file and select the ApproveBook
task.
-
Under User Task Properties, select User Interface.
-
In the Type field, choose Form.
-
To create a new form, choose the Create File link.
-
In the New Form dialog, enter the following data:
- Name:
ApproveBook
- ID:
approvebook
- Revision:
1.0
-
Choose Create.
You created the new file ApproveBook.form
in the workflow project in the folder MyWorkflowProject/forms/MyFirstWorkflow
. The form editor opened automatically, so you can edit the form in the subsequent steps.
Step 3: Add fields to your form
-
In the form editor (for the ApproveBook.form
), select the Fields section.
-
To add two new fields, click Add Field twice.
-
Fill the two new rows that are added in the Fields section as follows.
First row:
- In column Label/Title, enter
Title
.
- In column Type, select String.
- In column Context Path, enter
${context.product}
.
Second row:
- In column Label/Title, enter
Price
.
- In column Type, select Float.
- In column Context Path, enter
${context.price}
.
Step 4: Add approve and reject buttons
-
In the form editor (for the ApproveBook.form
), select the Decisions section.
-
To add two new buttons, click Add twice.
-
Fill the two new rows that are added in the Decisions section as follows.
First row:
- In column Text, enter
Approve
.
- In column ID, make sure that
approve
is entered.
- In column Type, select Positive.
Second row:
- In column Text, enter
Reject
.
- In column ID, make sure that
reject
is entered.
- In column Type, select Negative.
Don’t forget to Save the file.
Step 5: Deploy your form
-
Select the form file in the workspace.
-
Open the context menu by right-clicking on the ApproveBook.form
file, and choose Deploy | Deploy to SAP Cloud Platform Workflow.
After the successful deployment a corresponding message toast is displayed.
Step 6: Deploy your workflow
-
Select the workflow file in the workspace.
-
Open the context menu by right-clicking on the MyFirstWorkflow.workflow
file, and choose Deploy | Deploy to SAP Cloud Platform Workflow.
Step 7: Start a new workflow instance
-
In the SAP Fiori launchpad, open the Monitor Workflow - Workflow Definitions tile.
Note that the version of your workflow definition has increased.
-
Choose Start New Instance.
-
Leave the standard JSON input as is, and choose Start New Instance.
-
Choose Show Instances.
The execution log shows a task waiting in the inbox.
Step 8: Open the task in My Inbox
-
Go back to the SAP Fiori launchpad homepage. The My Inbox tile shows one open task.
-
Open the inbox. The task and some header information is displayed, and the values for the Title and Price properties are shown. In addition, there are Approve and Reject actions available for this user task.