The Route to Automate Businesses Mgr. Ivo Bek, Product Manager Mgr. Marian Macik, Quality Engineer April 2019 2 AGENDA ❏ BPM products and where to find them ❏ Business automation? What, why and for whom? ❏ Common needs for business automation solution ❏ Demo - Send an SMS map from my process ❏ Tools for integrated business automation ❏ Lab #1 - Git, custom services ❏ Lab #2 - DMN, business rules 3 BPM PRODUCTS from Gartner analyst report 2019 Pega: No code demo 4 BUSINESS AUTOMATION What do we need to automate? ● Approval decisions ● Eligible number of vacation days ● Loan calculation ● Payment process ● Customer onboarding ● Rent car process ● Service requests Decisions Tasks Processes Schedules ● Update a spreadsheet ● Scan and send a form ● Manufacturing / assembly line ● Employee shift scheduling (hospital, school) ● Deliveries (VRP) 5 RETURN ON INVESTMENTS (ROI) Frequency Size and complexity Diversity (actors, systems, rules) Speed (SLAs) Time (spent on a single manual task) x Frequency (of performing a task per month) x Cost (per hour) x 12 (months) = Yearly Savings Our focus so far Why we need to automate some part of business? 6 ● Shorten response time ● Streamline customer onboarding ● Improve cost/value rate ● Strengthen branding ● Routing and escalating events (CRM) ● Regular communication about the news and future plans ● Deal with waste tasks ( repetitive, duplicate ) ● Risk mitigation and elimination ● Enforce state and business policies THE ULTIMATE GOAL 7 BUSINESS AUTOMATION Who are the target users? ● Fill in data ● Make a decision ● Start a process ● Complete tasks ● Delegate a task ● See process logs and errors ● Retrigger process nodes ● Bulk process instance migration ● Model a new process ● Update a rule in a decision ● Reassign a task ● Monitor overdue processes Process Manager Process AdministratorKnowledge WorkerPractitioner 8 BUSINESS AUTOMATION Common needs ❏ Fit into customer tech stack and project lifecycle ❏ CI/CD pipeline across multiple environments DEV >> INT >> TEST >> PROD ❏ Roles and groups management ❏ Project and asset versioning ❏ Cross-team collaboration between analysts, managers, and developers - use of many tools and interchangeable formats ❏ No down time, scaling, automatic backups - run in cloud HW - AWS, Azure ❏ Task and process events / data integration with business data DEMO Send an SMS Map from My Process 10 IFTTT ❏ If This Then That, https://ifttt.com ❏ If Trigger Then Action(s) ❏ Simple tool for automation and integration ❏ Applets ❏ platform.ifttt.com ❏ Allows more than one action ❏ Simple guide how to configure an Applet ❏ Point no. 3 in https://github.com/business-applications/sample-ifttt/blob/master/README.md Tools for Integrated Automation 12 JENKINS CI/CD pipeline across multiple environments 13 ActiveMQ, RabbitMQ, Apache Kafka Event Sourcing and Command Query Responsibility Segregation (CQRS) Pattern ❏ Audit trail - Full history of the state of the system ❏ Integration with other subsystems - Notify interested subsystems of changes to the application's state ❏ CQRS - Commands vs Queries ❏ ProcessStarted ❏ TaskCompleted ❏ TimerTimeout ❏ ProcessSignalSent 14 PROMETHEUS Real-time metrics monitoring and alerts ❏ avg_over_time(dmn_evaluate_decision_nanosecond_bucket[5m]) DMN Evaluation time histogram DMN Number of evaluations failed 15 UIPATH Robotic Process Automation (RPA) RPA is any capability (software and services) that allows you to transact in any IT application or website, typically in the same way a human would, to automate complex, rule-based work. Broad Classification: ❏ Probots: process data, following simple repeatable rules ❏ Knowbots: gather and store data ❏ Chatbots: act as virtual agents and respond to customer queries in real time 16 APACHE SPARK MLLIB Artificial Intelligence (AI) Explainable Artificial Intelligence (XAI) "IBM’s attempt to promote its supercomputer programme to cancer doctors (Watson for Oncology) was a PR disaster” says Vyacheslav Polonski, Ph.D., UX researcher for Google and founder of Avantgarde Analytics. “The problem with Watson for Oncology was that doctors simply didn’t trust it.” Users need to be able to understand and validate models as well as explain why decisions were made. Random forests combine many decision trees in order to reduce the risk of overfitting (model learning too many details and noise). Find loyal and fraud bank customers Identify the disease by analyzing the patient's medical records Recommend the next steps (customers usually buy these 2 products together) DECISION TREES ❏ Each node is a simple question with answers true/false ❏ 2 types of problems: ❏ Regression ❏ Classification RANDOM FOREST ALGORITHM ❏ Higher the number of trees in the forest, higher the accuracy of results ❏ Each tree covers only a subset of features HUMAN TASKS AUTOMATION ❏ AI (e.g. random forests) can be used to automate human tasks, originally designed for humans ❏ Pros: ❏ Speeds up work ❏ Cons: ❏ Can influence human decisions Car rental approval Prediction: Approve Confidence: 96% Approve Reject ENTANDO APP BUILDER UX platform for modern applications plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNews THANK YOU LABS Work items and handlers Team collaboration using Git WORK ITEMS INSTALLATION ❏ First, you have to enable work item for whole Business Central. ❏ Click on the wheel in the upper right corner. ❏ Select Service Tasks Administration. ❏ Enable the service task you want. ❏ Some work items are enabled and available by default: ❏ BusinessRuleTask ❏ DecisionTask ❏ Email ❏ JMSSendTask ❏ Rest ❏ ServiceTask ❏ WebService WORK ITEMS INSTALLATION ❏ Now you can install it to your project. ❏ In project Settings/Service Tasks, click on Install button. ❏ Fill in needed parameters, they vary with each work item. ❏ Don’t forget to save it. WORK ITEMS INSTALLATION ❏ You should see your work item handler declared in Settings/Deployments/Work Item Handlers. ❏ In case you have enabled and installed a work item which is not a default one, you will have to add it as a dependency for your project. ❏ In Settings/Dependencies, click on Add from Repository. ❏ Select the work item dependency, e.g. org.jbpm.contrib:ifttt-workitem:7.19.0.Final for IFTTT work item. ❏ Dependencies should be added to your project. ❏ Don’t forget to save it. EMAIL WORK ITEM CONFIGURATION ❏ Configuration for GMail: ❏ new org.jbpm.process.workitem.email.EmailWorkItemHandler("smtp.gmail.com", "587", "testMail@gmail.com", "testPassword", "true") ❏ Don’t forget the last parameter “true”. This will instruct Business Central to use secure TLS connection, which is needed for GMail. ❏ In GMail account, don’t forget to enable access for less secure apps. ❏ Configuration for MailSlurper: ❏ Change wwwPort to 8180 (or any other available port on your system) so it doesn’t clash with Business Central 8080 port ❏ Create credentials ❏ new org.jbpm.process.workitem.email.EmailWorkItemHandler("localhost", "2500", "user", "password") 27 TEAM COLLABORATION VIA GIT ❏ Requires only basic Git skills ❏ Pull your business assets from Business Central 1. git remote add business-central ssh://wbadmin@localhost:8001/MySpace/ * 2. git pull business-central master 3. password wbadmin ❏ Push your business assets for example to GitHub 1. git push github master ❏ Import your business assets to another Business Central either by pushing to it or by cloning whole repository from UI * URL can be found in Settings/General Settings of your project, just prepend it with wbadmin@