How to make an activity that is already being treated by a User, is locked so that other users of the same group can not access it?

  • No labels

2 Comments

  1. Hi Jessica,

    You can invoke a API call to web/json/workflow/assignment/accept/(:activityId)

    Please see http://dev.joget.org/community/display/KB/JSON+API#JSONAPI-web%2Fjson%2Fworkflow%2Fassignment%2Faccept%2F%28%3AactivityId%29

    Cheers

  2. I understood the question to be along the lines of "If an activity is being currently addressed by a user (within a group perhaps), how do I prevent other users from accessing that activity?"

    If that's the case, one way I can think of controlling it is to modify the Permissions of the form which performs that activity. If you modify the Form Properties, you can choose 'Beanshell Script' under the Permissions section and add custom Beanshell code. You would want to check whether the current process is being modified by another user. If so, deny access to the Activity/Form. If the current process is not being modified by another user, allow access to the Activity/Form.

    I'm not sure what the Beanshell needs to return in that instance (maybe a boolean value?) but maybe someone more familiar with how Permission Beanshell scripts should work could answer that.