On 26/09/2014 17:01, Guido Wimmel wrote:
Hi Francesco,

thanks.

We currently do not use Activiti, but a Java implementation of 
UserWorkflowAdapter.
Of course, we can also include explicit notifications in a similar way as in 
[1] - so far we had implicit notifications controlled by the performed task. 
Probably making the notifications explicit in the workflow is easier to 
understand anyway.

The solution to SYNCOPE-135 is very interesting, perhaps it can replace part of 
a simple custom implementation we have which works in a similar way. Though we 
don't use security questions for password reset - are they mandatory?

Hi Guido,
security questions are currently mandatory for password reset, but it might be the case to make their usage optional - with less security, of course.
I have re-opened SYNCOPE-135 for this purpose.

Regards.

Gesendet: Freitag, 26. September 2014 um 09:20 Uhr
Von: "Francesco Chicchiriccò" <ilgro...@apache.org>
An: dev@syncope.apache.org
Betreff: Re: Notifications based on performed workflow tasks

On 25/09/2014 17:29, Guido Wimmel wrote:
Hi,

up to Syncope 1.1.4, notifications could be sent based on the performed tasks 
as reported back by the UserWorkflowAdapter (e.g. UserController.create(): 
notificationManager.createTasks(created.getResult().getKey(), 
created.getPerformedTasks()).

Since Syncope 1.1.5, this was apparently changed (via SYNCOPE-423) such that the event 
passed to the notification manager to determine which notification is sent is only based 
on the method name in the ...Controller-Class. Even if you execute a workflow task via 
UserWorkflowController.executeWorkflowTask(), you only get 
"executeWorkflowTask" as an event.

Is this correct? If so, is there another way currently to use the performed 
task to decide which notifications are sent?
Hi Guido,
as you correctly report above, with Syncope 1.1.5+ (including 1.2.X) the
notification mechanism has completely changed and is now much more
powerful than it used to be: you can get notified of nearly any event
occurring in the system (by empowering aspect programming).
But as you know, power comes at a price: sending notifications from
workflow is now slightly different.

As part of SYNCOPE-135 - which I should be able to resolve today - I
have developed a simple general-purpose notification triggering utility
[1] available to be invoked from within Activiti workflow; as you can
see, such class can be easily backported to 1.1.X (or even copied over
with minimal modifications to any overlay project for Syncope 1.1.5+).

Basically, the idea is to define notification for CUSTOM events - see
[2] (first notification defined there) - and then to trigger such
notifications from within workflow by using the Notify task as said
above; naturally, you'll need to match the event string provided for the
CUSTOM notification with the 'event' workflow variable to trigger the
desired notification.

At least an explaining wiki page is worthwhile for this new mechanism;
backporting [1] to branch 1_1_X is also desirable.

Regards.

[1] 
https://svn.apache.org/repos/asf/syncope/branches/1_2_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/task/Notify.java
[2] 
https://svn.apache.org/repos/asf/syncope/branches/1_2_X/core/src/main/resources/content.xml

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to