Description
This process is useful for cases where the standard “Share” action that can be used to share objects with other users is not sufficient. This “Share” action does not only share objects with selected users, it also notifies them about the shared document and requires a confirmation for the process to be completed. The process can be also used as a template for further customization of sharing use cases, if they are to be used in projects.
Process Start
To initiate this process, you must have Edit rights for the object type you want to share. Select the “Share” action, add the users or user groups you want to share this document with and write a comment:
...
With version 3, the start form assures that the process can only be started if the given object type is shareable. If not, the OK button is inactive and an error message below the check box Object type is shareable will be displayed.
Inbox
Each member of the group receives the task 'Confirm sharing' in his inbox.
...
Each recipient must accept the task, read the document and confirm the task when finished. As soon as each user has confirmed, the process ends.
Language
This process model is available in English and German.
Administering the Sharing Process
Download the zip file below. Extract the Sharing directory into the location of your projects, which usually is ..\user\documents.
...
Version 3: The start form usually prevents the start, if the object type is not shareable. Otherwise the main activity BeforeStartEvent script reacts on the condition and leads to a notification which the initiator gets into his inbox afterwards.
Main Activity Settings
This process is available for each user and process. Change the Initiators and the Main object type to restrict its behavior.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// set object title indirectly as process subject $.variable('objecttitle').value = $.file.get()[0].title; // Share the object with the organisational unit set in user group // Take into account that this code will change the current sharing values of the object type. // To do: add this value to existing ones var processFile = $.file.get(); // get all process file objects into the array processFile var dmsObject = processFile[0]; // take the first element var putBody = { objects : [], organizationobjectstype : 'id', organizationobjects : [] }; putBody.objects.push( { itemid : dmsObject.id, type: dmsObject.type } ); putBody.organizationobjects.push($.variable('usergroup').value); $.http.post(); $.http.path('/service/dms/batch/addtoadditionalvisibility'); $.http.body(putBody); $.http.execute(); // extension of version 3: process result if(!response.reason) { $.variable('canbeshared').value = true; } else { // this condition will only occur, if the start form did not prevent the start in case of non-shareable object types $.variable('canbeshared').value = false; } $.done(); |
Sending Tasks to all Recipients
To send a task to each member of the configured group, the container for parallel execution has to be configured like this:
...
Code Block | ||||
---|---|---|---|---|
| ||||
// Set all participants var recipient = new $.OrgObject(); recipient.id = $.variable('usergroup').value; $.activity('this').performers.push(recipient); $.done(); |
Configuring 'notice'
The Participant type attribute must be set to 'Multi-instance controlled', in accordance with the settings of the parallel container (see above).
...
The standard Forward button is renamed to Confirm, as can be seen in the Actions attribute.
Prerequisites
The object types of objects to be shared must be configured first:
...
After sharing the object with a user, the Display right for this object is assigned to him.
Process Model Version History
Version | Date | Author | Description |
---|---|---|---|
3 | March 22, 2019 | Martin Bartonitz | 6. Start form prevents process start in case of none-shareable object types. The object type and the attribute shareable is shown in the start form as well. |
2 | March 21, 2019 | Martin Bartonitz | 4. Notice for initiator about all confirmations |
1 | March 19, 2019 | Martin Bartonitz | Start with basics:
|
...