[jBPM] - Eclipse -jBPM5/CR1 - Human Task View
by bpmn2 user
bpmn2user [http://community.jboss.org/people/bpmn2user] created the discussion
"Eclipse -jBPM5/CR1 - Human Task View"
To view the discussion, visit: http://community.jboss.org/message/578519#578519
--------------------------------------------------------------
Following error gets generated while trying to use the refresh button.
It perhaps looking for the older drools class instead of using 'org.jbpm.task.service.Command'.
Any comments?
Caused by: java.lang.ClassNotFoundException: org.drools.task.service.Command
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
-------------------------------------------------------------------------------------------------------------------------------
Here is the test code snippet:
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.drools.SystemEventListenerFactory;
import org.jbpm.task.service.TaskService;
import org.jbpm.task.service.TaskServiceSession;
import org.jbpm.task.service.mina.MinaTaskServer;
import org.jbpm.task.User;
public class TestJBPMHumanTask {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws InterruptedException {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession taskSession = taskService.createSession();
taskSession.addUser(new User("Administrator"));
// start server
MinaTaskServer server = new MinaTaskServer(taskService);
Thread thread = new Thread(server);
thread.start();
System.out.println("Server started ...");
Thread.sleep(5000);
//taskSession.dispose();
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578519#578519]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
[EJB3] - @SequenceGenerator initial value
by Noa Drach
Noa Drach [http://community.jboss.org/people/newway] created the discussion
"@SequenceGenerator initial value"
To view the discussion, visit: http://community.jboss.org/message/574564#574564
--------------------------------------------------------------
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "SEQ_ACE_ACTIVE_CI")
@SequenceGenerator(name = "SEQ_ACE_ACTIVE_CI", sequenceName = "SEQ_ACE_ACTIVE_CI", allocationSize = 500)
I'm running on JBOSS 4.2.3.GA for java 6
in my entities I connect between a real DB sequence and the Id field in the following way
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "SEQ_NAME")
@SequenceGenerator(name = "SEQ_NAME", sequenceName = "SEQ_NAME", allocationSize = 500)
I put the allocation size as 500 since after some performance tests i run i saw that prevents it from going to the DB for each insert and doing
select seq.nextval from dual
- I'm using Oracle , and the above is probably not the exact syntax, just the general idea.
the thing is that although my sequence is defined with an initial value of 1000 in the DB is see that all my generated entities start with id 500000 and each time I restart my server it jumps in 500 and in the meanwhile if I look at my sequences I see that the don't progress above the initial value of 1000.
I feel stupid just asking this question, but if you can just explain to me what's missing in my understanding or point me to where this was already discussed I'll be grateful, since I couldn't find the explanation on my own. :-/
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574564#574564]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
[jBPM] - understanding taskclient
by Odelya Holiday
Odelya Holiday [http://community.jboss.org/people/odelyaholiday] created the discussion
"understanding taskclient"
To view the discussion, visit: http://community.jboss.org/message/581352#581352
--------------------------------------------------------------
I understood that in order to run HumanTask I have to register an handler. for example:
StatefulKnowledgeSession session = session.getWorkItemManager().registerWorkItemHandler("Human Task", new CommandBasedWSHumanTaskHandler());
I looked in the implementation of the class and realized that CommandBasedWSHumanTaskHandler in connect() method connects to port 9123 and starts a client task.
However, I saw in some examples, that I need to initialize this task:
TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1",new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
client.connect("127.0.0.1", 9123);
When do I have to invoke this TaskClient manually?
Who kills the task so it wouldn't sit on the same port with other tasks?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/581352#581352]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
[jBPM] - Re: JBPM 4.0 in Web Application
by Anand Prakash
Anand Prakash [http://community.jboss.org/people/anandintouch] created the discussion
"Re: JBPM 4.0 in Web Application"
To view the discussion, visit: http://community.jboss.org/message/570145#570145
--------------------------------------------------------------
Hi Deepak,
Did you get your answer about creating sample web application and using JBPM4 in it?
I'm using user doc from jboss jbpm4 and able to run jbpm-console application but they have target to create user-webapp in build.xml file under >install
directory and I'm able to build sample user-weapp which creates user-webapp under \jbpm-4.4\install\generated\user-webapp .But not sure how to deploy on jboss5.1.0 and i've noticed that user-webapp folder doesn't have web.xml.So that could be the reason ,it's not deploying on jboss properly.
If you have done this sample user-webapp deployment successfully or any other sample web app using jbpm4 in it then please let me know.
Thanks,
Anand
mailto:anandintouch@gmail.com anandintouch(a)gmail.com
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/570145#570145]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 10 months
[jBPM] - Problems running the simple demo process
by Shawn Fitzpatrick
sfitzpat [http://community.jboss.org/people/sfitzpat] created the discussion
"Problems running the simple demo process"
To view the discussion, visit: http://community.jboss.org/message/577935#577935
--------------------------------------------------------------
When I try to run the simple demo process in Eclipse, I get the follow message in the console:
java.lang.IllegalArgumentException: Could not connect task client
at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.connect(WSHumanTaskHandler.java:64)
at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.executeWorkItem(WSHumanTaskHandler.java:90)
at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:73)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:101)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:302)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:124)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1099)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:302)
at com.sample.ProcessTest.main(ProcessTest.java:43)
I have gone through setup a few times to make sure I did not miss anything. Ideas?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577935#577935]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months
[Beginner's Corner] - javax.ejb.EJBException: javax.persistence.TransactionRequiredException
by Diego Rivera
Diego Rivera [http://community.jboss.org/people/diego_rivera] created the discussion
"javax.ejb.EJBException: javax.persistence.TransactionRequiredException"
To view the discussion, visit: http://community.jboss.org/message/583343#583343
--------------------------------------------------------------
Hello, everyone!
I'm migrating an application from Glassfish 3.0.1 to JBoss 6.0.0 Final. To expedite the migration and avoid a rather hefty persistence layer refactor I'm using EclipseLink 2.1.2 as the JPA provider. Needless to say the application works fine in Glassfish. Anyway...
The application uses EJB 3.1 in a WAR (Servlet 3.0, JSF 2.0), and JPA 2.0 persistence. I have already defined the DataSources needed (included below).
I've almost got it running in JBoss 6. But I have a very strange issue regarding transactions not being properly enlisted by the persistence manager (or, at least, that's what it seems). I keep getting javax.ejb.EJBException: javax.persistence.TransactionRequiredException
Here's the (pseudo) code description-stack-thing:
Initializer.contextInitialized() -> EJB1.init() <Transaction.REQUIRED> -> EJB2.init() <Transaction.REQUIRES_NEW> -> EntityManager.createNamedQuery()
I've confirmed that the code invocation does get as far as the createNamedQuery() call because of trace logging I put in place. The problem seems to be that EclipseLink is complaining that it can't find a transaction which should obviously be there.
I've added the "eclipselink.transaction.join-existing" configuration to EclipseLink, and produced no change. I've also turned up the logging in EL in an attempt to determine where the problem is. Eclipselink is finding the correct data source (I can see that from its logs) - it's joining the transaction it seems to be having trouble with.
This is the datasource declaration in question:
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <datasources>
> <local-tx-datasource>
> <jndi-name>MyDS</jndi-name>
> <connection-url>jdbc:postgresql://localhost:5432/mydb</connection-url>
> <driver-class>org.postgresql.Driver</driver-class>
> <user-name>mydb</user-name>
> <password>mydb</password>
> <check-valid-connection-sql>select 1</check-valid-connection-sql>
> <metadata>
> <type-mapping>PostgreSQL 8.0</type-mapping>
> </metadata>
>
> <min-pool-size>8</min-pool-size>
> <max-pool-size>32</max-pool-size>
> <idle-timeout-minutes>30</idle-timeout-minutes>
> <prefill>true</prefill>
> </local-tx-datasource>
> </datasources>
The JDBC driver jar is in the right place, the datasource is shown as active in the admin console, etc.
I've not tested using an XA datasource because I'd just as soon avoid the overhead if I can (since I don't need it). This is my persistence.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" version="2.0"
> xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence" xmlns:jpa=" http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
> xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
> <persistence-unit name="Persistence Core">
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
> <jta-data-source>java:/MyDS</jta-data-source>
> <shared-cache-mode>NONE</shared-cache-mode>
> <properties>
> <property name="eclipselink.logging.level" value="ALL"/>
> <property name="eclipselink.target-database" value="PostgreSQL"/>
> <property name="eclipselink.weaving.changetracking" value="false"/>
> <!-- BEGIN PROPERTIES NEEDED FOR JBOSS COMPATIBILITY -->
> <property name="eclipselink.transaction.join-existing" value="true"/>
> </properties>
> </persistence-unit>
> </persistence>
Maybe I'm missing something in jboss-web.xml? This is the one I'm using...
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 3.0//EN" " http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
> <jboss-web>
> <context-root>/</context-root>
> </jboss-web>
As you can see, no funkyness there... maybe that's the problem?
The other problem I was having was that originally I was using a @Startup @Singleton bean with a @PostConstruct method, and was getting exceptions regarding @PostConstruct being called on a newly created bean. Thus, I switched to the WebListener-based startup model that I'm currently using (which should work just the same anyway).
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/583343#583343]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months