-
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 are persisted in the repository
- Each work must belong to exactly 1 admin set
- "default" admin set
- What form values are allowed for visibility/embargo
- A "template" of user permissions to copy onto new members
- PermissionTemplates are persisted in the database
$ ls config/workflows/
default_workflow.json mediated_deposit_workflow.json
Open config/workflows/default_workflow.json
Open config/workflows/mediated_deposit_workflow.json
solr_wrapper
fcrepo_wrapper
bin/rails hyrax:default_admin_set:create
Sipity::Workflow
Sipity::WorkflowAction
Sipity::WorkflowState
Sipity::Role
Sipity::Notification
Sipity::Method
Sipity::Entity
Sipity::Agent
- 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]
rails server
Set up a new admin set and make it mediated_deposit. Grant deposit access to the registered group.
Select you admin user and the approving role under the name of the admin set you just created.
Sign out. Create a new user. With that new user, create a new public 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 visible. Login as reviewer and go to the "Review Submissions tab" 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.
bin/rails hyrax:workflow:load
Hyrax::Workflow::ActivateObject
Hyrax::Workflow::DeactivateObject
Hyrax::Workflow::GrantEditToDepositor
Hyrax::Workflow::GrantReadToDepositor
Hyrax::Workflow::PendingReviewNotification
-
Hyrax::Workflow::ChangesRequiredNotification
https://github.com/projecthydra-labs/hyrax/blob/master/app/services/hyrax/workflow/notification_service.rb#L42-L45
Your institution is going to begin ingesting manuscripts into the repo. The product owner has requested a multi step workflow:
- Deposit
- Metadata Review
- Final Review
The object should not be visible to the public until final review is complete.
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:)
Suppressed flag.
Workflow::WorkflowActionService.run(subject: subject,
action: sipity_workflow_action,
comment: comment)
The product owner has requested that "final approval" should be logged.
The product owner has requested that the final approver be notified after metadata approval.
- Restrict worktype - workflow mapping.
- Depositor can't edit when something is sent back.