[jboss-user] [jBPM] - Re: NullPointerException while executing knowledgeSession.getProcessInstance
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: NullPointerException while executing knowledgeSession.getProcessInstance" To view the discussion, visit: https://community.jboss.org/message/799155#799155 -- i want to get the process instance that i created in a session. -- Reply to this message by going to Community [https://community.jboss.org/message/799155#799155] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - NullPointerException while executing knowledgeSession.getProcessInstance
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "NullPointerException while executing knowledgeSession.getProcessInstance" To view the discussion, visit: https://community.jboss.org/message/799131#799131 -- I'm looking at some code here in 5.4.0 (jbpm-flow/5.4.0.Final/jbpm-flow-5.4.0.Final-sources.jar): org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(MarshallerReaderContext) it goes like this on line 373: Process process = ruleBase.getProcess( processId ); if ( ruleBase != null ) { processInstance.setProcess( process ); } Isn't this code incorrect? If rule base were to be null it would have failed on the first line itself. May be the code should be: if ( *process* != null ) { processInstance.setProcess( process ); } Not sure. I guess I'm running into this issue when i try to load the process instance: ProcessInstance pid = ksession.getProcessInstance(16); java.lang.NullPointerException at org.jbpm.process.instance.impl.ProcessInstanceImpl.setProcess(ProcessInstanceImpl.java:62) at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:375) at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:142) at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:91) at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:206) at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1116) at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:297) at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:48) at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:25) at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstance(CommandBasedStatefulKnowledgeSession.java:125) at com.sample.ProcessTest.main(ProcessTest.java:64) -- Reply to this message by going to Community [https://community.jboss.org/message/799131#799131] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Re: How to reload knowledgeSession from database?
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: How to reload knowledgeSession from database?" To view the discussion, visit: https://community.jboss.org/message/799114#799114 -- i'm running into the same issue. Any luck? -- Reply to this message by going to Community [https://community.jboss.org/message/799114#799114] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Re: ClassCastException
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: ClassCastException" To view the discussion, visit: https://community.jboss.org/message/798952#798952 -- "name" is just a variable in my process. I checked the server logs and i did not see any error. Just FYI (if this helps) : Switching to AsyncHornetQHTWorkItemHandler fixed my issue. I dontt see any issue or errors. -- Reply to this message by going to Community [https://community.jboss.org/message/798952#798952] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Re: ClassCastException
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: ClassCastException" To view the discussion, visit: https://community.jboss.org/message/798879#798879 -- It is a simple program with very little modification to the evaluation process that comes with installation. I've configured my DB as Oracle. Attached is the log generated. My apologies for any stupid mistake in the program. I'm still trying to get comfortable with JBPM. My Process basically takes a name and the user tries to modify it trough UI. Please note that the process is generating tasks properly as I can see it in inbox of krisv. public class ProcessTest { public static final void main(String[] args) throws Exception { StatefulKnowledgeSession ksession = null; KnowledgeRuntimeLogger logger = null; HornetQHTWorkItemHandler humanTaskHandler = null; try { // load up the knowledge base KnowledgeBase kbase = readKnowledgeBase(); ksession = createKnowledgeSession(kbase); humanTaskHandler = new HornetQHTWorkItemHandler(ksession); humanTaskHandler.setIpAddress("127.0.0.1"); humanTaskHandler.setPort(5153); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler); logger = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "test", 1000); final StatefulKnowledgeSession k = ksession; final KnowledgeRuntimeLogger l = logger; // start a new process instance Map params = new HashMap(); //params.put("employee", "krisv"); //params.put("reason", "Yearly performance evaluation"); params.put("name", "some name".toLowerCase()); //ProcessInstance pi = ksession.startProcess("com.sample.evaluation", params); ProcessInstance pi = ksession.startProcess("mypackage.test1", params); System.out.println("Process started ... "+pi.getId()); System.out.println("Process state ... "+pi.getState()); } catch (Throwable t) { t.printStackTrace(); } finally { if(ksession != null) ksession.dispose(); if(humanTaskHandler != null) humanTaskHandler.dispose(); if(logger != null) logger.close(); } } private static KnowledgeBase readKnowledgeBase() throws Exception { KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); String URL = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/mypackage/LATEST";; UrlResource resource = (UrlResource) ResourceFactory.newUrlResource(URL); resource.setBasicAuthentication("enabled"); resource.setUsername("admin"); resource.setPassword("admin"); kbuilder.add(resource, ResourceType.PKG); setupDb(); TransactionManagerServices.getConfiguration().setDefaultTransactionTimeout(60*10); System.setProperty("java.naming.factory.initial", "bitronix.tm.jndi.BitronixInitialContextFactory"); //kbuilder.add(ResourceFactory.newClassPathResource("Evaluation.bpmn"), ResourceType.BPMN2); return kbuilder.newKnowledgeBase(); } private static void setupDb() { TransactionManagerServices.getConfiguration().setServerId("TransactionManager-1"); PoolingDataSource ds = new PoolingDataSource(); ds.setUniqueName("processInstanceDS"); ds.setClassName("oracle.jdbc.xa.client.OracleXADataSource"); ds.setMaxPoolSize(3); ds.setAllowLocalTransactions(true); ds.getDriverProperties().put("user", "jbpmprocess"); ds.getDriverProperties().put("password", "secret"); ds.getDriverProperties().put("URL", "jdbc:oracle:thin:@127.0.0.1:1521:xe"); ds.init(); } private static StatefulKnowledgeSession createKnowledgeSession(KnowledgeBase kbase) { Environment env = KnowledgeBaseFactory.newEnvironment(); env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" ) ); Properties properties = new Properties(); KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties); StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, config, env ); return ksession; } } -- Reply to
[jboss-user] [jBPM] - ClassCastException
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "ClassCastException" To view the discussion, visit: https://community.jboss.org/message/798665#798665 -- I've a simple java that uses HornetQ workitem handler for human tasks. I keep getting this error when I guess human task server responds back. What is the issue here and how to fix it? SEVERE: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5153 java.lang.ClassCastException: org.jbpm.task.service.responsehandlers.BlockingGetContentResponseHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$GetTaskResponseHandler at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:75) at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56) at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:122) at java.lang.Thread.run(Thread.java:662) -- Reply to this message by going to Community [https://community.jboss.org/message/798665#798665] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Problem while validating process
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Problem while validating process" To view the discussion, visit: https://community.jboss.org/message/797992#797992 -- When I validate my process in guvnor i can see the following error in start node: "*Could not find process image*" How to fix this problem? -- Reply to this message by going to Community [https://community.jboss.org/message/797992#797992] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Re: jBPM 5.4 released !
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: jBPM 5.4 released !" To view the discussion, visit: https://community.jboss.org/message/797588#797588 -- Hi kris, I suppose you are the main developer for jBPM. Will you be able to answer my question here: https://community.jboss.org/thread/221279 https://community.jboss.org/thread/221279 -- Reply to this message by going to Community [https://community.jboss.org/message/797588#797588] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - jBPM as service (EJB).
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "jBPM as service (EJB)." To view the discussion, visit: https://community.jboss.org/message/797585#797585 -- Q.1) How do i add my bpmn process and script task classes to GWT console. Do I need to go through guvnor tool. (If yes how to I add my script based classes) Q.2) Is there any way the jbpm engine works as an EJB service? At present the way I understood it (based upon examples): We create a process and it gets executed and the human task goes to another server. The program that creates the process waits for the JMS to respond back and the process completes. Effectively the engine runs in my VM. (Correct me if I'm wrong) I more wanted a BPM service which can be called for process creation on a remote machine (running as service). The same engine will store all the relevant data related to process such as: 0. Process instance creation 1. Human task monitoring (running along with the engine and NO on HornetQ JMS/Human task war) 2. Can be accessed remotely for identifying where a process is stuck at present. 3. Can we used for finding out the task for a given user (i.e. process engine and human task server run on same server/cluster). 4. assigning task to other users. 5. canceling a process instance (NOT Task) This makes the overall installation and administration easy as there are less resources involved (No JMS/wars etc, only once service). The overall engine is encapsulated in one package. We will be writing out own UI layer to interact with this engine. Is this available as an EJB service in Enterprise endition OR this has to accessed from GWT based REST service that I suppose provides same functionality. Oracle based BPM provides such facility and it is helpful to use. May be I did not understand the documentation properly, please help me in right direction. -- Reply to this message by going to Community [https://community.jboss.org/message/797585#797585] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Re: Basic question on Hornet Q Work Item Handler
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Re: Basic question on Hornet Q Work Item Handler" To view the discussion, visit: https://community.jboss.org/message/796741#796741 -- Thanks Thomas. -- Reply to this message by going to Community [https://community.jboss.org/message/796741#796741] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Basic question on Hornet Q Work Item Handler
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Basic question on Hornet Q Work Item Handler" To view the discussion, visit: https://community.jboss.org/message/796661#796661 -- My understanding is that : HornetQHTWorkItemHandler send a message on a queue/topic. Which process/MDB/war is on the other side of the Queue that picks up the message? Sachin -- Reply to this message by going to Community [https://community.jboss.org/message/796661#796661] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [jBPM] - Error while deploying designer war app.
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion "Error while deploying designer war app." To view the discussion, visit: https://community.jboss.org/message/793865#793865 -- When I deploy designer I get this error for jBPM 5.4. Can someone explain this issue please?? 14:17:15,035 WARN [org.jboss.as.ee] (MSC service thread 1-5) JBAS011006: Not installing optional component org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606) at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29] >From [jboss-msc-1.0.2.GA.jar:1.0.2.GA] Thanks Sachin -- Reply to this message by going to Community [https://community.jboss.org/message/793865#793865] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034] ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user