Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new workflow field $participants #529

Closed
rsoika opened this issue Jul 16, 2019 · 6 comments
Closed

Introduce new workflow field $participants #529

rsoika opened this issue Jul 16, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@rsoika
Copy link
Member

rsoika commented Jul 16, 2019

Introduce a new internal workflow field named '$participants'.

  • The field contains all users who had write access currently or in the past
  • The field should be computed by the workflow engine after a process life-cycle.
@rsoika rsoika added the feature label Jul 16, 2019
@rsoika rsoika added this to the 5.0.1 milestone Jul 16, 2019
@rsoika rsoika changed the title Introduce new field $participants Introduce new workflow field $participants Jul 16, 2019
@rsoika rsoika pinned this issue Jul 16, 2019
@rsoika
Copy link
Member Author

rsoika commented Jul 16, 2019

Hi @chrisw14 : what do you think about this new workflow item?

@chrisw14
Copy link

Hi Ralph,
to be honest, I already have exactly this field in my application :-)
It's a big advantage if you can use this field for read access. So all users which participates in the workflow, can check their approvals later again.
I think, I extended a plugin to implement this but maybe it's the better way to add this to the workflow engine.

@chrisw14
Copy link

This is my implementation:

	public ItemCollection updateParticipants(ItemCollection workitem) {
		
		List<String> participants = workitem.getItemValue("$participants");
		int step = workitem.getItemValueInteger("$processId");
		String user = loginController.getUserPrincipal();
		if (!participants.contains(user) && step > 1) {
			participants.add(user);
			workitem.replaceItemValue("$participants", participants);
		}
		
		return workitem;
	}

@rsoika
Copy link
Member Author

rsoika commented Jul 16, 2019

good point: you only add the current user and not all users listed in the owner field (which was my first thought) . This makes sense, as some users listed in the owner field will never participate in a specific workflow. I think I will take your implementation.

@chrisw14
Copy link

Yes, for me it‘s enough to add only active participants. If there is a need for passive participants to have read access it‘s better to add them in the ACL of the Model I think.

@rsoika
Copy link
Member Author

rsoika commented Jul 17, 2019

implemented by Issue #531

@rsoika rsoika closed this as completed Jul 18, 2019
@rsoika rsoika unpinned this issue Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants