[jBPM] New message: "Re: Multiple Subprocess - jBPM 3.3.1"
by Luca Zammarchi
User development,
A new message was posted in the thread "Multiple Subprocess - jBPM 3.3.1":
http://community.jboss.org/message/524121#524121
Author : Luca Zammarchi
Email : luca.zammarchi(a)antex.it
Profile : http://community.jboss.org/people/lucazammarchi
Message:
--------------------------------------------------------------
Hi,
I implemented a solution that has the same result:
- I created some "process instances" from one process definition
- then I created an ExecuteNodeJob for each process instance and I sent it to the MessageService.
- In ArrayList I was putting all process instance ids
- With a timer I was checking all process and wait for all processes.
Below the function I use to create the process:
public long createSubProcess(ExecutionContext executionContext,
String processName,HashMap variabili,boolean signalToken ){
//Create process instance
ProcessInstance subProcessInstance = executionContext.getJbpmContext().newProcessInstance(processName);
//Setting any variable
Iterator iterator = variabili.keySet().iterator();
while(iterator.hasNext()){
String key=(String)iterator.next();
contextInstance.setVariable(key, variabili.get(key));
}
Token token=subProcessInstance.getRootToken();
token.setNodeEnter(Clock.getCurrentTime());
//Signal the token of the process if needed
if(signalToken)
token.signal();
//Create the job
ExecuteNodeJob job = new ExecuteNodeJob(token);
job.setNode(token.getNode());
Calendar dataCorrente = Calendar.getInstance();
dataCorrente.add(Calendar.MINUTE, 1);
job.setDueDate(dataCorrente.getTime());
job.setExclusive(true);
//Send the job to the message service
MessageService messageService = (MessageService)Services.getCurrentService("message");
messageService.send(job);
token.lock(job.toString());
//Return the process instance id to the main program
return subProcessInstance.getId();
}
I am testing this solution.
Has anyone a better idea?
I think this is a ploy help me to have multiple processes that running asynchronously.
Best regards.
Luca Zammarchi
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524121#524121
16 years, 2 months
[JBoss Tools] Document updated/added: "JBossToolsTroubleShootingFAQ"
by Max Andersen
User development,
The document "JBossToolsTroubleShootingFAQ", was updated Feb 4, 2010
by Max Andersen.
To view the document, visit:
http://community.jboss.org/docs/DOC-10801#cf
Document:
--------------------------------------------------------------
h2. JBoss Tools Trouble Shooting FAQ
h3. Read this before adding an entry
This FAQ is intended to provide information on JBoss Tools (and Eclipse in general) trouble shooting.
-
----
*Q : The plugins does not seem to be loaded or active after installation*
*A* : This can unfortunately happen if either some steps in the installation failed, Eclipse is somehow misconfigured or there are some conflicting plugins installed.
To find out why plugins are not being loaded try and start eclipse with the -debug flag on the command line. Now Eclipse will log what plugins/bundles are not being loaded. You can open the "Error Log View" or look directly in .metadata/log for the information.
-
----
*Q : Eclipse is running out of memory OR Eclipse is running very slow!*
*A* : Eclipse default setup is to use 64mb of memory and that works ok for small number of projects; but if you have more projects and/or using many plugins Eclipse would like to use more memory and hence its behavior will be slower operations (because of too much garbage collection or simply halting because it runs out of memory).
The solution is to start eclipse with a set of flags to allow it to allocate more memory:
eclipse -vmargs -Xmx1024m -XX:MaxPermSize=128m
The above will allow it to use up to 1Gb of memory (you can of course lower it if you want, but this is what I use and finally it will also increase the MaxPermSize so classloading is given more room.
-
----
*Q: My deployment need to be present when starting up the server, but it looks like my .sar archives are only deployed after the server is running. How do I make sure the server sees it while starting up ?*
This is probably because the server adapter is deploying into a metadata location in the workspace and that metadata location is only added as a deployable location via JMX after bootup.
You can still make your server deploy to a specific location inside the automatically-added location (aka the deploy folder) by opening the Server Editor (double-click the server) and changing the preferences there.
Note: 90% of deployments don't need this but some others do, like some .sar deployments.
-
----
*Q: Why are Eclipse buttons in dialogs and other places are not working for me on Linux* ?
The problem is a bug in Eclipse 3.5.1. Setting GDK_NATIVE_WINDOWS=true worksaround the issue.
See more at http://wiki.eclipse.org/IRC_FAQ#Eclipse_buttons_in_dialogs_and_other_plac... about this issue.
Eclipse 3.5.2 fixes this issue.
--------------------------------------------------------------
16 years, 2 months