[jBPM Users] - Re: Using JBPM for document workflow in a Java/Flex CMS soft
by mesa
i too want to do the same thing. my requirement is that
1) a user logs in and uploads few documents , i create a process instance and saves the documents in jcr repository.
2) over the lifecycle of process old documents will be refered and new will be added with different set of properties.
3) Main concern is able to track all documents associated with a process,throughout the life cycle of process....
my design philosphy is :
1) i can have a jackrabbit remote or local repository , for each customer i will create a folder(jcr node) ,unique to his name or having a unique key.
2) over the lifecycle of process all docs will be added beneath this unique key folder,for a process.
3) i can store this node as process variable within jbpm so that if any document is required for a process, i have a direct reference to it in jbpm.
Please suggest if any there is scope for improvement or suggestions...
Technical challenge is ::
1) what is good way to integrate JCR into jbpm
a) i though of writing my own service interface that will interact with JCR remote repository and inject them into application through spring and perform document
management completely outside JBPM scope.
b) OR i should use JBPM Context service support to integrate Jackrabbit repository.
problem is that i have not seen any example over the net , on how it can be done.
no information is available on integrating remoteJCR repository into jbpm
my question is that can i write my own service classes , offering a way into JCR repositoryand can inject them into jbpm context as JCR service.
Can someone please suggest me how this can be done ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259127#4259127
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259127
16 years, 6 months
[jBPM Users] - Re: How to start JobExecutor with jBPM 4 + Spring
by newcomer1
"unsavory" wrote : Does anyone have any idea how to start the JobExecutor? I have configured the JobExecutor in the jbpm.cfg.xml file and it is working. However, it only seems to run when an asynchronous activity is started (ie: a task with a timeout in it is created).
|
| According to the documentation I just need to add this line to my jbpm.cfg.xml:
|
| <job-executor threads="4" idle="15000" idle-max="60000" lock-millis="3600000" />
|
| I'm concerned because the JobExecutor does not seem to run when the server is started such as in a server restart. Therefore if I had old jobs from before the server was shut down, they would not run.
|
| I'm running jBPM 4 in a Spring container if that matters.
We are also running jBPM 4 in spring + JTA and we are not having the same problem as you describe. We start our spring context from a simple war project that uses a parent spring context loader at the ear level (we are also using ejbs). When the application is started the jobexecutor is started automaticly as we have setup spring to execute the buildProcessEngine factory method on SpringJbpmConfiguration at spring startup (lazy-init=false).
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259097#4259097
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259097
16 years, 6 months
[jBPM Users] - Re: How can we contribute to development?
by vchira
For the timer Problem a quick fix would be to change the Method setDueDateDescription in class TimerImpl like this:
| public void setDueDateDescription(String dueDateDescription) {
|
| ScriptManager scriptManager = EnvironmentDefaults.getScriptManager();
| Object dueDateEvaluated = scriptManager.evaluateExpression(dueDateDescription, null);
| if(dueDateEvaluated instanceof Date)
| {
| dueDate =dueDateEvaluated;
| return;
| }
| dueDateDescription = (String) dueDateEvaluated;
|
| Duration duration = new Duration(dueDateDescription);
| Date now = Clock.getCurrentTime();
|
| ...........................................
| }
|
a better solution would be to add a dueDateTimeDefinition in TimerDefinitionImpl and in JobParser.parseTimerDefinition() just set the definition there. after that in ScopeInstanceImpl.createTimer() evaluate dueDateTimeDefinition and if the evaluation returns a Date just set it in dueDate otherwise pare dueDateTimeDefinition as a date String..like you do now in JobParser.parseTimerDefinition().
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259093#4259093
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259093
16 years, 6 months
[jBPM Users] - Re: How to start JobExecutor with jBPM 4 + Spring
by vchira
I have done something like this:
| import org.jbpm.api.ProcessEngine;
| import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
| import org.springframework.beans.factory.annotation.Required;
| import org.springframework.context.ApplicationEvent;
| import org.springframework.context.ApplicationListener;
| import org.springframework.context.event.ContextClosedEvent;
| import org.springframework.context.event.ContextRefreshedEvent;
|
|
| public class JbpmJobExecutorLoader implements ApplicationListener {
|
| private ProcessEngine processEngine;
|
| @Required
| public void setProcessEngine(ProcessEngine processEngine) {
| this.processEngine = processEngine;
| }
|
| public void onApplicationEvent(ApplicationEvent applicationEvent) {
| if (applicationEvent instanceof ContextRefreshedEvent) {
| JobExecutor jobExecutor = processEngine.get(JobExecutor.class);
| if (!jobExecutor.isActive()) {
| jobExecutor.start();
| }
| } else if (applicationEvent instanceof ContextClosedEvent) {
| JobExecutor jobExecutor = processEngine.get(JobExecutor.class);
| jobExecutor.stop();
| }
| }
|
processEngine will be wired by Spring.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259082#4259082
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259082
16 years, 6 months