On 26/06/2012 14:03, Bob Lannoy wrote:
Hi,
I'm working on a password reset mechanism through workflow.
When the task 'pwreset' is called I execute a class that sets a user
property (pwreset) to true and then goes to the "activate" state.
Part of the workflow:
...
<userTask id="active" name="Active"/>
<sequenceFlow id="flow7" sourceRef="active" targetRef="activeGw"/>
<exclusiveGateway id="activeGw"/>
...
<sequenceFlow id="active2PasswordReset" sourceRef="activeGw"
targetRef="initPWreset">
<conditionExpression xsi:type="tFormalExpression">${task ==
'pwreset'}</conditionExpression>
</sequenceFlow>
...
<serviceTask id="initPWreset" name="Initialize password reset"
activiti:class="my.package.InitPWReset"/>
<sequenceFlow id="PWRflow1" sourceRef="initPWreset"
targetRef="activate"/>
...
<userTask id="activate" name="Activate"/>
...
I have notifications on the activate state which depend on the pwreset
property being true/false. I get notifications when I do a normal user
activation (with token).
However when I go through the pwreset flow I should get a notification
(the user object has pwreset=true and is in the "activate" state) but
I see there's no notification task.
Where are these notification tasks generated? Or do I have to create
them in my InitPWReset class?
NotificationTask objects are generated by the NotificationManager that
is normally invoked after workflow execution has finished: the actual
sequence is (check UserController.create() for an example):
1. workflow (WorkflowAdapter)
2. propagation (PropagationManager)
3. notification (NotificationManager)
Regards.
--
Francesco Chicchiriccò
ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member
http://people.apache.org/~ilgrosso/