cancel
Showing results for 
Search instead for 
Did you mean: 

Building my own UWL with the BPM API

Former Member
0 Kudos

Hey guys,

currently I am working on an own little JSP/Servlet Application which display the BPM-tasks of an user.
The Application starts with an index.html where you have to enter some data (which is not relevant, yet) via a form, which calls the doPost-method of the servlet. So in the Servlet I implemented all the code to call the API. I also set the dependencies to the web-project

When I submit the data, and the doPost-method is called I get an Error:500 with the following description:

Cannot process an HTTP request to servlet [TaskServlet] in [example.org~bachelor1~ui~web] web application.

[EXCEPTION]

java.lang.NoClassDefFoundError: com/sap/bpm/api/BPMFactory

at org.Domae.Services.TaskServlet.doPost(TaskServlet.java:36)

.

.

.

This is the Code of my Servlet: TaskServlet

public class TaskServlet extends HttpServlet {

          private static final long serialVersionUID = 1L;

 

 

          protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                    TaskData data= new TaskData();

 

                    IAuthentication auth = UMFactory.getAuthenticator();

                    IUser user = auth.forceLoggedInUser(request, response);

 

                    TaskInstanceManager taskInstanceManager = BPMFactory.getTaskInstanceManager();

 

                    HashSet<Status> statuses = new HashSet<Status>();

                    statuses.add(Status.READY);

                    statuses.add(Status.RESERVED);

                    statuses.add(Status.IN_PROGRESS);

 

                    Set<TaskAbstract> myTasks = taskInstanceManager.getMyTaskAbstracts(statuses);

                    data.setNamen(myTasks);

                    request.setAttribute("data", data);

                    RequestDispatcher dispatcher = request.getRequestDispatcher("TestTask.jsp");

                    dispatcher.forward(request, response);

 

 

          }

}

Do you guys have any clue why I get such an error message?

Best Regards

Dominik

Accepted Solutions (1)

Accepted Solutions (1)

abdulbasit
Active Contributor
0 Kudos

It seems that you have missing dependency. Add runtime dependency for tc/bpem/facade/ear to you ear project.

Abdul.

Former Member
0 Kudos

Hey Abdulbasit,

thx a lot for this right and quick answer!!

Best Reagrds

Dominik

Answers (1)

Answers (1)

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dominik, Just curious as to the business context behind why you are building your own BPM inbox? Are you aware of the standard BPM HTML inbox and the Fiori Approve All inbox as alternatives?  Or have you already considered those? Would appreciate if you can let us know why you are going down this path as I've been collecting up workflow inbox options for the benefit of all SCN members here and am about to present on this at TechEd. So would love to know what took you down the custom inbox approach?

Cheers,

Jocelyn

Former Member
0 Kudos

Hey Jocelyn, this is a good question and I am very happy your asked for it. So at the moment I am in my final stage of my studies of Business Information Systems and I have to write my bachelor thesis headed "SAP NetWeaver BPM within mobile application szenarios". There is a technical approach and a theoretical one. In the technical approach I want to compare to implementations of UWL's that I build on my own. So the first one would be a serverside aproach with the logical implementaion on the server via Servlets and plain Java and the second approach would be client-side one with ODATA-Services.

That is why I ask much questions cause I never worked with the bpm api before.

In my theoretical approach I want to talk about which processes are suitable for mobile scenarios and  and when it is worthwhile for a company to invest in those solutions if there is such a mobile background.

Would you mind if I ask you for some suggestions about my topic?

Sincerely

Dominik

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dominik yes certainly you can ask and I might pass it by a few of our developers as well if that's ok. You can direct message me if you like. Good luck with your paper!