mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
35 lines
1.4 KiB
Java
35 lines
1.4 KiB
Java
package org.alfresco.repo.invitation.activiti;
|
|
|
|
import static org.alfresco.repo.invitation.WorkflowModelNominatedInvitation.wfVarInviteeUserName;
|
|
import static org.alfresco.repo.invitation.WorkflowModelNominatedInvitation.wfVarResourceName;
|
|
import static org.alfresco.repo.invitation.WorkflowModelNominatedInvitation.wfVarWorkflowInstanceId;
|
|
|
|
import java.util.Map;
|
|
|
|
import org.activiti.engine.delegate.DelegateExecution;
|
|
import org.alfresco.repo.workflow.activiti.ActivitiConstants;
|
|
|
|
/**
|
|
* Activiti delegate that is executed when a invitation request has been cancelled.
|
|
*
|
|
* @author Nick Smith
|
|
* @author Frederik Heremans
|
|
* @since 4.0
|
|
*/
|
|
public class CancelNominatedInviteDelegate extends AbstractInvitationDelegate
|
|
{
|
|
@Override
|
|
public void execute(DelegateExecution execution) throws Exception
|
|
{
|
|
Map<String, Object> executionVariables = execution.getVariables();
|
|
String currentInviteId = ActivitiConstants.ENGINE_ID + "$" + execution.getProcessInstanceId();
|
|
|
|
// Get the invitee user name and site short name variables off the execution context
|
|
String invitee = (String) executionVariables.get(wfVarInviteeUserName);
|
|
String siteName = (String) executionVariables.get(wfVarResourceName);
|
|
String inviteId = (String) executionVariables.get(wfVarWorkflowInstanceId);
|
|
|
|
invitationService.cancelInvitation(siteName, invitee, inviteId, currentInviteId);
|
|
}
|
|
}
|