diff --git a/config/alfresco/workflow/invitation-add-direct.bpmn20.xml b/config/alfresco/workflow/invitation-add-direct.bpmn20.xml
index e5f5545099..3df81b2a49 100644
--- a/config/alfresco/workflow/invitation-add-direct.bpmn20.xml
+++ b/config/alfresco/workflow/invitation-add-direct.bpmn20.xml
@@ -15,28 +15,8 @@
-
-
-
-
-
-
-
- if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
-
-
-
-
-
-
- ${initiator.exists() ? initiator.properties.userName : 'admin'}
-
-
-
+
-
-
diff --git a/source/java/org/alfresco/repo/invitation/InvitationServiceImpl.java b/source/java/org/alfresco/repo/invitation/InvitationServiceImpl.java
index 9a79ae4a4b..bb79673be0 100644
--- a/source/java/org/alfresco/repo/invitation/InvitationServiceImpl.java
+++ b/source/java/org/alfresco/repo/invitation/InvitationServiceImpl.java
@@ -1525,7 +1525,10 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
logger.debug("Transitioning Invite workflow task...");
try
{
- workflowService.endTask(startTask.getId(), null);
+ if (startTask != null && startTask.getState() != WorkflowTaskState.COMPLETED)
+ {
+ workflowService.endTask(startTask.getId(), null);
+ }
}
catch (RuntimeException err)
{