-
Notifications
You must be signed in to change notification settings - Fork 1
Workflows
9:45 - 11:00, Break, 11:15 - 12:30
git checkout day3/workflow-start
- Introduced in Sufia 7.3
- AdminSets in the repository
- Each work must belong to exactly 1 admin set
- "default" admin set
- What form values are allowed for embargoes
- A "template" of user permissions to copy onto new members
$ ls config/workflows/
default_workflow.json mediated_deposit_workflow.json
Open config/workflows/default_workflow.json
Open config/workflows/mediated_deposit_workflow.json
- Sipity::Workflow
- Sipity::WorkflowAction
- Sipity::WorkflowState
- Sipity::Role
- Sipity::Notification
- Sipity::Method
- Sipity::Entity
- Workflow Responsibility and Entity Specific Responsibility
Let's see how this functions. First we grant ourselves admin access.
# config/role_map.yml
development:
admin:
- [email protected]
The Rails server must be restarted after this change.
solr_wrapper
fcrepo_wrapper
bin/rails hyrax:default_admin_set:create
rails server
Set up a new admin set and make it mediated_deposit. Grant deposit access to the registered group.
Create a new Musical Work. Flip to the relationships tab. See how sharing goes away. Make a deposit in the mediated group. Login as another user and see that it's not visibile. Login as reviewer and see that it's visible. Approve it. Login as another user and see it's now visible.
We need to have each admin set have it’s own workflows (even if they’re made from the same template) because we might need to give a different set of agents access per admin set.
curl https://github.com/pulibrary/plum/blob/master/config/workflows/books_workflow.json -o config/workflows/books_workflow.json
bin/rails hyrax:workflow:load
try it out.
scope_permitted_workflow_actions_available_for_current_state(user:, entity:)
scope_agents_associated_with_entity_and_role(entity:, role:)
scope_roles_associated_with_the_given_entity(entity:)
authorized_for_processing?(user:, entity:, action:)
scope_processing_agents_for(user:)
scope_entities_for_the_user(user:)
scope_users_for_entity_and_roles(entity:, roles:)
scope_processing_workflow_roles_for_user_and_entity(user:, entity:)
- Restrict worktype - workflow mapping.
- Depositor can't edit when something is sent back.
- Workflow
- WorkflowProxy (proxy for a work)
- State
- Action
- Responsibility
- Agent (proxy for a user/group)