Skip to main content

Robocorp Work Items library

Project description

robocorp-workitems

Work items are used in Robocorp Control Room for managing data that go through multiple steps and tasks inside a process. Each step of a process receives input work items from the previous step, and creates output work items for the next step.

Getting started

The library exposes two objects, inputs and outputs, which are the main way to interact with work item queues. The former deals with the reading input work items, and the latter with creating output work items.

A run inside Control Room will always have at least one work item available to it. The simplest Robot which reads the current work item and creates an output can be done in the following manner:

from robocorp import workitems
from robocorp.tasks import task

@task
def handle_item():
    item = workitems.inputs.current
    print("Received payload:", item.payload)
    workitems.outputs.create(payload={"key": "value"})

Iterating over all available input items in the queue is also easy:

from robocorp import workitems
from robocorp.tasks import task

@task
def handle_all_items():
    for item in workitems.inputs:
        print("Received payload:", item.payload)
        workitems.outputs.create(payload={"key": "value"})

Work item structure

A work item's data payload is JSON and allows storing anything that is JSON serializable. By default the payload is a mapping of key-value pairs.

In addition to the payload section, a work item can also contain files, which are stored within Robocorp Control Room. Adding and using files with work items requires no additional setup from the user.

Guides

Further user guides and tutorials can be found in Robocorp Docs.

API Reference

Information on specific functions or classes: robocorp.workitems

Changelog

A list of releases and corresponding changes can be found in the changelog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robocorp_workitems-1.4.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robocorp_workitems-1.4.2-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file robocorp_workitems-1.4.2.tar.gz.

File metadata

  • Download URL: robocorp_workitems-1.4.2.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure

File hashes

Hashes for robocorp_workitems-1.4.2.tar.gz
Algorithm Hash digest
SHA256 7aa9a2dbd6a64dd18bb2cc155459bac6058bce779ada0523fdd66a1b157524e7
MD5 99ceaf9c2cd50a20a2d7b8a61a779769
BLAKE2b-256 da19ae4c9d46c576ea53baa902eefd0cb907e54d8c0e30f7a002f132713aa9c8

See more details on using hashes here.

File details

Details for the file robocorp_workitems-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: robocorp_workitems-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure

File hashes

Hashes for robocorp_workitems-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19879206d1b5318ac3e462355ca3c621fcd0339f2adfe1189be56173ea8af21c
MD5 4059acfb817ee4756fe2126928bafbd6
BLAKE2b-256 a0dbcf259e393245e090a5e77b6ae4f2efac84ad62b891238a7a0304c70c77f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page