interactive activity with email alert.

Post any question regarding setting up, running or configuring Verj.io Workflow

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

interactive activity with email alert.

#1

Postby xren » Tue Nov 08, 2016 10:11 pm

Hi,

I would like to have the process send out email to the task actor when an interactive activity is reached. with the task id in the email when user click the URL, will automatically open that task.

Is there a way to do it by ebase available function or feature?

Thanks,
Xiaoli
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed Nov 09, 2016 10:10 am

This post discusses a similar requirement http://forum.ebasetech.com/forum/viewtopic.php?t=439

Probably the easiest way is to use an assignment handler to send the email - this is just a script so you can use email resources in the usual way. This approach is only possible if you are using custom assignment - as assignment handlers are only invoked to resolve custom assignments. If you know the userid and email address in advance you could pass these into the assignment handler as process attributes. If you are using role based assignment this approach won't work as the userid assigned to the task isn't known at this point.

The assignment handler doesn't have knowledge of the interactive task id so it would be difficult to take the user directly to the task from an email link. You could instead give them a link to a task list and the task you are processing should appear in this list.

Another approach might be to use an escalator but I'm not sure whether the escalator would be called before or after the assignment is performed.
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

assignment key

#3

Postby xren » Fri Nov 11, 2016 7:25 pm

Thank you for the thread.

I tried using customer assignment.

However, it failed to take field's value as assignment key.

I set &&approverEdirID to the assignment key. approverEirID is a process field.

However, the workflow assignment service script got "&&approverEdirID" as the WFKEY, not the real value of the process field.

I am not sure where it went wrong.

Thanks for your help
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#4

Postby Jon » Mon Nov 14, 2016 9:14 am

You can't substitute a && variable into the assignment key. But all the process attributes and their values are passed into the assignment handler on each call as the ATTRIBUTES table so these are always accessible.
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#5

Postby xren » Mon Nov 14, 2016 4:49 pm

Thanks
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#6

Postby Jon » Mon Nov 14, 2016 5:06 pm

You need to issue fetchTable to see the data. ATTRIBUTES has two columns: ID and VALUE. You should be able to get the approver process attribute something like this:

Code: Select all

var attrTAB=tables.ATTRIBUTES;
attrTAB.fetchTable();
var row = attrTAB.findRow(attrTAB.ID, "approver");
if (row != -1) 
{
     attrTAB.setCurrentRow(row);
     var approver= attrTAB.VALUE.value;
}
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#7

Postby xren » Mon Nov 14, 2016 5:36 pm

Thank you. Got it.

Then I called the following for the assignment to a single user

// how to assign task
tables.USERS.insertRow();
tables.USERS.USERID.value = fields.actorEdirID.value;
tables.USERS.updateTable();

Then I got the exception:

Failed while enacting node: unknown: Form Version not found %_ALIAS_GLOBAL_%:db9ed8e0-bf0f-454c-bd4f-b2bf1df5459a
0 x


Who is online

Users browsing this forum: No registered users and 2 guests