Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
I have this case where an activity is assigned to the HOD, but I want the wf engine to be able to assign this activity to another user in case the HOD is not available, I thought of doing this by depending on a group to be the participant instead of the HOD, but how can I add a condition that will select the user that belong to the group and also to the department of the performer?
6 Comments
Hugo
Hey there,
The easiest way is to write a participant beanshell plugin to do all the checking and assignment. You will just need to return a array of usernames of the applicable assignees.
Hope it helps!
Omar Kanaan
Thanks, I just wanted to know if I can use the same connection that I defined in my datasource, or should I hardcode the connection string and credentials into the script that I will write?
Hugo
We should be using the conventional way of retrieving data and should not reinvent the wheel.
Whenever possible, try to explore and use back methods and objects that are made available to us when writing the bean shell plugin. I'm attaching a working bunch of code that will return list of users that are in the same department with the requestor and belonged to a certain group.
Hope that this would help.
N.aimi F
Hi hugo,
i'm using v3, can u explain me more details of the code.
i tried it by using the map to plugin tool then copy paste the code there but it does not work, maybe i dont undertand that much about the code. you can see what im trying to achieve here,workflow variable and hash variable v3
Thanks,
Regards
N.aimi F
WalterMG
I've the same need: can you better explain the code?
Tanks a lot.
Bye
Edward
Why collection<group> cannot be work ?