One way to go its what you did, modify the jbpm.war and include your JSF files in there
but then you will only be changing things all the time to fit your needs.
I thing the best way to do an integration is to generate your own war file
(yourAplication.war) and communicate that application with the jbpm engine, remember that
jbpm is not the jbpm.war, that is only a example of how you can make the jbpm work.
Once you deploy your own application on the deploy folder of the server, yor have access
to everything on the jbpm engine, just by using the API.
You have everything there, so for example, if you have a button to save a task on your
application, you only need a java class that uses the jbpm API to save the task,
variables, and takes the transition you need it to take.
For example(this is what I use):
| public void save(Hashtable taskVariables, String transition)
| {
| this.jbpmContext = JbpmConfiguration.getInstance().getCurrentJbpmContext();
| this.taskMgmtSession = jbpmContext.getTaskMgmtSession();
|
| try
| {
| TaskInstance taskInstance = taskMgmtSession.loadTaskInstance(taskInstanceId);
| System.out.println("ESTA ABIERTA???: " +
jbpmContext.getSession().isOpen());
|
| if(taskVariables != null && taskVariables.size() > 0)
| {
| Iterator i = taskVariables.keySet().iterator();
| while(i.hasNext()){
| String key = (String)i.next();
| Object value = taskVariables.get(key);
| taskInstance.setVariable(key, value);
| }
| }
| taskInstance.end(transition);
|
| jbpmContext.save(taskInstance);
|
| }
| }
|
Of course you need to import the correspondent packeges which in my case are:
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.db.TaskMgmtSession;
Hope that helps.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054549#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...