-
1. Re: JBPM & WebApplication (for replace jbpm console)
swiderski.maciej Mar 18, 2010 9:14 AM (in response to mcsawyer)Hi,
I don't know how are you planning to interact with jBPM runtime but one way could be to you gwt-console-server application that exposes REST interface to interact with jBPM engine.
If that is of any interest for you there is already a method to render a form of a given task. BTW, only tasks and start node can have a form associated with it.
Just go to gtw-console-server url (http://localhost:8080/gwt-console-server) and browse all available methods, there you will find render method for tasks.
HTH
Maciej
-
2. Re: JBPM & WebApplication (for replace jbpm console)
mcsawyer Mar 18, 2010 11:04 AM (in response to swiderski.maciej)Thank you very much!!
I saw this morning gwt-console-server and its list of resources, but I try /gwt-console-server/rs/form/task/{id}/render , but with bad {id}...
I use VacationRequest.40001 (instance details-instance id) when i must use 40001.
I think that the number of samples about jbpm in web is very small, and for a begginer is hard to learn all... (and documentation is very general for a rookie)
I found Joram Barrez blog, and his samples are very useful, but I think that use JBPM from a Web Application is not explained anywhere.
Thank you for your help.
-
3. Re: JBPM & WebApplication (for replace jbpm console)
rex*05 Mar 18, 2010 11:40 AM (in response to mcsawyer)Hello John,
I am in the exact same position as you are.
I have to develop a web application which interacts with jBPM4.3 like the gwt-conole. (For my Bachelor thesis…)
I trying and testing…
Now I can start a process (with an hardcoded assignee). This assignee can see that there is a task for him and complete this task, so that the workflow is completed
But one point that makes me a little bit nervous is the thing with the forms that are needed for data input from the user. The user has to input data because this is the only way that he can influence the workflow.
One idea is, that I work with eventhandlers, at the end of a human task, that are taking data from a bean.
The user has to put in the data in a JSF-form which stores the data in the bean.
But I think this is a very static way of doing data input from a custom web application…
Do you or everyone else here have a better idea of solving this problem?
Greetings from Germany
Sandro
-
4. Re: JBPM & WebApplication (for replace jbpm console)
kukeltje Mar 18, 2010 1:00 PM (in response to rex*05)Store the date via xxxService.setVariable(....) in the process. No need for eventlisteners at all.... -
5. Re: JBPM & WebApplication (for replace jbpm console)
rex*05 Mar 23, 2010 10:15 AM (in response to kukeltje)Hello John,
I have solved some of my problems and I think this could interest you too.
I’m using JSF2.0 for my web application and solved the user input problem the following way.
I put a relative path to the input form for the task in the form flied of the task:
<task assignee="alex" form="../forms/userTaskForm1.jsf" g="220,16,92,52" name="task1">
This page contains the following code:
<h:inputText id="input1" value="#{processVariables.hashMap['Zahl1']}"> <f:converter converterId="javax.faces.Long" /> </h:inputText> <h:inputText id="input2" value="#{processVariables.hashMap['Zahl2']}"> <f:converter converterId="javax.faces.Long" /> </h:inputText> <h:inputText id="imput3" value="#{processVariables.hashMap['Zahl3']}"> <f:converter converterId="javax.faces.Long" /> </h:inputText> <h:commandButton value="Setze Variable" actionListener="#{taskController.setVariables}" />
This stores the data from the input flieds in a HashMap. When the user clicks on the commandButton this HashMap is set as variables for the task.
This works fine but is has two problems.
The first one is that I have to declare the type of the variables in the frontend with the help of converters. If I don’t do this, every variable is stored as a string.
The second one is that I have to set the names for the variables in the frontend “value="#{processVariables.hashMap['Zahl3']}">” So Zahl3 is the name/key of the variable.
Is there a possibility to predefine variables of a process in the procesdefinition.jpdl.xml?
So that I can readout the names and variables just have to fill a HashMap which already exists?
And Ronald thanks for your advice!
Greetings
Sandro