EV CONNECT FORUM
Customized role to notify recipient or group? - Printable Version

+- EV CONNECT FORUM (http://www.global.easyvista.com/evconnect)
+-- Forum: EasyVista IT Service Manager (http://www.global.easyvista.com/evconnect/forum-5.html)
+--- Forum: Process & Workflow (http://www.global.easyvista.com/evconnect/forum-9.html)
+--- Thread: Customized role to notify recipient or group? (/thread-1551.html)



Customized role to notify recipient or group? - lmoranne - 11-05-2019

Hi all,

There is a system role called @Recipient and default group that we can use in a workflow for validation purpose for example. The action is assigned to a group, and to a specific recipient in this group.

We would need more or less the same role: our need is to be able to send a validation either to the recipient only, or to a group depending on particular criteria.

Is there a way to implement such rules in a customized role and avoid several conditional steps in our workflows?

Thanks in advance for your help.


RE: Customized role to notify recipient or group? - ABBE Philippe - 11-05-2019

(11-05-2019, 03:12 AM)lmoranne Wrote: Hi all,

There is a system role called @Recipient and default group that we can use in a workflow for validation purpose for example. The action is assigned to a group, and to a specific recipient in this group.

We would need more or less the same role: our need is to be able to send a validation either to the recipient only, or to a group depending on particular criteria.

Is there a way to implement such rules in a customized role and avoid several conditional steps in our workflows?

Thanks in advance for your help.

Hello,
You can create your own role on Administration/Parameters/Custom role

See wiki : https://wiki.easyvista.com/xwiki/bin/view/Documentation/Role?language=fr

P.ABBE


RE: Customized role to notify recipient or group? - FMX - 11-05-2019

I'm not aware of a way to have a custom role return an employee_id OR group_id since the custom role configurator requires you to specify which the role will return.


RE: Customized role to notify recipient or group? - Andrew - 11-12-2019

Try using a UNION in your SQL statement, so the first part would search for the User ID and then the second part the Group ID, I think that the UNION would allow you to return one or the other based on the criteria... for example User email vs. Group email:

Select AM_EMPLOYEE.E_MAIL from AM_EMPLOYEE
inner join AM_ACTION on AM_EMPLOYEE.EMPLOYEE_ID = AM_ACTION.DONE_BY_ID
where AM_ACTION.ACTION_TYPE_ID in (20,34)
And AM_ACTION.END_DATE_UT IS NULL
And AM_ACTION.DONE_BY_ID IS not NULL
And AM_ACTION.REQUEST_ID in (@ID@)
Union
Select AM_GROUP.EMAIL from AM_GROUP
inner join AM_ACTION on AM_GROUP.GROUP_ID = AM_ACTION.GROUP_ID
where AM_ACTION.ACTION_TYPE_ID in (20,34)
And AM_ACTION.END_DATE_UT IS NULL
And AM_ACTION.DONE_BY_ID IS NULL
and ISNULL(AM_GROUP.EMAIL,'') not like ''
And AM_ACTION.REQUEST_ID in (@ID@)