[JBoss jBPM] - beginner question for the jbpm evalutaion (performance aspec
by golubec
Hi,
I'm performing evaluation for the workflow products and the point is the performance.
I've downloaded and installed 4.0.0. Then i modified EndProcessInstanceTest so the process from process.jpdl.xml will execute about 10.000 times. Also logging was disabled by changing logging.properties.
Actually the process is simple : it has only start/end states, but i takes 33 secs(!!!!!) to execute 10.000 iterations of this:
for (int i = 0; i < ITERATION_NUMBER; i++) {
Execution execution = executionService.startProcessInstanceByKey("NoOperation");
if (!execution.isEnded()) {
fail();
}
}
Am i misunderstanding something ? Our case when request comes in and is processed by appropriate workflow.
Should i start new process for that every time reques is coming or using the only one process instance (if possible) to achieve better performance?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237065#4237065
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237065
16 years, 10 months
[JBoss jBPM] - Help- Database empties on restarting & making call to workfl
by gnaik
Hi,
I am using jbpm 3.2.6.sp1 and facing a very big problem, when i restart the jbpm workflow engine and make any calls to engine the database is cleared. Ithink i am going wrong somewhere while starting and fetching the process Instance. Plz Help.
The sequence of tasks that i follow :-
I have created an RMI interface to interact the engine.
1. I start the workflow engine:-
main(){
| jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml");
| deploy("processdefinition.xml");
| }
|
|
| public String deploy(String resourceName) throws RemoteException {
| System.out.println("-------Inside Deploy--------");
| ProcessDefinition processDefinition = null;
| String processId = "";
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| try {
| processDefinition = ProcessDefinition.parseXmlResource(resourceName);
| jbpmContext.deployProcessDefinition(processDefinition);
| } finally {
| jbpmContext.close();
| }
| processId = String.valueOf(processDefinition.getId());
| System.out.println("....Process Definition " + processDefinition.getName() + " Deployed....");
| System.out.println("-------Out of Deploy--------");
| return processId;
| }
2. Through RMI interface i give call to create a process Instance of deployed processdefinition.
public String StartExecution(String processDefinitionKey, String inExecutionKey, String actorId, Map<String, Object> localParameters, Map<String, Object> parameters) throws RemoteException {
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| String executionKey = "";
| try {
| GraphSession graphSession = jbpmContext.getGraphSession();
| ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition(processDefinitionKey);
| if (processDefinition != null) {
| ProcessInstance processInstance = processDefinition.createProcessInstance();
| if (processInstance != null) {
| if (inExecutionKey == null || inExecutionKey.equalsIgnoreCase("")) {
| executionKey = processDefinitionKey + ":" + processInstance.getId();
| } else {
| executionKey = inExecutionKey;
| }
| processInstance.setKey(executionKey);
| System.out.println("Execution Key : " + executionKey);
| ContextInstance contextInstance = processInstance.getContextInstance();
| if (parameters != null) {
| contextInstance.setVariables(parameters);
| }
| if (localParameters != null) {
| contextInstance.setTransientVariables(localParameters);
| }
| Token token = processInstance.getRootToken();
| System.out.println("Root Node : " + token.getNode().getName());
| if (actorId != null) {
| if (LdapHelper.isValidUser(actorId)) {
| contextInstance.setVariable(INITIATOR, actorId);
| token.signal();
| } else {
| System.out.println(actorId + " is not present in LDAP");
| throw new ResourceNotFoundException(actorId + " is not present in LDAP");
| }
| } else {
| token.signal();
| }
| jbpmContext.save(processInstance);
| } else {
| System.out.println("Process Instance not found");
| }
| } else {
| System.out.println("Process defn not found");
| }
| } finally {
| jbpmContext.close();
| }
| System.out.println("-------Out of Create ProcessInstance--------");
| jbpmConfiguration.startJobExecutor();
| return executionKey;
| }
3. Stop the workflow engine by stopping the RMI server.
4. Start the workflow engine again but with deploy.
main(){
| jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml");
| }
5. At this point the database has values present.
6. Now i try to fetch the current state of the processInstance started, But it fails saying process definition not found.
public String VWFGetCurrentNodeName(String processDefinitionKey, String executionKey) throws RemoteException {
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| String currentNodeName = "";
| try {
| GraphSession graphSession = jbpmContext.getGraphSession();
| //CLEARS THE DATABASE ON EXECUTING THIS LINE.
| ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition(processDefinitionKey);
| if (processDefinition != null) {
| ProcessInstance processInstance = jbpmContext.getProcessInstance(processDefinition, executionKey);
| if (processInstance != null) {
| Token token = processInstance.getRootToken();
| currentNodeName = token.getNode().getName();
| } else {
| System.out.println("Process Instance not found");
| }
| } else {
| System.out.println("Process defn not found");
| }
| } finally {
| jbpmContext.close();
| }
| System.out.println("Current Node : " + currentNodeName);
| return currentNodeName;
| }
Plz Guide me..
Regards,
Gautam.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237053#4237053
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237053
16 years, 10 months
[JBoss jBPM] - Re: Enable message size Greater than 4KB
by alex.guizar@jboss.com
It is a long story, feel free to skip to the next paragraph. A customer reported JBPM-701 because they had a problem similar to yours, only with Job exceptions. We were about to release a new minor version of jBPM (3.3) which was a good opportunity to change the type of VARCHAR(4000) columns to TEXT. In the end the 3.3 branch was canceled and we ported the changes to the 3.2 branch. Some releases were made with the new schema (3.2.4, 3.2.5, 3.2.5 SP1) until it became a barrier for customers to upgrade, despite assurances that JDBC drivers handled the change from VARCHAR to TEXT transparently. The jBPM 3.2.2 schema was restored under JBPM-2056 and delivered in 3.2.5.SP2.
There is no way to insert strings larger than 4000 characters unless you change the related column to TEXT or increase the length. Provide your own copy of the hibernate configuration and specify an alternate mapping document containing the column type change. That was the resolution to JBPM-2057.
At some point I introduced a typedef which could easily be switched from VARCHAR to TEXT. That got lost among the compatibility restoration storm. With that, you'd only need to override the mapping resource containing the typedef.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236995#4236995
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236995
16 years, 10 months