[jBPM Users] - jbpm 4.1 and struts - architeture solution
by Josh86
Hi everybody,
i intend to combine jbpm 4.1 with struts (and spring). I think, that is in itself a good thing.
But now i think about how to integrate human tasks inside my web application. The problem is, that for a special human task type, which is defined in the jpdl file, a special page with information on it should be shown, when the user has selected one task from her/his task list page and want to complete this task.
Maybe i could define the following page in the tasklist jsp, but for many different task types, it would be very confusing and in case a new task is defined in the jpdl file, this jsp have to be changed,
I have heard of freemarker templates, but is this possible to integrate with struts?
i hope you get my problem and can help me to find a good expandable architeture solution for this (or an example would be nice ;))
Thanks for your answers,
Josh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253286#4253286
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253286
15 years, 4 months
[jBPM Users] - Re: How to trigger Sub-process from custom state recursively
by ekobir
Hi Ronald
Thanks for advice... I re-implemented ForEachFork and ForEachJoin for jbpm4 by using the code in ForkActivity and JoinActivity. Instead of using sub-process I used "group".
I tried to execute "groups" concurrently in the fork by labeling them with "continue=async".
But it created a lot of database level problems.
Then, I decided to test this with original JBPM functionality but again I got exceptions.
My question is --> Is there a way to execute "groups" async with Fork-Join or Do you suggest something else?
Please check following information.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="testForkJoin" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start name="start1" g="255,53,48,48">
| <transition name="to state1" to="state1" g="-63,-22" />
| </start>
|
| <custom g="198,134,157,52" name="state1" class="com.actions.RandomActivity">
| <transition to="fork1" g="-52,-22" />
| </custom>
|
| <fork name="fork1" g="252,291,48,48">
| <transition name="to state2" to="state2" g="-63,-22" />
| <transition name="to state3" to="state3" g="-63,-22" />
| </fork>
|
| <group name="state2">
| <start>
| <transition to="state4" />
| </start>
|
| <custom g="198,134,157,52" name="state4" class="com.actions.RandomActivity" continue="async">
| <transition to="groupDone1" g="-52,-22" />
| </custom>
|
| <end name="groupDone1" />
| <transition to="join1" />
| </group>
|
| <group name="state3" continue="async">
| <start>
| <transition to="state5" />
| </start>
|
| <custom g="198,134,157,52" name="state5" class="com.actions.RandomActivity" continue="async">
| <transition to="groupDone2" g="-52,-22" />
| </custom>
|
| <end name="groupDone2" />
| <transition to="join1" />
| </group>
|
|
| <join name="join1" g="256,461,48,48">
| <transition name="to end1" to="end1" g="-54,-22" />
| </join>
| <end name="end1" g="263,568,48,48" />
| </process>
|
and Simple RandomActivity
| public void execute(ActivityExecution ae) throws Exception {
| System.out.println("in random activity");
| for(int i=0; i < 10; i++){
| Thread.sleep(10);
| System.out.println(Thread.currentThread().getName()+":"+i);
| }
| }
|
anonymous wrote :
| Here is the exception
|
| SEVERE: Could not synchronize database state with session
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.model.ExecutionImpl#3]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
| at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:54)
| at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)
| at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)
| at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:70)
| at com.playphone.alexander.afp.workFlowProcessor.TestWorkFlow.testForkJoinGroup(TestWorkFlow.java:63)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
| at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253284#4253284
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253284
15 years, 4 months
[JBoss Tools Users] - Re: How to create a JDBC connection
by Oliver Roell
Now I have tried the old school approach:
| Context context = new InitialContext();
| DataSource ds = (DataSource) context.lookup("java:OracleDS");
|
It works. After fighting some hours with JBoss it really works.
But something must be wrong with my first dependency injection attempt.
The following annotations are all invalid and create null-values:
| @Resource(name="jdbc/OracleDS", mappedName="java:OracleDS")
| private DataSource ds1;
|
| @Resource(name="java:OracleDS")
| private DataSource ds2;
|
| @Resource(name="java/OracleDS")
| private DataSource ds3;
|
| @Resource(name="jdbc:OracleDS")
| private DataSource ds4;
|
| @Resource(name="jdbc/OracleDS")
| private DataSource ds5;
|
Does anybody know what's wrong with the Resource-annotations?
Do they work only within EJBs and not in servlets?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253282#4253282
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253282
15 years, 4 months
[jBPM Users] - Re: Handling failure of automated activities
by emp.tyres
Thanks for the replies -
"kukeltje" wrote : 1: Exception handling like in jBPM 3 is still on the todo list (look in Jira).
Actually, I was more trying to understand what options are there to recover the process after an UNhandled exception - assuming a job fails due to an automatic action throwing an exception, what state will it end in, and how can we recover it (change the offending variable, restart the failed activity, etc.)? I understand this is not trivial, but it is still very important for us as we are orchestrating a large number of systems on a critical process.
"kukeltje" wrote : For technical retries to external systems etc, I do not think jBPM should reinvent (reimplement) the wheel (like they are doing in drools with reinventing workflow) but leverage what is already there, JBoss ESB or JMS or your custom code/custom node. For business level retries, what you describe is an option. Might require a custom node though.
Agreed - I am a bit worried at implementing a wait / loop / wait / loop custom node, though (e.g: is now after given date? if so, proceed, alse thread.sleep(10000) and then re-enter activity through self-looping transaction) - I tried it and it technically works, but does it risk hanging the whole PVM? And would it behave correctly with persistence assuming e.g. JBoss is restarted? [I can provide the code if you think it could be useful for a test case]
[BTW, this was triggered by "duedatetime" in timers throwing a org.jbpm.api.JbpmException: no 'jbpm.duedatetime.format' in current environment, adding the string to the jbpm.cfg.xml does not solve it - I could not find any JIRA for it - anyone had any success in using duedatetime?]
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253281#4253281
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253281
15 years, 4 months
[jBPM Users] - Creating non technical Actions / WorkItems
by barteljan
Hello everybody :-),
I'm evaluating several java-process-engines for an business project,
were we have highly non-technical process developer.
Although I like Jbpm very much because of it's lightweight java oriented architecture,
it is a diffculty for us that there is java-knowledge needed to model jbpm-processes.
(At least when linking java-classes to a java or custom node)
What we would need would be a generic way to extend jpdl like it is done in drools with the drools WorkItems.
We need some form of NodeTemplate which could be mapped on a existing node type (maybe custom or java) to hide technical information
like class and method names from the users.
This wouldn't be a problem if I would be able to find some documentation,
about an "easy" way for extending the GPD or the Signavio Editor or to add simpler non technical nodes programmatically.
(Sorry I don't wanne grump about bad documentation ;) , it' just to illustrate my problem )
The only information about that would be the following articel http://www.mastertheboss.com/en/jbpm/106-jbpm-best-practices.html .
Which describes how to extend the Jbpm-Api for adding attributes to the task node.
But beside this article is about jbpm 3.x, it seems as if their is much insider-knowledge needed to create new nodes,
especially if they should integrated in an editor.
I did a quick scan about the pvm-documentation but I realized that XML-Processing is made by each implementing api, which implicates that this document didn't help me to map such nodes to a common type ....
Did I miss something ? Is there a way of doing such customizing of jPDL and jBPM which I didn't realized or understood ;) ???
And if not, would you think it is possible to implement such a feature for an experienced java-developer with low jbpm
and eclipse background in let's say 40 days of development work ?
I suppose this is one of the few topics were drools-flow outperforms jbpm ....
I would be very happy for every answer even if it is a "RTFM" statement :-P
Thank you for your help
Jan
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253277#4253277
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253277
15 years, 4 months