samvera-deprecated / curation_concerns

A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
Other
15 stars 27 forks source link

Workflow should be assigned to admin sets #1070

Closed scholarworks closed 7 years ago

scholarworks commented 7 years ago

Descriptive summary

Workflows are currently linked to and generated by work types. In order to allow the most flexibility in workflow assignment, this should happen at the admin set level.

Expected behavior

  1. Define a workflow with the following syntax
{
  "workflows": [
    {
      "name": "Default Workflow",
      "label": "Default Workflow",
      "description": "A single submission step, default workflow",
      "actions": [{
        "name": "deposit",
        "from_states": [{"names": ["new"], "roles": ["depositing"]}],
        "transition_to": "deposited",
        "notifications": [{
          "notification_type": "email",
          "name": "confirmation_of_submitted_to_ulra_committee",
          "to": ["creating_user"],
          "cc": ["advising"]
        }],
        "methods": [
          "CurationConcerns::Workflow::ActivateObject"
        ]
      }]
    }
  ]
}
  1. In the admin dashboard, assign the workflow to a selected admin set.
  2. When items are submitted to the admin set, the workflow is applied.

    Actual behavior

[IN PROGRESS]

Related work

1031, #1035

scholarworks commented 7 years ago

Closing and moving to sufia.