[jBPM Development] - Unable to start-up human task
by phumla Andrease
phumla Andrease [http://community.jboss.org/people/paa] created the discussion
"Unable to start-up human task"
To view the discussion, visit: http://community.jboss.org/message/617437#617437
--------------------------------------------------------------
Hi All
Please HELP!! new bee :|
I have created my own human task process but i cant get it to start using eclipse when i debug it, what could be the issue?
I have tried everything i could think of , "even compared it with a the evaluation process"
http://community.jboss.org/servlet/JiveServlet/showImage/2-617437-16789/E... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-617437-167...
My Java Class
package com.jbpm.process;
import java.util.HashMap;
import java.util.Map;
import org.drools.KnowledgeBase;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.jbpm.process.workitem.wsht.WSHumanTaskHandler;
/**
* This is a sample file to launch a process.
*/
public class ProcessTest {
public static final void main(String[] args) {
try {
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "test", 1000);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new WSHumanTaskHandler());
// start a new process instance
Map<String, Object> params = new HashMap<String, Object>();
params.put("employee", "Krisv");
params.put("comment", "Load login screen");
ksession.startProcess("com.jbpm.process.captureProcess", params);
logger.close();
} catch (Throwable t)
{
t.printStackTrace();
}
}
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("Capture.bpmn"), ResourceType.BPMN2);
return kbuilder.newKnowledgeBase();
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617437#617437]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
[JBoss AS7 Development] - Messaging configuration in AS 7
by Andrew Murphy
Andrew Murphy [http://community.jboss.org/people/Smurfs] created the discussion
"Messaging configuration in AS 7"
To view the discussion, visit: http://community.jboss.org/message/614468#614468
--------------------------------------------------------------
Hi All,
I am migrating code to run in AS7 but I am struggling with my messaging configuration. The particular problem I face is my MDB's are not aware of the messages being sent, which I suspect has more to do with the references to JNDI in my MDB class annotations than my standalone.xml settings. I have spent hours googling, and tried everything possible to get the code to run, but now have to surrender and seek help!
In order to assist in replicating the problem I face I have created a very basic test case which is attached, together with my standalone.xml file which is the standard Web Profile plus the messaging module settings from standalone-preview.xml.
Please could someone run the code and tell me what I am doing wrong - your help will be greatly appreciated!
Thank you,
Andrew
Development environment
====================
jboss-7.0.0.Final-SNAPSHOT ("Lightning"), Eclipse Indigo, Windows 7 (64-bit) and jdk1.6.0_24.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/614468#614468]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
[JBoss AS7 Development] - JBoss start Connection Exception
by P Mishra
P Mishra [http://community.jboss.org/people/pmishratext] created the discussion
"JBoss start Connection Exception"
To view the discussion, visit: http://community.jboss.org/message/617691#617691
--------------------------------------------------------------
I just installed the JBoss 7 - jboss-as-7.0.0.Final and have no ears deployed. I am getting an error during start up in the domain mode (domain.bat). standalone.bat works fine.
What's JBoss trying to connect to ? ... a datasource ?
The error's below.
[Host Controller] 08:51:14,499 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.0.GA
[Host Controller] 08:51:15,529 ERROR
(MSC service thread 1-4) MSC00001: Failed to start service jboss.host.controller.process-controller-connection: org.jboss.msc.service.StartException in
service jboss.host.controller.process-controller-connection: java.net.ConnectException: Connection refused: connect
[Host Controller] at org.jboss.as.host.controller.ProcessControllerConnectionService.start(ProcessControllerConnectionService.java:125) [jboss-as-host-controller-7.0.0.Final.jar:7.0.0.Final]
[Host Controller] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) [jboss-msc-1
.0.0.GA.jar:1.0.0.GA]
[Host Controller] at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) [jboss-m
sc-1.0.0.GA.jar:1.0.0.GA].
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617691#617691]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 7 months
Re: [jboss-dev-forums] [JBoss AS7 Development] - Data Source Configuration in AS 7
by Karsten Wutzke
Karsten Wutzke [http://community.jboss.org/people/kwutzke] commented on the document
"Data Source Configuration in AS 7"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16657#comment-7163
--------------------------------------------------
In any case, whatever I tried, I only got the MySQL driver to work as a module. Here's my final <datasources> element from standalone.xml using the MySQL driver installed as a module:
<datasources>
...
<datasource jndi-name="java:jboss/datasources/YourDS" pool-name="MySqlDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://localhost:3306/yourdb
</connection-url>
<driver>
mysql
</driver>
<transaction-isolation>
TRANSACTION_READ_COMMITTED
</transaction-isolation>
<pool>
<min-pool-size>
10
</min-pool-size>
<max-pool-size>
100
</max-pool-size>
<prefill>
true
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
user
</user-name>
<password>
pass
</password>
</security>
<statement>
<prepared-statement-cache-size>
32
</prepared-statement-cache-size>
</statement>
</datasource>
<drivers>
...
<driver name="mysql" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
Note that the way you install the driver (deployment vs. module) is independent from the server operating mode (standalone vs. domain), even though you drop the driver JAR into the standalone/deployments directory, see https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application... https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application.... So you effectively get a matrix of four driver installation - operating mode possibilities, aside from the JDBC 4 compliance (which simply defines whether you need to specify the driver name somewhere) and the choice of XA or plain datasource (adjust tag and class names as appropriate). Note, for whatever reason, there's no such thing as a <datasource-class> tag, hence the use of <xa-datasource-class>.
I have also just gotten through all this and I definitely need to re-read documentation like https://docs.jboss.org/author/display/AS7/Operating+modes https://docs.jboss.org/author/display/AS7/Operating+modes myself. Hopefully this will help someone else.
--------------------------------------------------
13 years, 7 months