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

Uploaded Python 3

File details

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

File metadata

  • Download URL: robocorp_workitems-1.5.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robocorp_workitems-1.5.0.tar.gz
Algorithm Hash digest
SHA256 03ccc58e967aef4d538aa1ba4a196c035dcee1c3a4c10f7720a38fbe255fd889
MD5 19319319ec4817604ffcaf5b9631e3f4
BLAKE2b-256 7beea6d393115c2b620c100a33f464eccc3d0ba32b98697c78d0394b87063951

See more details on using hashes here.

Provenance

The following attestation bundles were made for robocorp_workitems-1.5.0.tar.gz:

Publisher: workitems_release.yml on robocorp/robocorp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for robocorp_workitems-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4cb14810d4fd6ade0f74a52ecc1b730890ed287d227ad8a37100013ae308ce
MD5 d4ab9763e20649f1aa354bca277a8b9d
BLAKE2b-256 e2b20a6f4c7e77226940298bb1e2f0fff6c183207886c8d6c42d57458a71dd34

See more details on using hashes here.

Provenance

The following attestation bundles were made for robocorp_workitems-1.5.0-py3-none-any.whl:

Publisher: workitems_release.yml on robocorp/robocorp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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