[jBPM] - How to use different implementation of UserGroupCallback for each Process?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to use different implementation of UserGroupCallback for each Process?"
To view the discussion, visit: https://community.jboss.org/message/826502#826502
--------------------------------------------------------------
Hi,
in JBPM (currently I am using JBPM 5.4 Final ), is it possible to have different implementation of UserGroupCallback for every process definition?
Sample case is I have two …
[View More]different process, say Process A and Process B
Process A has its own user and group store and structure while Process B also has its own user and group store and structure.
Is it possible to have different implementation of UserGroupCallback for each Process Definition?
Currently this is my setup:
1. I use JBPM 5.4 Final
2. My JBPM jars and Human Task jars are bundled in one WebApp
3. I use Spring to setup single StatefulKnowledgeSession that lives as long as the WebApp lives.
4. I also setup a Local Task Service and set the UserGroupCallback implementation via Spring
this is how my the UserGroupCallback registered in Spring
<bean id="userGroupCallbackManager" class="org.jbpm.task.identity.UserGroupCallbackManager"
factory-method="getInstance">
<property name="callback" ref="chameleonUGC"></property>
</bean>
A brief chat with Salaboy (Mauricio Salatino) in IRC, he says that I can set multiple Knowledge Session for each process definition
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/826502#826502]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 7 months
[jBPM] - jBPM noob questions
by Viktor Alexandrov
Viktor Alexandrov [https://community.jboss.org/people/synclpz] created the discussion
"jBPM noob questions"
To view the discussion, visit: https://community.jboss.org/message/825487#825487
--------------------------------------------------------------
Hello, all. I got some noob (maybe) questions concerning implementing existing scenarios in jBPM. I got some proprietary workflow manager runtime (running on AS7) and tooling to define workflows via graphical editor. The workflows are rather …
[View More]simple and consist of nodes (with in/out parameters) and arrows pointing to the next node (or nodes if current node makes some decisions). Every node is a simple java class that allows to perform some operation: math operations, database lookups/stores, invoke HTTP GET's, log, start another workflows, some proprietary actions and so on.
Now I want to migrate existing service logic to jBPM (actually may be to SwitchYard with jBPM as process orchestrator). Beacause of almost no knowledge in "perfect" BPMN I'm afraid of making wrong architectural decisions :)
I would be very glad if someone could propose me the right solutions or just post some links to the right places to read!
My simple process looks like this:
1. Log some input vars
2. Prepare (map) some additional parameters
3. Query some application properties (config)
4. Query DB with request based on prepared data
5. Modify data (e.g. update modification time)
6. Update data in DB
7. Invoke some sub-process
8. Execute some action through, for example, HTTP or other (proprietary) interface
9. If everything ok, commit data in DB, else rollback and write log
10. Map some paramerers for output
11. Finish
I cannot understand clearly how this should be implemented using jBPM tools. As I could imagine, logging and parameter mapping and runtime bean fileds updating could be performed via Script Node with java expressions, but may be I should use some other tools for it? I cannot find how do I query DB, update DB: is it only done through custom Service Node? Is there a possibility (examples) to use ORM for domain-specific data model? How could I invoke sub-process with, for example, process name and parameters derived in run-time? If someone could supply any more or less complex examples of jBPM usage: with custom data model or custom services invocations, it would be very appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825487#825487]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 7 months
[JBoss Messaging] - Spring JMS error with JBoss 7.1.1-Final
by Marcio B.
Marcio B. [https://community.jboss.org/people/romarcio] created the discussion
"Spring JMS error with JBoss 7.1.1-Final"
To view the discussion, visit: https://community.jboss.org/message/730037#730037
--------------------------------------------------------------
Hello!
I am trying to configure a JMS Listener with Spring 3.1 in JBoss 7.1.1-Final.
But this exception is thrown:
21:05:20,184 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-12) MSC00001: Failed to start service jboss.…
[View More]deployment.unit."jms-receiver.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jms-receiver.war".PARSE: Failed to process phase PARSE of deployment "jms-receiver.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011666: Could not parse file C:\jboss-as-7.1.1.Final\standalone\tmp\vfs\temp22a1673201a833b9\jms-receiver.war-1a83767da3f83ba\WEB-INF\spring-jms.xml
at org.jboss.as.messaging.deployment.MessagingXmlParsingDeploymentUnitProcessor.deploy(MessagingXmlParsingDeploymentUnitProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011666: Could not parse file C:\jboss-as-7.1.1.Final\standalone\tmp\vfs\temp22a1673201a833b9\jms-receiver.war-1a83767da3f83ba\WEB-INF\spring-jms.xml
at org.jboss.as.messaging.deployment.MessagingXmlParsingDeploymentUnitProcessor.deploy(MessagingXmlParsingDeploymentUnitProcessor.java:73)
... 6 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,1]
Message: Unexpected element '{ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans}beans'
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:108) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.as.messaging.deployment.MessagingXmlParsingDeploymentUnitProcessor.deploy(MessagingXmlParsingDeploymentUnitProcessor.java:67)
... 6 more
21:05:20,198 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "jms-receiver.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"jms-receiver.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jms-receiver.war\".PARSE: Failed to process phase PARSE of deployment \"jms-receiver.war\""}}
21:05:20,351 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015877: Stopped deployment jms-receiver.war in 153ms
21:05:20,352 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."jms-receiver.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jms-receiver.war".PARSE: Failed to process phase PARSE of deployment "jms-receiver.war"
File spring-jms.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jboss.naming.remote.client.InitialContextFactory</prop>
<prop key="java.naming.provider.url">remote://localhost:4447</prop>
<prop key="java.naming.security.principal">user</prop>
<prop key="java.naming.security.credentials">pass</prop>
</props>
</property>
</bean>
<bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jms/RemoteConnectionFactory"/>
<property name="jndiTemplate" ref="jndiTemplate"/>
</bean>
<bean id="secureConnectionFactory" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="queueConnectionFactory"/>
<property name="username" value="user"/>
<property name="password" value="pass"/>
</bean>
<bean id="queueName" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jms/queue/test"/>
<property name="jndiTemplate" ref="jndiTemplate"/>
</bean>
<bean id="messageListener" class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<constructor-arg>
<bean class="com.tecnoil.consumer.jms.JMSConsumer"/>
</constructor-arg>
<property name="messageConverter">
<null/>
</property>
</bean>
<bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="secureConnectionFactory"/>
<property name="destination" ref="queueName"/>
<property name="sessionAcknowledgeModeName" value="AUTO_ACKNOWLEDGE"/>
<property name="messageListener" ref="messageListener"/>
<property name="receiveTimeout" value="1000"/>
</bean>
</beans>
What is the solution?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/730037#730037]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 7 months
[Datasource Configuration] - Need help accessing a jdbc datasource inside ejb on jboss 7.1.1
by tareq zaman
tareq zaman [https://community.jboss.org/people/tareq_zaman] created the discussion
"Need help accessing a jdbc datasource inside ejb on jboss 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/826053#826053
--------------------------------------------------------------
Hi,
I would appreciate any help on this. I have tried so many ways but no success yet. I am trying to test a datasource inside an session ejb in JBoss AS 7.1.1.Final. Using MS SQL server.
Getting …
[View More]name not found exception, here is the stack trace. Please note in the code I am using the full JNDI name as java:jboss/datasources/ezsystemDS.
19:20:57,293 ERROR [stderr] (EJB default - 1) javax.naming.NameNotFoundException: jboss/datasources/ezsystemDS -- service jboss.naming.context.java.jboss.exported.jboss.datasources.ezsystemDS
19:20:57,306 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
19:20:57,317 ERROR [stderr] (EJB default - 1) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
19:20:57,325 ERROR [stderr] (EJB default - 1) at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)
19:20:57,332 ERROR [stderr] (EJB default - 1) at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
19:20:57,337 ERROR [stderr] (EJB default - 1) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
19:20:57,341 ERROR [stderr] (EJB default - 1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
19:20:57,344 ERROR [stderr] (EJB default - 1) at java.lang.Thread.run(Thread.java:724)
19:20:57,646 INFO [org.jboss.as.naming] (Remoting "sc1-mis99" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 5643bfb0 (inbound) of Remoting connection 0148380c to null
When Jboss starts I can see datasources are bound correctly. Also verified that from JBOSS console naming tree view.
[org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-14) JBAS010400: Bound data source [java:jboss/datasources/ezsystemSeqDS]
19:15:45,643 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
19:15:45,643 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-11) JBAS010400: Bound data source [java:jboss/datasources/ezsystemDS]
19:15:45,947 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 http://127.0.0.1:9990
19:15:45,948 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final
Here is my ejb code
public String echo(String input){
try {
InitialContext ctx = new InitialContext();
DataSource datasrc = (DataSource)ctx.lookup("java:jboss/datasources/ezsystemDS");
if(datasrc != null) {
Connection con = datasrc.getConnection();
con.close();
}
} catch (Exception e) {
// TODO Auto-generated catch block
String x = e.getMessage();
e.printStackTrace();
}
return "Echoing back " + input ;
}
Data sources are configured in module.xml and created using admin console. Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/826053#826053]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 7 months
[Datasource Configuration] - Regarding "Communications link failure" in Jboss 5.1.2
by JBoss Is My Boss
JBoss Is My Boss [https://community.jboss.org/people/imranbaseer] created the discussion
"Regarding "Communications link failure" in Jboss 5.1.2"
To view the discussion, visit: https://community.jboss.org/message/826215#826215
--------------------------------------------------------------
Hello Folks,
Could you please help me on the below issue?
Event: While doing AP → DB process, there is a process which run SQL for long time, when passing 3600 seconds(60 minutes) then the session was …
[View More]disconnected and an error occurred in Jboss side then after that it became the status which the process was not running normally unless rebooting the instance of Jboss. No issues if it is processing within 3600 seconds.
In the jboss-4.0.5 environment, Normal result is the output to the screen after a lapse of more than 3600 seconds. But In the jboss-5.1 environment, an error will occur when 3600 seconds have elapsed.
Error in Jboss Log:
Attached with this discussion. Please find it.
We are using the below ,
MySQL 5.5.21
Jboss 5.1.2
OpenJDK 1.6.0_22
Redhat Linux 5.7
I am thinking that the root cause is the connection error that is occurring at the mysql driver level and there is an external change that is causing the communication link failure and this is not originating from the application server. It is manifesting at the driver level. Please confirm?
Could you please let me know the following,
1) Countermeasure to avoid the session disconnection at 3600 seconds in jboss-5.1 environment?
2) Cause for not performing normally if it takes 3600 seconds in jboss-5.1 environment?
3) Long SQL query(3600 seconds) is processing normally in jboss-4.0.5 environment but not in the jboss-5.1 environment. What could be reason for this issue?
4) How to solve this issue in jboss-5.1 environment? Please let me know if you need more information
Please let me know if you need more information.
Thanks in advance for you suggestions and solutions.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/826215#826215]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
[View Less]
11 years, 7 months