Hi, im really stuck on how i should go about assigning tasks to a group of users.
I've got a logon service (in javascript) that is just returning user-id (from an external database). when looking at WORKFLOW_TASKLIST, if the task has been assigned using workflow_administrator to that user it shows up in their task list, otherwise it doesn't show up. i cant work out what should be in the workflow_assignment_logic to assign it to a group. and javascript would be preferred.
any help would be great thanks as i just cant work out how to do this
Edit: I know im supposed to something with roles/custom roles but im really clueless atm.
Need help assigning a workflow task to a group
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
You need to set up the assignment criteria in workflow_assignment_service_logic script. The default shipped with Ebase is in FPL, you can create a new JS script and attach it to the Workflow_Assignment_service event in place of the FPL script.
In your interactive task, select Custom Assignment in the Resource tab. Enter a descriptive name in the Assignment Key box for the Group.
For example:
sales
In the script you will then check for the Key and execute the code within, for example:
You can also assign to a group of users who share common info for example, the department they belong to. You do this by using Credentials, for example:
In your interactive task, select Custom Assignment in the Resource tab. Enter a descriptive name in the Assignment Key box for the Group.
For example:
sales
In the script you will then check for the Key and execute the code within, for example:
Code: Select all
// Role based assignment
// Any user with a role of 'Sales' will see the task in their task list
if ( fields.WFKEY.value == "sales")
{
roles.insertRow();
roles.ROLEID.value = "Sales";
roles.updateTable();
}
Code: Select all
if ( fields.WFKEY.value == "sales")
{
credentials.insertRow();
credentials.ID.value = "Department";
credentials.VALUE.value = "Sales Dept";
credentials.updateTable();
}
0 x
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
-
- Ebase User
- Posts: 37
- Joined: Wed Mar 13, 2013 11:33 am
- Contact:
Ok I tried what you said and its not working at the moment.
The logon works fine and if the user has the role IT then the job isn't appearing in the workflow_tasklist but if i set the user's role to WFADMIN then it shows up fine. So im guessing the script for workflow_assignment is wrong? at the moment i have:
In the interactive task, under resources, i have it set to custom and the assignment key is IT. (The process has been released after making changes so its not that).
Edit: just realised what was wrong;
in the script, where it says "Using System Service:" it was set to the logon service not workflow_assignment so it wasnt showing the roles table. so i've changed the workflow_assignement script to:
Now it works fine
Thanks for you help.
The logon works fine and if the user has the role IT then the job isn't appearing in the workflow_tasklist but if i set the user's role to WFADMIN then it shows up fine. So im guessing the script for workflow_assignment is wrong? at the moment i have:
Code: Select all
if ( fields.WFKEY.value == "IT")
{
tables.EBASEROLES.insertRow();
tables.EBASEROLES.ROLEID.value = "IT";
tables.EBASEROLES.updateTable();
}
Edit: just realised what was wrong;
in the script, where it says "Using System Service:" it was set to the logon service not workflow_assignment so it wasnt showing the roles table. so i've changed the workflow_assignement script to:
Code: Select all
if ( fields.WFKEY.value == "IT") {
tables.ROLES.insertRow();
tables.ROLES.ROLEID.value = "IT";
tables.ROLES.updateTable();
}
Thanks for you help.
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
Who is online
Users browsing this forum: No registered users and 2 guests