[JBoss jBPM] - Multiple, Simultaneous Dynamic Tasks?
by ClayM
Ok, help me out here, how can I tackle this problem?
I'm trying to put a workflow to handle user access requests.
A single request can require multiple approval types, which should happen at the same time.
In addition, each of those types can require an arbitrary number of internal approvals.
Let's see if we can give a reasonable example...
Say you want to create a workflow to request permission to make sandwiches.
You need to permission to make bread, cheese, meat, condiments.
For bread, you need permission to use rye, french, and wheat bread
For cheese, you need permission to use swiss, american and provolone
For meat, you need permission to use turkey, roast beef, and ham
And for condiments, you need permission to use mustard and mayo..
Different people have to approve each ingredient. The combination of ingredients are always different.
How can this be represented in a workflow?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206033#4206033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206033
16 years, 1 month
[JBoss jBPM] - Task variables
by wytten
Hi,
I'm new to jBPM, and for better or worse I'm diving in at the jBPM 4.0.0 alpha1 end of the pool.
To begin with I've defined a trivial jpdl with start and end nodes, and one task in between. Then I wrote a bit of code to create process instances and complete the related tasks. I'm either doing something wrong or something isn't implemented yet, because the documentId is always null at the time when I mark the task complete.
I'm using alpha1 jars downloaded from http://repository.jboss.com/maven2, together with jbpm.cfg.xml and hibernate.properties copied from the examples/src folder of the jbpm-4.0.0-Alpha1 distribution zip.
I'm pleased with how smoothly this is all working, with the exception of the null documentId. I'd like to stick with jBPM v4 if possible, but would I be better off cutting my teeth on v3?
Thanks.
| public void run() {
| ProcessEngine processEngine = new Configuration().buildProcessEngine();
|
| // define the wf
| ProcessService processService = processEngine.getProcessService();
| processService.createDeployment().addResource("review.jpdl.xml")
| .deploy();
|
| // create 3 wf process instances
| ExecutionService executionService = processEngine.getExecutionService();
| for (int i=1; i<=3; i++) {
| Map<String,Object> variables = new HashMap<String,Object>();
| variables.put(DOCUMENT_ID, "doc"+i);
| Execution execution = executionService.startExecutionByKey("review", variables);
| LOG.debug("documentId: " + executionService.getVariable(execution.getId(), DOCUMENT_ID));
| }
|
| // retrieve tasks, and mark them complete
| TaskService taskService = processEngine.getTaskService();
|
| List<Task> tasks = taskService.getPersonalTaskList("operator", 0, 10);
| for (Task task : tasks) {
| LOG.debug("task name: " + task.getName());
|
| // TODO: Why aren't Variables in Task interface?
| Map<String,Object> variables = ((TaskImpl) task).getVariables();
| String documentId = (String) variables.get(DOCUMENT_ID);
|
| LOG.debug("I'm supposed to review documentId: " + documentId);
| // TODO: Why is documentId always null here?
|
| // mark task complete
| taskService.submitTask(task.getId());
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205991#4205991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205991
16 years, 1 month
[JBoss jBPM] - Deployment of jbm-console (jbpm -3.2.3) on Weblogic 10 and O
by vksystech
The jbpm-console.war was deployed successfully in Weblogic with no errors. I was able to get to the jbpm-console login screen, but then the authentication fails even though all the data has been populated correctly.
The following was done to achieve the above:
i) In the Weblogic console, created a new provider for SQLReadOnly Authentication Provider using the default tables for Group, Users, GroupMembers etc. The idea was not to change the SQL, and created the corresponding tables in Oracle to which the datasource configured in weblogic (JbpmDS1). Had also tried with using the JBPM provide user, group, member tables with SQLReadOnly which did not work.
ii) Modified the following files from the jbpm-console which comes with jbpm 3.2.3 and repackaged it in the new war file.
a) hibernate.cfg.xml to point to the datasource in Oracle which weblogic uses.
b) Web.xml to specify the security realm configured in weblogic and the datasource for Oracle.
c) Added weblogic.xml to the war file to specify the datasource JNDI name and security role.
Any help to get weblogic working with the jbpm-console would be great as the first part of deploying the console app and bringing the login screen works successfuly.
The other option would be to bypass the security altogether, not sure if this can be done via descriptors alone or the jbpm-console code uses the security check in each JSF screen.
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205971#4205971
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205971
16 years, 1 month
[JBoss jBPM] - Error in Hibernate mapping
by OLibutzki
Hi,
everyone I'm trying to set up my Seam + jBPM environment (using Eclipse JBoss Tools). I use Seam 2.1.1 GA, JBoss AS 5.0.0 and jBPM 3.2.4.
I've added a hibernate.cfg.xml provided by jBPM to my seam-project, but obviously something goes wrong as I alsways get this exception:
| Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.bpm.jbpm
| at org.jboss.seam.Component.newInstance(Component.java:2106)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
| at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112)
| at org.jboss.seam.init.Initialization.init(Initialization.java:735)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.lang.RuntimeException: could not deploy a process definition
| at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:300)
| at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:80)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
| at org.jboss.seam.Component.callCreateMethod(Component.java:2134)
| at org.jboss.seam.Component.newInstance(Component.java:2094)
| ... 64 more
| Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of org.jbpm.job.Job.id
| at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:58)
| at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:67)
| at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)
| at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:147)
| at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:457)
| at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:131)
| at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:261)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
| at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
| at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
| at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
| at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:341)
| at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
| at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
| at org.jboss.seam.bpm.Jbpm.deployProcess(Jbpm.java:316)
| at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:294)
| ... 74 more
| Caused by: java.lang.IllegalArgumentException: Can not set long field org.jbpm.job.Job.id to org.jbpm.job.CleanUpProcessJob
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
| at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(Unknown Source)
| at sun.reflect.UnsafeLongFieldAccessorImpl.getLong(Unknown Source)
| at sun.reflect.UnsafeLongFieldAccessorImpl.get(Unknown Source)
| at java.lang.reflect.Field.get(Unknown Source)
| at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)
| ... 90 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205812#4205812
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205812
16 years, 1 month