[jBPM] - Action based on user input in human task
by Bhaskaran Venkataraman
Bhaskaran Venkataraman [https://community.jboss.org/people/bhaskarven] created the discussion
"Action based on user input in human task"
To view the discussion, visit: https://community.jboss.org/message/738755#738755
--------------------------------------------------------------
I am trying to figure out how to take care of the events based on user input. Say for e.g., we
have a form where the manager can accept of reject the request. So the form should be having the
"Accept" and "Reject" buttons. When the manager clicks on "Accept" what happens ? Basically
we can set a process variable to have the outcome, say if "Accept" then process variable outcome
is set to 1. Else it is set to 0. I looked at XML code for sample application and did not find anything
related to submit buttons. I also could not locate the ftl files of the sample application in the Console
Server war file. Do I have to do this in code by creating a Mina task client and then interacting with the
task service ?
I thought this should have asked many many times before in the forum but on browsing did not find
what I need. If it is already there all I need is a link to that article. Also it will help if I know where
the ftl files for the sample application are stored.
Thanks for your help
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738755#738755]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - Where is jbpm-5.3.0.Final-src.zip?
by TC ONG
TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"Where is jbpm-5.3.0.Final-src.zip?"
To view the discussion, visit: https://community.jboss.org/message/738652#738652
--------------------------------------------------------------
I'm looking for the source code files.
Because when I run
private org.jbpm.task.TaskService localTaskService;
private org.jbpm.task.service.TaskService taskService;
...
...
localTaskService = new org.jbpm.task.service.local.LocalTaskService(taskService);
I get
Caused by: java.lang.NullPointerException
at org.jbpm.task.service.TaskService.createSession(TaskService.java:164)
at org.jbpm.task.service.local.LocalTaskService.<init>(LocalTaskService.java:52)
at com.geneoz.procedureengine.impl.drools.RulesEngineManager.init(RulesEngineManager.java:66)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 20 more
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738652#738652]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - Reading User Form Variables
by Bhaskaran Venkataraman
Bhaskaran Venkataraman [https://community.jboss.org/people/bhaskarven] created the discussion
"Reading User Form Variables"
To view the discussion, visit: https://community.jboss.org/message/738639#738639
--------------------------------------------------------------
I have a question regarding the User Forn variables. I was under the impression that freemarker template (ftl)
files have to be created for user forms. But I was able to run the HelloProcess example discussed in this forum.
I believe the XML code creates the user interface form.
1. I tried to read my own ftl file by changing the TaskName property in the XML. I have the Hello.ftl deployed
in the resources directory of the project as I have seen it in an example. But it does not display my form.
It is still reading the hardcoded contents in the XML
| | <dataInputAssociation> |
| | <targetRef>_4_TaskNameInput</targetRef> |
| | <assignment> |
| | <from xsi:type="tFormalExpression">Hello</from> |
| | <to xsi:type="tFormalExpression">_4_TaskNameInput</to> |
| | </assignment> |
| | </dataInputAssociation> |
2. I see a complete button to submit the form. But that is not harcoded anywhere in the XML. Where does it come
from ? The XML file of the BPMN diagram is attached for your reference.
I would like to read my own ftl files rather than hardcoding the contents in the XML. In the Developers Guide I saw
an example where the ftl file is included in the XML with the following construct. But I do not have any examples
on that usage of how input/output is done through the form.
<userTask id="requestVacation" name="Request Vacation"
implementation="other">
<potentialOwner resourceRef="user" jbpm:type="group">
<resourceAssignmentExpression>
<formalExpression>user</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<rendering id="requestForm">
<jbpm:form>org/jbpm/examples/bpmn/usertask/taskform/request_vacation.ftl</jbpm:form>
</rendering>
</userTask>
Your response will be highly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738639#738639]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - Log4J setting overwrite?
by TC ONG
TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"Log4J setting overwrite?"
To view the discussion, visit: https://community.jboss.org/message/738621#738621
--------------------------------------------------------------
I update my environment to drools 5.4.0 and jbpm 5.3.0 and now I get these message show up when I start my spring tomcat app. Anyone seen this before? How to solve this? My app log no shown anymore.
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [org.drools.grid] additivity to [true].
log4j: Level value for org.drools.grid is [INFO].
log4j: org.drools.grid level set to INFO
log4j: Level value for root is [ERROR].
log4j: root level set to ERROR
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Setting property [target] to [System.out].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%-4r %-5p %x- %m%n].
log4j: Adding appender named [console] to category [root].
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738621#738621]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months
[jBPM] - Drools-Spring: java.lang.ClassNotFoundException: org.drools.command.Context
by TC ONG
TC ONG [https://community.jboss.org/people/devilkazuya99] created the discussion
"Drools-Spring: java.lang.ClassNotFoundException: org.drools.command.Context"
To view the discussion, visit: https://community.jboss.org/message/738622#738622
--------------------------------------------------------------
I have in my beans.xml
<drools:ksession id="jpaSingleSessionCommandService" type="stateful" kbase="kbase" >
<drools:configuration>
<drools:jpa-persistence>
<drools:transaction-manager ref="jpaTxManager" />
<drools:entity-manager-factory ref="myEmf" />
</drools:jpa-persistence>
</drools:configuration>
</drools:ksession>
and I get these error message
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaSingleSessionCommandService': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/drools/command/Context
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
... 23 more
Caused by: java.lang.NoClassDefFoundError: org/drools/command/Context
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2820)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1150)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:126)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
at org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory.internalAfterPropertiesSet(StatefulKnowledgeSessionBeanFactory.java:85)
at org.drools.container.spring.beans.AbstractKnowledgeSessionBeanFactory.afterPropertiesSet(AbstractKnowledgeSessionBeanFactory.java:123)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.drools.command.Context
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 52 more
I'm using drools 5.4.0 and jbpm 5.3.0.
I'd checked the drools-core-5.4.0.Final.jar and org.drools.command.Context is no longer there.
Any idea?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/738622#738622]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 10 months