mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Continuing refactor of InvitationServiceImpl to use Activiti workflows.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30020 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<sequenceFlow id="flow1" sourceRef="start" targetRef="reviewTask" />
|
<sequenceFlow id="flow1" sourceRef="start" targetRef="reviewTask" />
|
||||||
|
|
||||||
<userTask id="reviewTask" name="Review Task"
|
<userTask id="reviewTask" name="Review Task"
|
||||||
activiti:formKey="imwf:moderatedInvitationReviewTask">
|
activiti:formKey="imwf:activitiModeratedInvitationReviewTask">
|
||||||
<extensionElements>
|
<extensionElements>
|
||||||
<activiti:taskListener event="create"
|
<activiti:taskListener event="create"
|
||||||
class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
||||||
@@ -34,8 +34,7 @@
|
|||||||
</extensionElements>
|
</extensionElements>
|
||||||
<potentialOwner>
|
<potentialOwner>
|
||||||
<resourceAssignmentExpression>
|
<resourceAssignmentExpression>
|
||||||
<formalExpression>${bpm_groupAssignee.properties.authorityName}
|
<formalExpression>${bpm_groupAssignee}</formalExpression>
|
||||||
</formalExpression>
|
|
||||||
</resourceAssignmentExpression>
|
</resourceAssignmentExpression>
|
||||||
</potentialOwner>
|
</potentialOwner>
|
||||||
</userTask>
|
</userTask>
|
||||||
@@ -48,12 +47,12 @@
|
|||||||
<conditionExpression xsi:type="tFormalExpression">${imwf_reviewOutcome == 'Approve'}</conditionExpression>
|
<conditionExpression xsi:type="tFormalExpression">${imwf_reviewOutcome == 'Approve'}</conditionExpression>
|
||||||
</sequenceFlow>
|
</sequenceFlow>
|
||||||
|
|
||||||
<serviceTask id="approved" name="Approved" activiti:class="ApproveModeratedInviteDelegate" />
|
<serviceTask id="approved" name="Approved" activiti:delegateExpression="${ApproveModeratedInviteDelegate}" />
|
||||||
<sequenceFlow id="flow5" sourceRef="approved" targetRef="end" />
|
<sequenceFlow id="flow5" sourceRef="approved" targetRef="end" />
|
||||||
|
|
||||||
<sequenceFlow id="flow4" sourceRef="reviewDecision" targetRef="rejected" />
|
<sequenceFlow id="flow4" sourceRef="reviewDecision" targetRef="rejected" />
|
||||||
|
|
||||||
<serviceTask id="rejected" name="Rejected" activiti:class="RejectModeratedInviteDelegate" />
|
<serviceTask id="rejected" name="Rejected" activiti:delegateExpression="${RejectModeratedInviteDelegate}" />
|
||||||
<sequenceFlow id='flow6' sourceRef='rejected' targetRef='end' />
|
<sequenceFlow id='flow6' sourceRef='rejected' targetRef='end' />
|
||||||
|
|
||||||
<endEvent id="end" />
|
<endEvent id="end" />
|
||||||
|
@@ -70,7 +70,6 @@
|
|||||||
<list>
|
<list>
|
||||||
<value>accept</value>
|
<value>accept</value>
|
||||||
<value>reject</value>
|
<value>reject</value>
|
||||||
<value>reject</value>
|
|
||||||
</list>
|
</list>
|
||||||
</parameter>
|
</parameter>
|
||||||
</constraint>
|
</constraint>
|
||||||
@@ -79,8 +78,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<overrides>
|
<overrides>
|
||||||
<property name="bpm:outcomePropertyName">
|
<property name="bpm:outcomePropertyName">
|
||||||
<default>{http://www.alfresco.org/model/workflow/invite/moderated/1.0}reviewOutcome
|
<default>{http://www.alfresco.org/model/workflow/invite/nominated/1.0}inviteOutcome</default>
|
||||||
</default>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="bpm:reassignable">
|
<property name="bpm:reassignable">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<sequenceFlow id="flow2" sourceRef="sendInvite" targetRef="invitePending" />
|
<sequenceFlow id="flow2" sourceRef="sendInvite" targetRef="invitePending" />
|
||||||
|
|
||||||
<userTask id="invitePending" name="Invite Pending"
|
<userTask id="invitePending" name="Invite Pending"
|
||||||
activiti:formKey="inwf:invitePendingTask">
|
activiti:formKey="inwf:activitiInvitePendingTask">
|
||||||
<extensionElements>
|
<extensionElements>
|
||||||
<activiti:taskListener event="create"
|
<activiti:taskListener event="create"
|
||||||
class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
||||||
@@ -28,6 +28,13 @@
|
|||||||
</activiti:string>
|
</activiti:string>
|
||||||
</activiti:field>
|
</activiti:field>
|
||||||
</activiti:taskListener>
|
</activiti:taskListener>
|
||||||
|
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
|
||||||
|
<activiti:field name="script">
|
||||||
|
<activiti:string>
|
||||||
|
execution.setVariable('inwf_inviteOutcome', task.getVariable('inwf_inviteOutcome'));
|
||||||
|
</activiti:string>
|
||||||
|
</activiti:field>
|
||||||
|
</activiti:taskListener>
|
||||||
</extensionElements>
|
</extensionElements>
|
||||||
<humanPerformer>
|
<humanPerformer>
|
||||||
<resourceAssignmentExpression>
|
<resourceAssignmentExpression>
|
||||||
|
@@ -584,7 +584,7 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
|||||||
// get workflow instance (ID) that pendingInvite task (in query
|
// get workflow instance (ID) that pendingInvite task (in query
|
||||||
// result set)
|
// result set)
|
||||||
|
|
||||||
String workflowId = workflowTask.path.instance.id;
|
String workflowId = workflowTask.getPath().getInstance().getId();
|
||||||
// TODO ALFCOM-2597 workflowTask.properties does not contain
|
// TODO ALFCOM-2597 workflowTask.properties does not contain
|
||||||
// custom process values
|
// custom process values
|
||||||
// NominatedInvitationImpl result = new
|
// NominatedInvitationImpl result = new
|
||||||
@@ -1007,8 +1007,7 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
|||||||
|
|
||||||
inviteeUserName = null;
|
inviteeUserName = null;
|
||||||
|
|
||||||
Set<NodeRef> peopleWithInviteeEmail = this.personService.getPeopleFilteredByProperty(
|
Set<NodeRef> peopleWithInviteeEmail = personService.getPeopleFilteredByProperty(ContentModel.PROP_EMAIL, inviteeEmail);
|
||||||
ContentModel.PROP_EMAIL, inviteeEmail);
|
|
||||||
|
|
||||||
if (peopleWithInviteeEmail.size() > 0)
|
if (peopleWithInviteeEmail.size() > 0)
|
||||||
{
|
{
|
||||||
|
@@ -799,7 +799,7 @@ public class InvitationServiceImplTest extends BaseAlfrescoSpringTest
|
|||||||
* Now verify access control list contains user two
|
* Now verify access control list contains user two
|
||||||
*/
|
*/
|
||||||
String roleName = siteService.getMembersRole(resourceName, inviteeUserName);
|
String roleName = siteService.getMembersRole(resourceName, inviteeUserName);
|
||||||
assertEquals("role name wrong", roleName, inviteeRole);
|
assertEquals("role name wrong", inviteeRole, roleName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Negative test attempt to approve an invitation that has aready been
|
* Negative test attempt to approve an invitation that has aready been
|
||||||
|
Reference in New Issue
Block a user