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.3.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

robocorp_workitems-1.4.3-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for robocorp_workitems-1.4.3.tar.gz
Algorithm Hash digest
SHA256 bb3fdb72e0a587d006aa32b7789bd03b2dd76e0615a616ca647c4d9e1c74d12e
MD5 3a127ffee790b128c288b14693b1509d
BLAKE2b-256 90aad617bf66b7b62b8b56848712f5126ce27ee5daf5a50af6e0ae6696e50243

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for robocorp_workitems-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ef815357d3a94441aee08770f1033d21ff9abe550b0abaf67c4ba0cf33ca1f6
MD5 1482aac616e43b65972f594a79ffc6fe
BLAKE2b-256 bd658359f7e26f0d2aac6f0918e512d3564fb398b29407080522c1b40e69abbd

See more details on using hashes here.

Provenance

Supported by

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