Jonathan Albornoz [https://community.jboss.org/people/betoflint] created the 
discussion

"ProcessInstanceId always is 1"

To view the discussion, visit: https://community.jboss.org/message/787407#787407

--------------------------------------------------------------
Hi, i have a jboss server 7.0.2 with jbpm 5.3 and oracle 11g, the persistence 
work fine after two month of configuration and distinct test.
Now, i have a problem when i run my app on my web application, if i run my 
.bpmn (evaluation) on my console work all fine, the tables has data and id's 
works fine, the distinct process instance have an particular id. Here, all 
perfect, but i want now run the same .bpmn with de  api of jbpm from my 
project, but appear an error telling me the next:  
My question is how i can reserv an id for my instance in api. I must change 
something from my code???
Thanks and i hope that somebody can help me!!
Sorry for the english!!

*CODE:*
Map<String, Object> params = new HashMap<String, Object>();
                    params.put("userId", "krisv");
        params.put("description", "Yearly performance evaluation");
                    KnowledgeBuilder kbuilder = 
KnowledgeBuilderFactory.newKnowledgeBuilder();
                    
kbuilder.add(ResourceFactory.newClassPathResource("Evaluation.bpmn"), 
ResourceType.BPMN2);
                    KnowledgeBase kbase = kbuilder.newKnowledgeBase();
                    StatefulKnowledgeSession ksession = 
kbase.newStatefulKnowledgeSession();
                    logger = 
KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "test", 1000);
        hornetQHTWorkItemHandler = new HornetQHTWorkItemHandler(ksession);
        ksession.getWorkItemManager().registerWorkItemHandler("Human Task", 
hornetQHTWorkItemHandler);
        taskClient = new SyncTaskServiceWrapper(new 
AsyncHornetQTaskClient("HumanTaskExample-testClient"));
        taskClient.connect("127.0.0.1", 5445);
        SystemEventListenerFactory.setSystemEventListener(new 
SystemEventListener());
        org.drools.runtime.process.ProcessInstance piId = 
ksession.createProcessInstance("com.sample.evaluation", params);
                    ksession.startProcessInstance(piId.getId());



*ERROR LOG:*
1    03/01 16:44:39,184[main] ERROR 
workitem.wsht.GenericHTWorkItemHandler.executeWorkItem  - Thu Jan 03 16:44:39 
CLST 2013: Error when creating task on task server for work item id 1. Error 
reported by task server: Task operation request timed out
java.lang.RuntimeException: Task operation request timed out
          at 
org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118)
          at 
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:145)
          at 
org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
          at 
org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
          at 
org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:124)
          at 
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:205)
          at 
org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:164)
          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:124)
          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:303)
          at 
org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:168)
          at 
org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1092)
          at 
org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330)
          at com.sample.testa.main(testa.java:48)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787407#787407]

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

Reply via email to