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

Explore our API for extensive documentation.

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.7.tar.gz (17.3 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.7-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robocorp_workitems-1.4.7.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for robocorp_workitems-1.4.7.tar.gz
Algorithm Hash digest
SHA256 c88734892fcb6c12c78fdb003cb5aadbc0c4227e540993aae3f832699af59ad1
MD5 13427e9b7571e3388d9823b03ca9d5b6
BLAKE2b-256 b7a81827ed79843662c39d837cdecfe6b45f5dedb34a64087e0636b49c3c6432

See more details on using hashes here.

File details

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

File metadata

  • Download URL: robocorp_workitems-1.4.7-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for robocorp_workitems-1.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 39b73744365e171019b3ba85e9448bd3e9a3bd009be24e9e9e448d06c2f070a2
MD5 13437c687b1e0459a93884c85a653749
BLAKE2b-256 5d79de561061ffc3352829ef89bd2184e5db01f9e12a6e26245d225e7caad8ba

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