How to make REST API items follow collection workflow on DSpace 7.6

56 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
May 13, 2024, 9:28:14 AM5/13/24
to DSpace Technical Support
Dear DSpace Tech,

I would like to ask how to make REST API comply with workflow on collection, I have collection where it have editors as explained "Editors are able to edit the metadata of incoming submissions, and then accept or reject them." All deposits are expected to remain in the workflow of users placed as editors but when receiving items from REST API they are jumping the workflow and get published immediately. Assist in how to set REST API or DSpace to force items coming from REST API to remain on the task pool for users to take task and edit items before publishing. On DSpace 6.X items were remaining on approvers task pool until users take task and publish or rejecting the submission.

Regards,
Lewatle 

DSpace Technical Support

unread,
May 14, 2024, 12:54:03 PM5/14/24
to DSpace Technical Support
Hi Lewatle,

In DSpace 7, all items will be forced through the Workflow process as long as the Collection has a Workflow enabled.  If the Collection does *not* have a Workflow enabled, then the Items will become immediately available in the system.   This works whether you submit the Item via the User Interface or the REST API (after all, the REST API is how the User Interface submits Items as well). 

To enable a Workflow at the Collection level, you need to set one or more of the workflow "roles" (Editors, Final Editors or Reviewers) on the Collection Edit pages: https://wiki.lyrasis.org/display/DSDOC7x/Edit+Collection#EditCollection-AssignRoles    To disable the Workfow, you'd delete these roles if they already exist.

Tim

Lewatle Johannes Phaladi

unread,
May 15, 2024, 10:02:57 AM5/15/24
to DSpace Technical Support
Hello Tim,

Thanks for the reply, I would like to confirm that there is workflow set on collection, it is set by putting eperson on as editors but when receiving items from API they just get published, another test done was to add another eperson as submitter and do manual deposit using that eperson details, the item successfully remained in the workflow awaiting for editors to take task, also DSpace send emails to all editors on workflow to take task, only via API the items are published directly disregarding set workflow.

Please note email received when doing manual deposits :

 

-----Original Message-----
From: lew...@email.com
Sent: Wednesday, 15 May 2024 10:49
To: 1...@email.com>; sec...@email.com;
th...@email.com; fou...@email.com; fi...@email.com
Subject:

 

 

A new item has been submitted:

 

Title:        Graphical data

Collection:   Research Outputs

Submitted by: Lewatle   Phaladi

 

New task available.

 

To claim this task, please visit your "MyGroup IR"

page:  https://repository.url.ac.za/mydspace

 

Many thanks!

 

The IR Team


Regards,
Lewatle 

DSpace Technical Support

unread,
May 15, 2024, 5:19:06 PM5/15/24
to DSpace Technical Support
Hi Lewatle,

I'm a little confused by your email because the User Interface uses the REST API for every request.  So, it should not be possible to bypass workflow in the REST API unless the User Interface is also allowing you to bypass the workflow.

Essentially, every feature in the new REST API (v7) and User Interface works the same.  They are interconnected and provide the exact same features.  You cannot perform something from the REST API that is *not* possible from the User Interface

Are you maybe using the older, deprecated REST API (v6) described at: https://wiki.lyrasis.org/pages/viewpage.action?pageId=104566810 ?

If that's the case, then I'd recommend using the *new* REST API described at: https://wiki.lyrasis.org/display/DSDOC7x/REST+API    

The older, deprecated REST API (v6) is removed in DSpace 8.0, so it's not recommended to use it for any new code or tools.  If you use the *new* REST API, then you will find that all Items will go into workflow in the same way that they do via the User Interface.

Tim
Reply all
Reply to author
Forward
0 new messages