Introduction to SAP Netweaver BPM: Part 2
In the first part of this series of blogs, I have given a basic introduction to SAP Netweaver BPM and highlighted the offerings of SAP Netweaver BPM and its benefits. In this blog, we will be implementing a simple example to give you hands on experience. We have a very simple scenario wherein we will be initiating a process from a portal iview by entering some data and then initiating the process. Once the user fills the data in the portal application and initiates the process, the data will be shared from the application to the process.
We need to create two projects for this exercise, one Web Dynpro project and another Process Composer project for process modeling. In this blog we will be focusing on creating the Web Dynpro project which will contain a view for user input and the required code for initiating the process. So lets start by creating the Web Dynpro project by following the below steps:
Step 1: Create a Web Dynpro Project
Create a development component and select the type as Web Dynpro.
Specify the Domain, Project Name press next and Finish.
Step 2: Create the Component
Right click on the Components and select Create Component form the context menu.
Specify the component details and check the "Default Window and Views" checkbox.
Step 3: Create the context and mapping
Map the context between the view and the Component Controller.
Copy and paste the context to the Interface controller:
Once you have pasted the context attributes to the Interface controller, you would see the triangle sign just before the context attributes in the component controller:
Step 4: Create the form in the view
Complete the context mapping between the Component Controller and the View, create a form in the view as given below:
Step 5: Create the events
Create two events namely Complete and error in the interface controller and also create two corresponding events in the Component Controller. These will be used to indicate the completion of the task in the BPM task.
Once the events are created in both Component Controller and Interface Controller, a mapping triangle is displayed just before the event name.
Step 6: Create a Public Part for the Component that we have created above
Name the Public Part and choose the purpose as Compilation.
Step 7:
Create another view with a text for displaying both the context variables and a button which invokes the ‘Complete' event. You can create a method which invokes the ‘Complete' event in the component controller and this method can be invoked on click of the button that you have created.
Now we are done with the basic creation of the Web Dynpro component, save the content and build the project. Further process of creating the Process composer DC is described in the part three of this series of blog.