[JBoss jBPM] - Re: Error in Process Definition Deployment.
by Fornachari
Kukeltje, I can open here the HSQL Database Manager and can see all tables created, everything is fine, all data are in the tables. The persistence works if I run my process from the jBPM Console. The data are being stored in the tables.
The problem is if I try to instance a process from the eclipse, like I described. I receive the error "couldn't find process definition 'NameOfMyProcess'". I was using all default configurations that came in the hibernate.cfg.xml.
Then I tryied to change the hibernate.cfg.xml. When I changed the hibernate.cfg.xml I received other error: "Could Not Find DataSource".
The differences from the hibernate.cfg.xml file that I was using from the hibernate.cfg.cml file that I tried now (hibernate.cfg.xml that is inside the jbpm-console.war file) are the following lines:
hibernate.cfg.xml that I was using - Receive the error: "couldn't find process definition NameofMyProcess'"
| <!-- JDBC connection properties (begin) -->
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
| <!-- JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) ===
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| ==== DataSource properties (end) -->
hibernate.cfg.xml that I tried now - Receive the error: ""Could Not Find DataSource"
| <!-- JDBC connection properties (begin) ===
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
| ==== JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) -->
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| <!-- DataSource properties (end) -->
I just posted the differents lines between the two files, the other lines are the same for both files.
If someone have some idea, please, help me.
I thank all, but I thing I will change the database to MS SQL Server. I hope that will work better than hypersonic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154366#4154366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154366
17 years, 10 months
[Beginners Corner] - [Jboss Rules] - using constraints in LHS
by viben2512
I am discovering jboss rules (drools 4.0.7). I try to reproduce the example 'State' of drools.
The drools version works fine.
But in my version, the rules are not fired and I do not understand why .... It is so basic I do not see where my mistake is. Please help
the rule
| package examples.statemachine
|
| import com.corp.drools.examples.statemachine.State;
|
| rule Bootstrap
| when
| a : State(name == "A" )
| then
| System.out.println(a.getName() + " finished" );
| a.setState( State.STATE_FINISHED );
| end
|
the class State
| public static final Integer STATE_NOTRUN = new Integer(0);
| public static final Integer STATE_FINISHED = new Integer(1);
|
| public State(final String name) {
| this.name = name;
| this.state = State.STATE_NOTRUN;
| }
|
| private String name;
| private Integer state;
| // ... getter, setter
|
the test case :
| public void test2() throws Exception {
| final PackageBuilder builder = new PackageBuilder();
| builder.addPackageFromDrl(new InputStreamReader(
| this.getClass().getClassLoader().getResourceAsStream("examples/statemachine/rules.drl")));
|
| RuleBase ruleBase = RuleBaseFactory.newRuleBase();
| ruleBase.addPackage(builder.getPackage());
| StatefulSession session = ruleBase.newStatefulSession();
|
| WorkingMemoryConsoleLogger logger = new WorkingMemoryConsoleLogger(session);
|
| State[] objects = new State[] { new State("A") };
| session.insert(objects[0]);
| session.fireAllRules();
|
| session.dispose();
| Assert.assertEquals(State.STATE_FINISHED, objects[0].getState());
| }
|
the test case output :
OBJECT ASSERTED value:A-0 factId: 1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154364#4154364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154364
17 years, 10 months
[JBoss jBPM] - Re: Simple BPEL Process - Assignment Problem
by mike.jackson
Ok, having given up with the Eclipse BPEL Designer generated Assign code, I came up with the following:
<bpws:assign name="InitialiseClientReq" validate="no">
| <bpws:copy>
| <bpws:from>
| <bpws:literal>
| <ns0:importDeclarationResult xmlns:ns0="http://component.mule.ksb.client.cxc.kewill.com/">
| <ns0:result>UNINITIALISED</ns0:result>
| </ns0:importDeclarationResult>
| </bpws:literal>
| </bpws:from>
| <bpws:to part="parameters" variable="ClientOutboundRequest"/>
| </bpws:copy>
| </bpws:assign>
| <bpws:assign name="Assign" validate="no">
| <copy>
| <from part="payload" variable="inputData">/tns:input</from>
| <to part="parameters" variable="ClientOutboundRequest">/ns0:result</to>
| </copy>
| </bpws:assign>
Note that this is actually 2 Assigns, the first being to initialise the outbound request before trying to access it for setting using xpath.
Now this deployment seemed to get much further, as far as trying to invoke the 3rd party web service, but then this failed because...
2008-05-29 15:45:32,419 ERROR [org.jbpm.graph.def.GraphElement] action threw exception: no port implements the required port type: portType={http://component.mule.ksb.client.cxc.kewill.com/}ClientWebservi...
| org.jbpm.bpel.BpelException: no port implements the required port type: portType={http://component.mule.ksb.client.cxc.kewill.com/}ClientWebservi...
| at org.jbpm.bpel.endpointref.SoapEndpointReference.selectPort(SoapEndpointReference.java:97)
| at org.jbpm.bpel.endpointref.SoapEndpointReference.selectPort(SoapEndpointReference.java:52)
| at org.jbpm.bpel.integration.jms.IntegrationControl.createPartnerClient(IntegrationControl.java:258)
| at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:239)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:172)
| at org.jbpm.bpel.integration.def.InvokeAction.execute(InvokeAction.java:76)
So, I do a bit more googling and discover here: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995885 that I may have trouble accessing remote webservices not hosted under JBoss. Mine are actually hosted locally as CXF endpoints under Mule ESB 2.0.1.
I had another good look but could not find much mention of the bpel-application.xml anywhere, and certainly not in the 1.1GA documentation.
What do I need to do in order to access remote webservices from my BPEL process??
TIA,
Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154349#4154349
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154349
17 years, 10 months