jbossdemocentral / rhpam7-order-management-demo-repo

16 stars 28 forks source link

Process Automation Manager - Order Management Demo Repository

On July 19th, IBM released IBM Business Automation Manager Open Editions 8.0, which is the continuation of Red Hat Process Automation Manager.

In fact, IBM will continue to the Open Source commitment working on the upstream projects jBPM and Drools, which are the foundation of their enterprise grade product IBM Business Automation Manager Open Editions.

Red Hat Process Automation Manager version 7.13 is the last version released by Red Hat and is based on same open source libraries built of IBM Business Automation Manager Open Editions version 8.0: this makes the two products equivalent. In such way, Red Hat customers are able to smoothly move to the IBM release, because no changes will be required to their projects.

Further information:

This demo aims to show some of the core capabilities of those powerful products.

Order Management Process

Any organization has a procurement process similar to this one:

In the following picture the BPMN process design:

BPMN diagram

Auto Approve Decision

Even if this demo is focused on the process logic, the decision logic is a good example of DMN design.

Order Approval takes Order Information as input and decides whether or not to approve it.

Open the DMN and analyse the logic starting from Decision Requirement Diagram:

For further information about DMN:

Place Order in ERP sub-process

This sub-process aims to simulate an asynchronous integration with an external system and to demonstrate the compensation capabilities of the process engine:

BPMN diagram

How to deploy this demo project

Import the This repository can be imported in your Business Central following these steps:

  1. From Home page click Design
  2. In header section where is the space name (e.g. myteam) select the kebab icon (the 3 vertical dots icon)
  3. Select Import Project
  4. Fill the Repository URL field with this github repository URL (https://github.com/jbossdemocentral/rhpam7-order-management-demo-repo.git)
  5. Select Order Management and click Ok

WARNING This demo persists the OrderInfo data object through JPA. Since the same data object is used in web forms, in order to properly render those forms it's necessary to explicitly enable those classes with the following system property:

<property name="org.kie.server.xstream.enabled.packages" value="org.drools.persistence.jpa.marshaller.*"/>

In order to configure the persistence make sure that the following property is set to an accessible datasource in the application server configuration. (OpenShift Operator sets it up autonomously)

<property name="org.kie.server.persistence.ds" value="java:jboss/datasources/ExampleDS"/>

In order to deploy it in OpenShift, here the Operator configuration (KieApp yaml file):

spec:
  commonConfig:
    adminPassword: changeme
  environment: rhpam-trial
  objects:
    console:
      jvm:
        javaOptsAppend: >-
          -Dorg.kie.server.xstream.enabled.packages=org.drools.persistence.jpa.marshaller.*
          -Ddashbuilder.kieserver.serverTemplate.default-kieserver.replace_query=true
      replicas: 1
    servers:
      - database:
          type: h2
        id: default-kieserver
        jvm:
          javaOptsAppend: >-
            -Dorg.kie.server.xstream.enabled.packages=org.drools.persistence.jpa.marshaller.*
        replicas: 1

Run the demo process

  1. An employee create an order for a required item. To start the process, s/he has to select the item name and the urgency.

    • Click Diagram to show the BPMN diagram of the process instance just started (BPMN is the well known notation to describe business processes where Business Analysts and Developers can share a common view). In this picture, the business stakeholder can recognize the process where s/he is involved in and get visibility on it.
    • From the Menu bar, select the Process instances: users can understand and search process instances and easily investigate the status.
  2. Open Track > Task Inbox, there is the task Request Offer that wait for the purchase expert action.

    • On the top right of the task list, there is an icon to show more information about the tasks, click Description
    • From the kebab menu select Claim and Work. In the task view, click Start
    • Select a category for the order, a target price, the suppliers list who will be asked to provide an offer.
    • Click Complete
  3. Now, it's the turn of the suppliers to carry on the Prepare Offer task. In the list, there is a task for each supplier selected at previous step. The task description point out for which supplier is the task: e.g. supplier1 prepares offer for Laptop Dell XPS 15

    • For each task, select Claim and Work and in the task view, click Start.
    • The supplier has to define a delivery date and the best offer
    • Notice: by design, if the offer match the target price or is lower, other suppliers will not be able to provide their offer (the other tasks are exited)
  4. If there are no other tasks for that process instance, the process is completed. In fact, the next task is the Auto Approve Decision: it calls a DMN logic that based on the order features decides whether a manager approval is required to confirm the order.

    • if the process instance is completed: open the process instances list
    • in the filter pane, select Completed to show the completed instances
    • select the completed instance and check the process history opening the diagram.
  5. If a manager is involved, s/he has to take charge of the Approve task, where s/he can approve or reject the order providing a motive.

  6. If the manager rejects the order, the purchase expert receives the Order Reject task to acknowledge the order rejection reason.

  7. The process happy path completes approving the order and send the order information to the ERP system to finalize the order.

Before the demo

Dashboard Example

It's available a sample dashboard that shows some charts related to the order management business context.

Follow this steps to import the dashboard:

  1. In Business Central, select the Admin page (the gear icon on the top right position)
  2. Scroll down to select the Dashbuilder Data Transfer tile
  3. In the Import pane select the file dashboard/order-management-dashbuilder.zip in the current project
  4. Click the Import button

In the Track section of the top Menu, there are two new pages available:

  1. Order Reports shows a set of charts displaying some Key Performance Indicators of the process like in the following screen shot:

    Order Reports

  2. Heatmap shows the process diagram, where the tasks are blanket with a cloud which color intensity highlights how often the task is triggered. This is a precious visualization technique for the Business Analyst who can easily spot which area of the process is more stressed.

    Heatmap

It is worth mentioning that RHPAM offers many extensions point, so it can be observed in a multiplicity of ways. For example, it can leverage the elastic search technology, as detailed in the following article:

Monitor business metrics with Red Hat Process Automation Manager, Elasticsearch, and Kibana

Task Assignment

All the task are assigned to the group kie-server in order to easily deploy the demo in OpenShift Container Platform. If in your environment, you have multiple users and roles you can change the assignment accordingly.

Change Log

TODO