Merged V3.2 to HEAD:

16713: ETHREEOH-2379 deployment missing crypto libraries.
    16722: ETHREEOH-2798 - java.lang.NullPointerException while deleting a folder node with emptyTranslation
    16752: ETHREEOH-2946 - Release a test server from inside an Approve/Reject task
    16796: ETHREEOH-1841 - MBean error when running in a WebSphere cluster
    16920: ETHREEOH-2796 - Word 97 To Text transformation fails
    16955: Merge V3.1 to V3.2
        14275: Invitation change for ETHREEOH-1456, Missed change from check in 14222.
        14222: ETHREEOH-1456 - accepting a rejected invitation.
    16963: ETHREEOH-3029 - Strange defaltOnLoadListsner in hibernate-context.xml

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2009-10-15 14:03:12 +00:00
parent 330a50d85c
commit 1748e2b503
8 changed files with 79 additions and 18 deletions

View File

@@ -332,12 +332,37 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
* Nominated invitation complete the wf:invitePendingTask along the
* 'accept' transition because the invitation has been accepted
*/
InviteHelper
.completeInviteTask(
invitationId,
WorkflowModelNominatedInvitation.WF_INVITE_TASK_INVITE_PENDING,
WorkflowModelNominatedInvitation.WF_TRANSITION_ACCEPT,
this.workflowService);
// create workflow task query
WorkflowTaskQuery wfTaskQuery = new WorkflowTaskQuery();
// set the given invite ID as the workflow process ID in the workflow query
wfTaskQuery.setProcessId(invitationId);
// find incomplete invite workflow tasks with given task name
wfTaskQuery.setActive(Boolean.TRUE);
wfTaskQuery.setTaskState(WorkflowTaskState.IN_PROGRESS);
wfTaskQuery.setTaskName(WorkflowModelNominatedInvitation.WF_INVITE_TASK_INVITE_PENDING);
// set process name to "wf:invite" so that only
// invite workflow instances are considered by this query
wfTaskQuery.setProcessName(WorkflowModelNominatedInvitation.WF_PROCESS_INVITE);
// query for invite workflow tasks with the constructed query
List<WorkflowTask> wf_invite_tasks = workflowService
.queryTasks(wfTaskQuery);
if(wf_invite_tasks.size() == 0)
{
Object objs[] = { invitationId };
throw new InvitationExceptionUserError("invitation.invite.already_finished", objs);
}
// end all tasks found with this name
for (WorkflowTask workflowTask : wf_invite_tasks)
{
workflowService.endTask(workflowTask.id, WorkflowModelNominatedInvitation.WF_TRANSITION_ACCEPT);
}
return invitation;
}
@@ -406,12 +431,36 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
* Nominated invitation complete the wf:invitePendingTask along the
* 'reject' transition because the invitation has been rejected
*/
InviteHelper
.completeInviteTask(
invitationId,
WorkflowModelNominatedInvitation.WF_INVITE_TASK_INVITE_PENDING,
WorkflowModelNominatedInvitation.WF_TRANSITION_REJECT,
this.workflowService);
// create workflow task query
WorkflowTaskQuery wfTaskQuery = new WorkflowTaskQuery();
// set the given invite ID as the workflow process ID in the workflow query
wfTaskQuery.setProcessId(invitationId);
// find incomplete invite workflow tasks with given task name
wfTaskQuery.setActive(Boolean.TRUE);
wfTaskQuery.setTaskState(WorkflowTaskState.IN_PROGRESS);
wfTaskQuery.setTaskName(WorkflowModelNominatedInvitation.WF_INVITE_TASK_INVITE_PENDING);
// set process name to "wf:invite" so that only
// invite workflow instances are considered by this query
wfTaskQuery.setProcessName(WorkflowModelNominatedInvitation.WF_PROCESS_INVITE);
// query for invite workflow tasks with the constructed query
List<WorkflowTask> wf_invite_tasks = workflowService
.queryTasks(wfTaskQuery);
if(wf_invite_tasks.size() == 0)
{
Object objs[] = { invitationId };
throw new InvitationExceptionUserError("invitation.invite.already_finished", objs);
}
// end all tasks found with this name
for (WorkflowTask workflowTask : wf_invite_tasks)
{
workflowService.endTask(workflowTask.id, WorkflowModelNominatedInvitation.WF_TRANSITION_REJECT);
}
return invitation;
}

View File

@@ -260,6 +260,7 @@ public class InviteHelper
List<WorkflowTask> wf_invite_tasks = workflowService
.queryTasks(wfTaskQuery);
// end all tasks found with this name
for (WorkflowTask workflowTask : wf_invite_tasks)
{

View File

@@ -2313,6 +2313,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
{
Long childNodeId = oldChildNodePair.getFirst();
NodeRef childNodeRef = oldChildNodePair.getSecond();
if (nodeDaoService.getNodeRefStatus(childNodeRef).isDeleted())
{
//Node has been already deleted.
continue;
}
QName childNodeTypeQName = nodeDaoService.getNodeType(childNodeId);
Set<QName> childNodeAspectQNames = nodeDaoService.getNodeAspects(childNodeId);
Pair<Long, ChildAssociationRef> oldParentAssocPair = nodeDaoService.getPrimaryParentAssoc(childNodeId);