/** * Cancel workflow instance */ public void cancel() { serviceRegistry.getWorkflowService().cancelWorkflow(this.id); }
/** * Cancel workflow instance */ public void cancel() { serviceRegistry.getWorkflowService().cancelWorkflow(this.id); }
@Override public Void execute() throws Throwable { // cancel the workflow workflowService.cancelWorkflow(workflowInstanceId); return null; } });
@Override public Void execute() throws Throwable { // cancel the workflow workflowService.cancelWorkflow(workflowInstanceId); return null; } });
private Invitation cancelModeratedInvitation(WorkflowTask startTask) { ModeratedInvitation invitation = getModeratedInvitation(startTask.getPath().getId()); String currentUserName = this.authenticationService.getCurrentUserName(); if (!AuthenticationUtil.isRunAsUserTheSystemUser()) { if (false == currentUserName.equals(invitation.getInviteeUserName())) { checkManagerRole(currentUserName, invitation.getResourceType(), invitation.getResourceName()); } } // Only proceed with the cancel if the site still exists (the site may have been deleted and invitations may be // getting cancelled in the background) if (this.siteService.getSite(invitation.getResourceName()) != null) { workflowService.cancelWorkflow(invitation.getInviteId()); } return invitation; }
private Invitation cancelModeratedInvitation(WorkflowTask startTask) { ModeratedInvitation invitation = getModeratedInvitation(startTask.getPath().getId()); String currentUserName = this.authenticationService.getCurrentUserName(); if (!AuthenticationUtil.isRunAsUserTheSystemUser()) { if (false == currentUserName.equals(invitation.getInviteeUserName())) { checkManagerRole(currentUserName, invitation.getResourceType(), invitation.getResourceName()); } } // Only proceed with the cancel if the site still exists (the site may have been deleted and invitations may be // getting cancelled in the background) if (this.siteService.getSite(invitation.getResourceName()) != null) { workflowService.cancelWorkflow(invitation.getInviteId()); } return invitation; }
workflowService.cancelWorkflow(workflowId); out.println("workflow " + workflowId + " cancelled.");
workflowService.cancelWorkflow(workflowId); out.println("workflow " + workflowId + " cancelled.");