mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Refactor CMIS Dictionary part 2
- further simplification of CMISDictionaryService and fixup fallout - added logging - consolidate & fix property definition handling (only one definition per property) - include support for aspect properties - fix property.isInherited - open up the door for types outside of CMIS doc, folder, rel & policy Dictionary Service - add isOverride() to PropertyDefinition Invite Workflows - ensure they create their own namespace for new types/props - NOTE: the previous way uses a hole in the DictinaryService which has been there unnoticed for over 4 years, till now. At some point, the hole will be filled in. Tests pass for CMIS REST / Web Services and Query. Tests pass for Invitation Service. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,69 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Moderated invitation workflow -->
|
||||
<!-- Moderated invitation workflow -->
|
||||
|
||||
<model name="wf:invitation-moderated-workflow-model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
<model name="imwf:invitation-moderated-workflow-model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
|
||||
<imports>
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
||||
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
|
||||
<import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf" />
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
|
||||
</imports>
|
||||
<imports>
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
||||
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
|
||||
<import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf" />
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
|
||||
</imports>
|
||||
|
||||
<types>
|
||||
<type name="wf:moderatedInvitationSubmitTask">
|
||||
<parent>bpm:startTask</parent>
|
||||
<mandatory-aspects>
|
||||
<aspect>bpm:assignee</aspect>
|
||||
<aspect>bpm:groupAssignee</aspect>
|
||||
<aspect>wf:moderatedInvitationStats</aspect>
|
||||
</mandatory-aspects>
|
||||
</type>
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/model/workflow/invite/moderated/1.0" prefix="imwf" />
|
||||
</namespaces>
|
||||
|
||||
<type name="wf:moderatedInvitationReviewTask">
|
||||
<parent>bpm:workflowTask</parent>
|
||||
<properties>
|
||||
<property name="wf:reviewComments">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="cm:owner">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
</properties>
|
||||
|
||||
<mandatory-aspects>
|
||||
<aspect>bpm:groupAssignee</aspect>
|
||||
<aspect>cm:ownable</aspect>
|
||||
<aspect>wf:moderatedInvitationStats</aspect>
|
||||
</mandatory-aspects>
|
||||
<types>
|
||||
<type name="imwf:moderatedInvitationSubmitTask">
|
||||
<parent>bpm:startTask</parent>
|
||||
<mandatory-aspects>
|
||||
<aspect>bpm:assignee</aspect>
|
||||
<aspect>bpm:groupAssignee</aspect>
|
||||
<aspect>imwf:moderatedInvitationStats</aspect>
|
||||
</mandatory-aspects>
|
||||
</type>
|
||||
|
||||
<type name="imwf:moderatedInvitationReviewTask">
|
||||
<parent>bpm:workflowTask</parent>
|
||||
<properties>
|
||||
<property name="imwf:reviewComments">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
</properties>
|
||||
|
||||
<mandatory-aspects>
|
||||
<aspect>bpm:groupAssignee</aspect>
|
||||
<aspect>cm:ownable</aspect>
|
||||
<aspect>imwf:moderatedInvitationStats</aspect>
|
||||
</mandatory-aspects>
|
||||
|
||||
</type>
|
||||
|
||||
</types>
|
||||
|
||||
<aspects>
|
||||
<aspect name="imwf:moderatedInvitationStats">
|
||||
<properties>
|
||||
<property name="imwf:inviteeUserName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="imwf:resourceType">
|
||||
<type>d:text</type>
|
||||
<default>WEB_SITE</default>
|
||||
</property>
|
||||
<property name="imwf:resourceName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="imwf:inviteeRole">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="imwf:inviteeComments">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
</aspects>
|
||||
|
||||
</type>
|
||||
|
||||
</types>
|
||||
|
||||
<aspects>
|
||||
<aspect name="wf:moderatedInvitationStats">
|
||||
<properties>
|
||||
<property name="wf:inviteeUserName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:resourceType">
|
||||
<type>d:text</type>
|
||||
<default>WEB_SITE</default>
|
||||
</property>
|
||||
<property name="wf:resourceName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeRole">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeComments">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
</aspects>
|
||||
|
||||
|
||||
</model>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<!-- Moderated Invitation Workflow -->
|
||||
|
||||
<process-definition xmlns="urn:jbpm.org:jpdl-3.1"
|
||||
name="wf:invitation-moderated">
|
||||
name="imwf:invitation-moderated">
|
||||
|
||||
<swimlane name="initiator">
|
||||
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
|
||||
@@ -12,7 +12,7 @@
|
||||
</swimlane>
|
||||
|
||||
<start-state name="start">
|
||||
<task name="wf:moderatedInvitationSubmitTask" swimlane="initiator" />
|
||||
<task name="imwf:moderatedInvitationSubmitTask" swimlane="initiator" />
|
||||
<transition to="review" name=""></transition>
|
||||
</start-state>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
</swimlane>
|
||||
|
||||
<task-node name="review">
|
||||
<task name="wf:moderatedInvitationReviewTask" swimlane="approver" />
|
||||
<task name="imwf:moderatedInvitationReviewTask" swimlane="approver" />
|
||||
<transition name="reject" to="rejected">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
<variable name="wf_reviewer" access="write" />
|
||||
<variable name="imwf_reviewer" access="write" />
|
||||
<expression>person.properties.userName</expression>
|
||||
</script>
|
||||
</action>
|
||||
@@ -36,7 +36,7 @@
|
||||
<transition name="approve" to="approved">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
<variable name="wf_reviewer" access="write" />
|
||||
<variable name="imwf_reviewer" access="write" />
|
||||
<expression>person.properties.userName</expression>
|
||||
</script>
|
||||
</action>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<!-- Nominated Invitation Workflow Model -->
|
||||
|
||||
<model name="wf:invite-workflow-model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
<model name="inwf:invite-workflow-model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
|
||||
<imports>
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
||||
@@ -10,49 +10,53 @@
|
||||
<import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf" />
|
||||
</imports>
|
||||
|
||||
<namespaces>
|
||||
<namespace uri="http://www.alfresco.org/model/workflow/invite/nominated/1.0" prefix="inwf" />
|
||||
</namespaces>
|
||||
|
||||
<types>
|
||||
|
||||
<!-- Custom Tasks -->
|
||||
<type name="wf:inviteToSiteTask">
|
||||
<type name="inwf:inviteToSiteTask">
|
||||
<parent>bpm:startTask</parent>
|
||||
<properties>
|
||||
<property name="wf:serverPath">
|
||||
<property name="inwf:serverPath">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:acceptUrl">
|
||||
<property name="inwf:acceptUrl">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:rejectUrl">
|
||||
<property name="inwf:rejectUrl">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteTicket">
|
||||
<property name="inwf:inviteTicket">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviterUserName">
|
||||
<property name="inwf:inviterUserName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeUserName">
|
||||
<property name="inwf:inviteeUserName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeEmail">
|
||||
<property name="inwf:inviteeEmail">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeFirstName">
|
||||
<property name="inwf:inviteeFirstName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeLastName">
|
||||
<property name="inwf:inviteeLastName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeGenPassword">
|
||||
<property name="inwf:inviteeGenPassword">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:resourceType">
|
||||
<property name="inwf:resourceType">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:resourceName">
|
||||
<property name="inwf:resourceName">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="wf:inviteeRole">
|
||||
<property name="inwf:inviteeRole">
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
</properties>
|
||||
@@ -61,15 +65,15 @@
|
||||
</mandatory-aspects>
|
||||
</type>
|
||||
|
||||
<type name="wf:invitePendingTask">
|
||||
<type name="inwf:invitePendingTask">
|
||||
<parent>bpm:workflowTask</parent>
|
||||
</type>
|
||||
|
||||
<type name="wf:acceptInviteTask">
|
||||
<type name="inwf:acceptInviteTask">
|
||||
<parent>bpm:workflowTask</parent>
|
||||
</type>
|
||||
|
||||
<type name="wf:rejectInviteTask">
|
||||
<type name="inwf:rejectInviteTask">
|
||||
<parent>bpm:workflowTask</parent>
|
||||
</type>
|
||||
|
||||
|
@@ -3,32 +3,32 @@
|
||||
<!-- Nominated invitation -->
|
||||
|
||||
<process-definition xmlns="urn:jbpm.org:jpdl-3.1"
|
||||
name="wf:invitation-nominated">
|
||||
name="inwf:invitation-nominated">
|
||||
|
||||
<swimlane name="initiator"/>
|
||||
|
||||
<start-state name="start">
|
||||
|
||||
<task name="wf:inviteToSiteTask" swimlane="initiator" />
|
||||
<task name="inwf:inviteToSiteTask" swimlane="initiator" />
|
||||
|
||||
<transition name="sendInvite" to="invitePending">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
var workflowId = workflowinstanceid;
|
||||
var inviterPerson = people.getPerson(wf_inviterUserName);
|
||||
var inviteePerson = people.getPerson(wf_inviteeUserName);
|
||||
var site = siteService.getSite(wf_resourceName);
|
||||
var inviterPerson = people.getPerson(inwf_inviterUserName);
|
||||
var inviteePerson = people.getPerson(inwf_inviteeUserName);
|
||||
var site = siteService.getSite(inwf_resourceName);
|
||||
var siteName = site.shortName;
|
||||
if (site.title.length() > 0)
|
||||
{
|
||||
siteName = site.title;
|
||||
}
|
||||
var params = "?inviteId=" + workflowId +
|
||||
"&inviteeUserName=" + wf_inviteeUserName +
|
||||
"&siteShortName=" + wf_resourceName +
|
||||
"&inviteTicket=" + wf_inviteTicket;
|
||||
var acceptLink = wf_serverPath + wf_acceptUrl + params;
|
||||
var rejectLink = wf_serverPath + wf_rejectUrl + params;
|
||||
"&inviteeUserName=" + inwf_inviteeUserName +
|
||||
"&siteShortName=" + inwf_resourceName +
|
||||
"&inviteTicket=" + inwf_inviteTicket;
|
||||
var acceptLink = inwf_serverPath + inwf_acceptUrl + params;
|
||||
var rejectLink = inwf_serverPath + inwf_rejectUrl + params;
|
||||
var mail = actions.create("mail");
|
||||
mail.parameters.from = inviterPerson.properties["cm:email"];
|
||||
mail.parameters.to = inviteePerson.properties["cm:email"];
|
||||
@@ -41,9 +41,9 @@
|
||||
args["inviteePersonRef"] = inviteePerson.nodeRef.toString();
|
||||
args["inviterPersonRef"] = inviterPerson.nodeRef.toString();
|
||||
args["siteName"] = siteName;
|
||||
args["inviteeSiteRole"] = wf_inviteeRole;
|
||||
args["inviteeUserName"] = wf_inviteeUserName;
|
||||
args["inviteeGenPassword"] = wf_inviteeGenPassword;
|
||||
args["inviteeSiteRole"] = inwf_inviteeRole;
|
||||
args["inviteeUserName"] = inwf_inviteeUserName;
|
||||
args["inviteeGenPassword"] = inwf_inviteeGenPassword;
|
||||
args["acceptLink"] = acceptLink;
|
||||
args["rejectLink"] = rejectLink;
|
||||
var mail_text = inviteePerson.processTemplate(template, args);
|
||||
@@ -62,7 +62,7 @@
|
||||
</swimlane>
|
||||
|
||||
<task-node name="invitePending">
|
||||
<task name="wf:invitePendingTask" swimlane="assignee" />
|
||||
<task name="inwf:invitePendingTask" swimlane="assignee" />
|
||||
<transition name="accept" to="inviteAccepted">
|
||||
<action class="org.alfresco.repo.invitation.site.AcceptInviteAction"/>
|
||||
</transition>
|
||||
@@ -75,12 +75,12 @@
|
||||
</task-node>
|
||||
|
||||
<task-node name="inviteAccepted">
|
||||
<task name="wf:acceptInviteTask" swimlane="initiator" />
|
||||
<task name="inwf:acceptInviteTask" swimlane="initiator" />
|
||||
<transition name="end" to="end"/>
|
||||
</task-node>
|
||||
|
||||
<task-node name="inviteRejected">
|
||||
<task name="wf:rejectInviteTask" swimlane="initiator" />
|
||||
<task name="inwf:rejectInviteTask" swimlane="initiator" />
|
||||
<transition name="end" to="end"/>
|
||||
</task-node>
|
||||
|
||||
|
Reference in New Issue
Block a user