Skip to main content

No project description provided

Project description

OARepo model builder plugin for workflows

This plugin provides a model builder for the OARepo workflow service. Use it to add support for workflows to your OARepo model.

Installation and usage

To use the plugin, add the following to your model yaml file, section plugins.packages:

plugins:
  packages:
  - oarepo-model-builder-worklows

Then recompile your model to generate the new code.

Code added

The plugin adds the following code to your model:

  • A new field workflow to the model's parent record. The workflow is thus shared across all the versions of the record.
  • A new field state on the record. This field is used to store the current state of the record in the workflow. Each version of the record (published, draft, previous versions) has its own state.
  • Marhmallow schema of the parent record is extended with oarepo_workflows.services.records.schema.WorkflowParentSchema class to allow passing the workflow to the record.
  • DB table of the parent record is extended with oarepo_workflows.records.models.RecordWorkflowParentModelMixin to include the workflow field
  • A workflow component (oarepo_workflows.services.components.workflow.WorkflowComponent) is added to model service components.

Tests

Note: the tests generated with oarepo-model-builder-tests plugin are not compatible with the workflow plugin. You need to write your own tests for the workflow.

Usage remarks

The workflow module depends on the record and initial data passed to the permission policy. In the current version invenio does not pass those.
To circumvent this, you need to use the oarepo forks of the following invenio modules:

  • invenio-records-resources
  • invenio-drafts-resources

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

oarepo_model_builder_workflows-1.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file oarepo_model_builder_workflows-1.0.1.tar.gz.

File metadata

File hashes

Hashes for oarepo_model_builder_workflows-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bba74e6f139ce2bc3476a2a397d9a6b5d9e6c8167f2f2a171d0d796b2cb2f41f
MD5 0c6f4e671fe4bfbe49f9359c022485fb
BLAKE2b-256 f5511cfbdb55e268910b4cda79914dc53aba4f25dcefb68841d13321aa502a6f

See more details on using hashes here.

File details

Details for the file oarepo_model_builder_workflows-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for oarepo_model_builder_workflows-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1fc8de117de470828b633df9b756529d24a0165b074c00f7b051ec6d3fd4727d
MD5 285e4df5e6ecae183299ea5a495d2714
BLAKE2b-256 f8d632c6ad76eb4e38864cb8387a09a8562d2d5a954e21835a10c25673ee303c

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