Giter Club home page Giter Club logo

template-producer-consumer's Introduction

Template for producer-consumer model robots using work items

This template contains a working robot implementation that has the basic structure where one part produces work items from input and another part that consumes those work items.

The producer-consumer model is not limited to two steps, it can continue so that the consumer generates further work items for the next step and so on.

The template tries to keep the amount of functional code at a minimum so you have less to clear out and replace with your own implementation, but some functional logic is needed to have the template working and guiding the key parts.

We recommended checking out the article "Using work items" before diving in.

Also a fully functional example robot can be found at: Web Store Order Processor Using Work Items

Tasks

The robot is split into two tasks, meant to run as separate steps in Control Room. The first task generates (produces) data, and the second one reads (consumes) and processes that data.

The first task (the producer)

  • Load the example Excel file from work item
  • Splits the Excel file into work items for the consumer

The second task (the consumer)

We recommended checking out the article "Work item exception handling" before diving in.

  • A simulated "Login" step.
    • This simulates random failures to highlight the use of APPLICATION -exception type.
  • Loop that handles the work items and just creates a logs row for each
    • This simulates random failures to highlight the use of BUSINESS -exception type.

Local testing

For best experience to test the work items in this example we recommend using our VS Code extensions. With the Robocorp Code extension you can simply run and select the input work items to use, create inputs to simulate error cases and so on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.