Monday, September 2, 2013

jBPM6 Showcase: web-based jBPM console

This blog is part of a series showcasing jBPM6.  The goal of this blog is to introduce the jBPM console.

The jBPM console, our web-based management console (where you can start new process instances, complete your task list, etc.) has been redesigned completely.  There is now one web application supporting you through the entire life cycle of your business processes (and possibly other artefacts like your data models, forms, business rules, etc.).
 
 
The life cycle starts by authoring your business processes and deploying them.  You can also manage your process running process instances (or start new ones) and manage your task list.  Finally, dashboards can give you an overview of the entire system, where you can drill down into the details whenever necessary.
 
The following screencast gives you a quick overview of how to get started and run your first process.  Click on the image below to watch the screencast.
 
 
 
If you have used the jBPM installer to set up and start your environment on your local file system (see jBPM6 Showcase: getting started with the jBPM installer), you can try the same yourself! Simply navigate to http://localhost:8080/jbpm-console and log in using krisv/krisv.  This screencast uses one of the sample projects that are provided out-of-the-box as part of the jBPM playground repository (a repository that contains various sample projects that is automatically installed locally by the jBPM installer for you to play with). 
 
It uses a simple Evaluation process where a user can start a performance evaluation, where he first needs to perform a self-evaluation (which will show up as a task on his task list), after which his project manager and his human resource manager need to perform a similar evaluation.
 
The tooling is based on UberFire, which provides a configurable and pluggable web-based workspace.

What to do if I encounter problems or have questions?
 
You can always contact the jBPM community for assistance:

