Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
tbroek
Product and Topic Expert
Product and Topic Expert

Expense statement demo


For an internal demo on SAP NetWeaver BPM I wanted to use my own scenario to build a simple expense statement process. The demo was only meant to show the power of the new modeling environment. Please don’t take the demo process to seriously. For example no backend system is used – that is something for my next trial.
OK No backend system involved, but I did want to prove some points:
  • Process composer is easy to use tool for BPX
  • Two roles (Requester and Manager) must play a part in the process
  • Without coding the decision for automatic or manager approval must be implemented
  • End user is guided through the process
Let’s start with a view on the process, as said, a very simple process:



Step 1 – Enter the expense details
Step 2 – Validate whether an automatic or manager approval is applicable
Step 3 – Show result to requester

Implementation expense process


I re-used the SAP NetWeaver Business Process Management: End-to-End Process Implementation Sample. This blog really explains in detail what to do with your first BPM demo, even including the Web Dynpro and Portal steps. I followed the same steps but customized it to my own needs.

I needed a validation step to decide whether automatic or manager approval was applicable. Initially I was trying to implement this with BRM. But somehow I can’t get this to work. I posted a Integration of BRM within BPM does not work and hopefully an answer is on its way.
So I decided to use the built in possibilities of the Exclusive Choice Gateway. Automatic approval when the expense amount is below 25. And manager approval when it exceeds 25.



When automatic approval is applicable, I have to set the expense status to ‘Validated’. A step that normally your backend will do. As this is a simple demo I used the Mapping step in the process. The only thing you can do here is to influence the input/output mapping with the context. I set the Approved field to status ‘True’.



Other detail steps can be found in the blog by Donka. One last specialty on the Web Dynpro site of this demo: In the Manager Validation step I had to set the status to ‘True’ when the manager clicked on the Approve button, and to ‘False’ when clicked on Reject. For me, being not a Web Dynpro specialist, this gave me a hard time. But with the help of SDN I found the solution:

  public void onActionDoValidate(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionDoValidate(ServerEvent)
      wdContext.currentContextElement().setApproved(true);
      wdThis.wdGetValidateExpenseController().validateExpense();
    //@@end
  }

Screenshots of the demo


Step 1, Enter expense statement.


Great feature is the tooltip to support the end user. Where am I in the process, what and who is next?


Step 2, Validation by manager.


Step 3, Show result.

Conclusion

When I first heard that the process modeling environment was to be implemented in the SAP NetWeaver Developer Studio I was very much surprised. Do you really think that a BPX wants to install this huge development environment to model a process? I felt more for the original initiative to implement the process composer in the Visual Composer. Anyway we now have a real modeling environment somewhere and it is far more better that Guided Procedures.

Some remarks
  • Easy to model a process as the common language BPMN is used;
  • Easy to explain how modeling works;
  • Easy to understand how the process composer works;
  • Is integration with BRM finished yet?
  • Good environment to discuss with the Web Dynpro developer what the process steps really need to do;
  • If you want to go deep, train yourself in Web Dynpro 4 Java skills;
  • Thanks to Ronald Kleijn who helped me fixing the demo on the day that the demo was to be shown to all our colleagues. 

Next steps

  • Implement a ‘real’ scenario with the use of a real backend system;
  • Use real portal roles in stead of portal users;
  • Try to get BRM working in combination with BPM;
  • Implement deadlines and see how BAM can be facilitated;
  • Start the process from a functional perspective, going via the SAP NetWeaver Administrator is too techy;
  • Organize a meeting with our PI experts to discuss the overlap and new functionality that is offered.
5 Comments