26 comments:

  1. Good Morning,
    I would like to suggest to create a guide telling how to install the jBPM console in a JBoss instance, since reading documentation what I could find is just the use of the installer.
    For instance let's say I need to install the jBPM console in production environment. Is there any documentation that could support me?
    thanks

    ReplyDelete
    Replies
    1. These steps aren't really a lot different, the installer just automates a few of those. If you look at the script (https://github.com/droolsjbpm/jbpm/blob/master/jbpm-installer/build.xml#L278) the steps are:

      (1) configuring persistence (by configuring the datasource in the standalone(-full).xml), if necessary also add the driver libs to the classpath and update the persistence.xml (dialect)

      (2) configuring authentication (installer uses users and roles properties files but other configurations supported by JBoss AS are possible too)

      (3) if necessary, add configuration files (work item handlers for example) and/or required libraries to classpath (WEB-INF/lib)

      (4) deploying the jbpm console war and dashboard-builder war and starting up the application server

      Hope this helps!

      Kris

      Delete
  2. hello kris, i have been trying to configure mysql in jbpm6, but failed to locate persistence.xml. Could you help me through this?

    ReplyDelete
    Replies
    1. It depends on how you are trying to use jBPM, persistence.xml is usually in the META-INF folder on your classpath. For example, if you are using the jbpm-console, it is the WEB-INF/classes/META-INF folder inside the jbpm-console war. If you embed jbpm inside your own application, you typically include your own version of the persistence.xml in the META-INF folder on the classpath of your applicaiton.

      Note that if you are using jbpm-installer, you can update the file jbpm-installer/db/jbpm-persistence-JPA2.xml and rerun the installer, this will copy your updated file to the right location (as specified above).

      Delete
  3. Hi Kris,

    I need to incorporate jBPM into an existing servlet (originally running under Tomcat). I've been able to start with the 5.4 Full Install and get to the point where (under Eclipse Kepler) I can execute the 1st line of the 5.4 evaluation (copied to my servlet) running under JBoss 7.1. However, when I try to run the 2nd line of evaluation (in my servlet) I am getting class not found errors. I thought I could copy the .\runtime & .\runtime\lib JARs to the servlet's WEB-INF\lib but apparently that is failing to allow the code to execute.

    I have tried to shift gears and see if I have better luck figuring out how to get jBPM 6.0.0CR2 running. I installed the Full Install with no errors and Juno comes up fine. But I have two questions:
    1) Under 5.4 (and JBoss 7.1) we had six jBPM WAR files being deployed. Now I am seeing only one (jbpm-console) as deployed (in the JBoss Admin console). Have the other five files been eliminated - is this single WAR correct?
    2) I have Imported the evaluation sample into Juno but I can't run it as I could in 5.4; there is no Run/Debug As Application available.

    Can you please either tell me what I need to place in the WEB-INF/lib to get the evaluation sample code to run in a servlet using 5.4 and/or help me to get the jBPM 6 approach working per my questions?

    Thank you for your help.
    Al

    ReplyDelete
  4. Hi,

    I was wondering if anyone knows how to update/change a process variable in a jbpm workflow from external java code after the workflow has been started? Currently I have tried:

    final WorkflowProcessInstance p = (WorkflowProcessInstance) processInstance;

    final TransactionTemplate txTemplate = new TransactionTemplate(transactionManager);

    txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
    txTemplate.execute(new TransactionCallback() {
    public AcceptanceReport doInTransaction(TransactionStatus status) {
    p.setVariable("gAccept", gAccept);

    return gAccept;
    }
    });

    I am using spring 3.0 and JPA. @Transactional does not seem to work.

    Please Help.

    ReplyDelete
    Replies
    1. You need to make sure you are loading the process instance in the same transaction as where you are changing the variable (because a process instance disconnects when the transaction is completed, so trying to change it afterwards won't work anymore, unless it's reconnected to a ksession first).

      The easiest way is probably to just use ksession.execute(new SetProcessInstanceVariablesCommand(processInstanceId, variables)), that way you don't need to handle transactions yourself.

      Delete
  5. Thank you for the blog, Kris. I am brand new to jbpm and am trying to figure it out. Your screencast -- billed as a 10 minute tutorial in teh user guide -- is way too fast to follow. Very disappointing and frustrating.

    ReplyDelete
    Replies
    1. I'm sorry you didn't like it, I created it with a dual purpose: a quick screencast to show how it looks (for those that just want a quick peek) and the idea that you would run the installer yourself locally and simply try to do the same as shown in the screencast on your own machine (as a sample guide to get started). This probably means you constantly have to pause the screencast to do the same you just saw.

      Delete
  6. Hello,

    I'm trying to install jBPM6 as a workflow engine.
    Unfortunately, all the documents and videos are represented with jBPM 3.x, 4.x and 5.x.
    I'm searching a tutorial for jBPM6's installation.
    Please Help !!!.

    Thanks in advance.

    ReplyDelete
  7. Greeting Kris,
    I have installed jBPM6.0.1 today.
    I want to run simple BPMN user task project but i got exception following. I humbly request you please give me solutions.

    2014-01-29 19:18:14,608 [main] ERROR Wed Jan 29 19:18:14 IST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]
    at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]


    thanks

    ReplyDelete
  8. Hi,

    I created a fork of the source code and can succesfully launch the showcase application in development mode, what is the best approach to configure authentication and db? Can this be done in Jetty or is it always better to do it using an external jBoss server? Any documentation on this?

    Thank You

    ReplyDelete
  9. I just installed jbpm 6.0.1 and have the same issue as Rahul above . . . any updates?

    2014-01-29 19:18:14,608 [main] ERROR Wed Jan 29 19:18:14 IST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]
    at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

    ReplyDelete
  10. Kris,

    You guys are doing a great job on jbpm. I can see a great promising product that is coming up soon and i'm very excited about the things you are creating on this project.

    But i'd like to suggest you something. jBPM6 project is still evolving to a stable version. I tried myself jbpm 5.x and it works fine although there are fewer tools than the promising ones on version 6. I tried to run jbpm 6, i still can see lots of problems on the installer (some of the database dashboards scripts seems to be not included in the package, generating errors on runtime), i have some problems with the business process modeler (sometimes it doesn't show up) and so on.

    I can always try to fix them by myself, but it's hard to find anything helpful all over the web. I always get back to your articles and the ones Salaboy has written. In my opinion, if you provide a installer i should use them with no problems. And sometimes it's a little bit confusing. Salaboy write about jbpm-console-ng and you write about KIE Workbench, for instance. It should be the same, but i'm not sure about it.

    It must be hard to be a project leader in such an evolving project and on the other hand write documentation and articles about the project's evolution and how doing things in there.

    In my opinion you guys should focus on developing jbpm to a stable version taking the necessary time to do it and at the same time write documentation about it before releasing a new version. If you try to provide support on the current version you'll be wasting a precious time to get things done on the evolving project.

    Hope it doesn't sounds rough, it's not my intention. I wished i could have free time to help you in this process, but i don't have it now. Let me know if i can help you someway.

    Thanks

    ReplyDelete
  11. Hi Kris,
    I have one doubt let assume below scenario
    a jbpm flow like Start-->Task1-->Task2-->Task3--->End

    Task1,2,3 all tasks are asynchronous process, and it can be synchronous by other Tasks,

    1) now we have a batch process like 1000 records all records will start Parallelly Executing all Tasks ( Tasks are Async and It may be dependent one to another)
    2) now 500 tasks are completed Task1,2,3 200 is still pending with Task2, 200 is Still pending with Task3 , and 300 are still pending with Task1,

    Question: suppose user is needed Task status where it stopped, and where failed
    and how much time is needed to complete all tasks is is possible to work to using jbpm standalone project or non standalone (with db) .
    a) if non standalone how to handle?
    b) if standalone how to handle?

    This is very silly question, iam very new to development,
    please answer me thanks advance

    DNC SEKHAR.

    ReplyDelete
  12. I am facing exceptions while running sample evolution or any example programs
    2014-02-07 11:05:16,949 [main] ERROR Fri Feb 07 11:05:16 IST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]
    at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.afterTaskAddedEvent(JPATaskLifeCycleEventListener.java:109) ~[jbpm-human-task-audit-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskAdded(TaskEventSupport.java:207) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.impl.TaskInstanceServiceImpl.addTask(TaskInstanceServiceImpl.java:104) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:105) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.impl.command.CommandBasedTaskService.addTask(CommandBasedTaskService.java:471) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:456) ~[jbpm-runtime-manager-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:60) ~[jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]
    at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at o

    ReplyDelete
  13. Getting same error as everybody else:

    2014-02-07 13:26:06,377 [main] ERROR Fri Feb 07 13:26:06 CST 2014: Error when creating task on task server for work item id 1. Error reported by task server: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    java.lang.IllegalArgumentException: Unknown entity: org.jbpm.services.task.audit.TaskEventImpl
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:878) ~[hibernate-entitymanager-4.2.0.SP1.jar:4.2.0.SP1]
    at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persist(JPATaskPersistenceContext.java:450) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.audit.JPATaskLifeCycleEventListener.afterTaskAddedEvent(JPATaskLifeCycleEventListener.java:109) ~[jbpm-human-task-audit-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskAdded(TaskEventSupport.java:207) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.impl.TaskInstanceServiceImpl.addTask(TaskInstanceServiceImpl.java:104) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:105) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.impl.command.CommandBasedTaskService.addTask(CommandBasedTaskService.java:471) ~[jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:456) ~[jbpm-runtime-manager-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:60) ~[jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]
    at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]
    at etc etc....

    ReplyDelete
  14. Hi Kris,

    I am having an issue with Jbpm 6 mentioned in below post, can someone please take a look and advise? it is urgent i need to submit my poc for jbpm6 by tomorrow....

    https://community.jboss.org/thread/236999

    ReplyDelete
  15. Very nice, but how to add document to process like word, pdf etc?

    ReplyDelete
  16. Hello Kris Verlaenen,

    Very nice. I like very much all post. Please, I have problem about JBPM 6, because I installed the JBPM 6 but Kie-wb does not display processes diagram.
    I don't know. Please help me!

    Thank you very much

    ReplyDelete
    Replies
    1. Could you be a little more specific? Which browser are you using (there was an issue with Chrome v34, updating to v35 should make it work again), anything in the server log?

      Delete
  17. Hi Kris,

    Thank you very much for your answer :) I change JBPM 6.1 for JBPM 6.0 now I don't have problem, but I have other problem.
    Created the repository, a new design, a new business process, copy the process, define the variables, created the form but when the deploy my form does not appear. Please, help me!

    Thank you very much

    ReplyDelete
    Replies
    1. Sheila, please use the jBPM User Forum for questions like this, and add a more detailed description of the steps you have taken (for example by including the BPMN2 XML of the process you created) and exactly what happens when the error occurs (for example check the server log for exceptions):
      https://community.jboss.org/en/jbpm?view=discussions

      Delete
    2. Hi Kris,

      Thank you very much. I will try ;)

      Delete
  18. hi Kris ,
    how to deploy Business process using eclipse and jbpm 6.3 plugin ?
    i a beginner at developing with jbpm api and eclipse
    i tried to deploy a process definition (file.bpmn) using the eclipse api , but i have not a result.
    can u help me with an exemple !

    thx.

    ReplyDelete
  19. I just want to thank you for sharing your information and your site or blog this is simple but nice Information I’ve ever seen i like it i learn something today. Human Resource Workflow

    ReplyDelete