mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4252 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4294 . svn revert root\common\common.xml svn resolved root\projects\repository\config\alfresco\script-services-context.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4634 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
7
config/alfresco/extension/lifecycle-messages.properties
Normal file
7
config/alfresco/extension/lifecycle-messages.properties
Normal file
@@ -0,0 +1,7 @@
|
||||
# For Lifecycle Workflow Example
|
||||
wfl_lifecycleapproval.workflow.title=Lifecycle Review & Approve
|
||||
wfl_lifecycleapproval.workflow.description=Lifecycle Review & Approval workflow (Auto updates document status)
|
||||
wfl_lifecycleapproval.node.review.transition.reject.title=Reject
|
||||
wfl_lifecycleapproval.node.review.transition.reject.description=Reject
|
||||
wfl_lifecycleapproval.node.review.transition.approve.title=Approve
|
||||
wfl_lifecycleapproval.node.review.transition.approve.description=Approve
|
@@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="lifecycle.workflowBootstrap" parent="workflowDeployer">
|
||||
<property name="workflowDefinitions">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="engineId">jbpm</prop>
|
||||
<prop key="location">alfresco/extension/lifecycle_processdefinition.xml</prop>
|
||||
<prop key="mimetype">text/xml</prop>
|
||||
<prop key="redeploy">false</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
<property name="models">
|
||||
<list>
|
||||
<value>alfresco/extension/lifecycleModel.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="labels">
|
||||
<list>
|
||||
<value>alfresco/extension/lifecycle-messages</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
53
config/alfresco/extension/lifecycleModel.xml
Normal file
53
config/alfresco/extension/lifecycleModel.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<model name="wfl:workflowlifecyclemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
|
||||
<!-- Optional meta-data about the model -->
|
||||
<description>Workflow Lifecycle Model</description>
|
||||
<author></author>
|
||||
<version>1.0</version>
|
||||
|
||||
<!-- Imports are required to allow references to definitions in other models -->
|
||||
<imports>
|
||||
<!-- Import Alfresco Dictionary Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
|
||||
</imports>
|
||||
|
||||
<namespaces>
|
||||
<namespace uri="wfl.model" prefix="wfl" />
|
||||
</namespaces>
|
||||
|
||||
<constraints>
|
||||
<constraint name="wfl:status" type="LIST">
|
||||
<parameter name="allowedValues">
|
||||
<list>
|
||||
<value>Draft</value>
|
||||
<value>In Review</value>
|
||||
<value>Approved</value>
|
||||
</list>
|
||||
</parameter>
|
||||
</constraint>
|
||||
</constraints>
|
||||
|
||||
<aspects>
|
||||
|
||||
<!-- Status property is used to manage workflow approval -->
|
||||
<aspect name="wfl:status">
|
||||
<title>Status</title>
|
||||
<properties>
|
||||
<property name="wfl:status">
|
||||
<title>Status</title>
|
||||
<type>d:text</type>
|
||||
<default>Draft</default>
|
||||
<constraints>
|
||||
<constraint ref="wfl:status" />
|
||||
</constraints>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
|
||||
</aspects>
|
||||
|
||||
</model>
|
121
config/alfresco/extension/lifecycle_processdefinition.xml
Normal file
121
config/alfresco/extension/lifecycle_processdefinition.xml
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wfl:lifecycleapproval">
|
||||
|
||||
<swimlane name="initiator" />
|
||||
|
||||
<start-state name="start">
|
||||
<task name="wf:submitReviewTask" swimlane="initiator" />
|
||||
|
||||
<event type="node-leave">
|
||||
<!-- Call script once the workflow package exists i.e. on node-leave -->
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<!-- Apply the Workflow Lifecycle Aspect (wfl:status) if not set already. Note: The default wfl:status property is draft -->
|
||||
<script>
|
||||
for (var i = 0; i < bpm_package.children.length; i++)
|
||||
{
|
||||
if (!bpm_package.children[i].hasAspect("wfl:status"))
|
||||
{
|
||||
bpm_package.children[i].addAspect("wfl:status");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
|
||||
<transition name="" to="review" />
|
||||
</start-state>
|
||||
|
||||
<swimlane name="reviewer">
|
||||
<assignment actor-id="#{bpm_assignee.properties['cm:userName']}" />
|
||||
</swimlane>
|
||||
|
||||
<task-node name="review">
|
||||
<event type="node-enter">
|
||||
<!-- Update the status to In Review when we enter this task -->
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
for (var i = 0; i < bpm_package.children.length; i++)
|
||||
{
|
||||
bpm_package.children[i].properties["wfl:status"] = "In Review";
|
||||
bpm_package.children[i].save();
|
||||
}
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
|
||||
<task name="wf:reviewTask" swimlane="reviewer">
|
||||
<event type="task-create">
|
||||
<script>
|
||||
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
|
||||
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
|
||||
</script>
|
||||
</event>
|
||||
</task>
|
||||
|
||||
<transition name="reject" to="rejected" />
|
||||
<transition name="approve" to="approved" />
|
||||
</task-node>
|
||||
|
||||
<task-node name="rejected">
|
||||
<event type="node-enter">
|
||||
<!-- Update the status to Draft when we enter this task -->
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
for (var i = 0; i < bpm_package.children.length; i++)
|
||||
{
|
||||
bpm_package.children[i].properties["wfl:status"] = "Draft";
|
||||
bpm_package.children[i].save();
|
||||
}
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
|
||||
<task name="wf:rejectedTask" swimlane="initiator" />
|
||||
<transition name="" to="end" />
|
||||
</task-node>
|
||||
|
||||
<task-node name="approved">
|
||||
<event type="node-enter">
|
||||
<!-- Update the status to Approved when we enter this task -->
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
for (var i = 0; i < bpm_package.children.length; i++)
|
||||
{
|
||||
bpm_package.children[i].properties["wfl:status"] = "Approved";
|
||||
bpm_package.children[i].save();
|
||||
}
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
|
||||
<task name="wf:approvedTask" swimlane="initiator" />
|
||||
<transition name="" to="end" />
|
||||
</task-node>
|
||||
|
||||
<end-state name="end" />
|
||||
|
||||
<event type="process-end">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
if (cancelled)
|
||||
{
|
||||
for (var i = 0; i < bpm_package.children.length; i++)
|
||||
{
|
||||
if (bpm_package.children[0].hasAspect("wfl:status"))
|
||||
{
|
||||
bpm_package.children[i].properties["wfl:status"] = "Draft";
|
||||
bpm_package.children[i].save();
|
||||
}
|
||||
}
|
||||
if (logger.isLoggingEnabled()) logger.log("Workflow cancelled, status reset to Draft");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isLoggingEnabled()) logger.log("Workflow completed");
|
||||
}
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
|
||||
</process-definition>
|
@@ -3,7 +3,7 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<bean id="sample.workflowBootstrap" parent="workflowDeployer">
|
||||
<bean id="parallel.workflowBootstrap" parent="workflowDeployer">
|
||||
<property name="workflowDefinitions">
|
||||
<list>
|
||||
<props>
|
||||
@@ -19,6 +19,8 @@
|
||||
<!-- NOTE: The above process definition relies on the default workflowModel.xml -->
|
||||
<!-- which is already registered during Alfresco startup. -->
|
||||
<!-- See bootstrap-context.xml (workflowBootstrap). -->
|
||||
|
||||
<!-- <value>alfresco/workflow/workflowModel.xml</value> -->
|
||||
</list>
|
||||
</property>
|
||||
<property name="labels">
|
||||
@@ -26,6 +28,8 @@
|
||||
<!-- NOTE: The above process definition relies on the default workflow-messages.properties -->
|
||||
<!-- which is already registered during Alfresco startup -->
|
||||
<!-- See bootstrap-context.xml (workflowBootstrap). -->
|
||||
|
||||
<!-- <value>alfresco/workflow/workflow-messages</value> -->
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
@@ -6,5 +6,5 @@ coci_service.err_not_owner=This user is not the owner of the working copy and ca
|
||||
coci_service.err_workingcopy_checkout=A working copy can not be checked out.
|
||||
coci_service.err_not_authenticated=Can not find the currently authenticated user details required by the CheckOutCheckIn service.
|
||||
coci_service.err_workingcopy_has_no_mimetype=Working copy node ({0}) has no mimetype
|
||||
|
||||
coci_service.err_already_checkedout=This node is already checked out.
|
||||
coci_service.discussion_for={0} discussion
|
@@ -49,6 +49,15 @@ ok> use definition [<workflowDefId>]
|
||||
<workflowDefId> is ommited, the currently selected workflow definition
|
||||
is shown.
|
||||
|
||||
ok> undeploy definition <workflowDefId>
|
||||
|
||||
Undeploy the latest version of the workflow definition identified by
|
||||
<workflowDefId>. This will also terminate and remove all "in-flight"
|
||||
workflows associated with the definition.
|
||||
|
||||
If multiple versions of the definition exist, you will have to undeploy
|
||||
each in turn to remove the definition completely.
|
||||
|
||||
##
|
||||
## Variable Commands
|
||||
##
|
||||
@@ -112,10 +121,11 @@ ok> start [<varName[=varValue>]]*
|
||||
|
||||
start bpm:assignee=david wf:predefined
|
||||
|
||||
ok> show workflows
|
||||
ok> show workflows [all]
|
||||
|
||||
Display the list of active workflows for the currently selected workflow
|
||||
definition.
|
||||
definition. Or, display the list of all workflows when used with additional
|
||||
keyword 'all'.
|
||||
|
||||
ok> use workflow <workflowId>
|
||||
|
||||
@@ -149,6 +159,10 @@ ok> delete workflow <workflowId>
|
||||
|
||||
Force deletion of the specified <workflowId>.
|
||||
|
||||
ok> delete all workflows
|
||||
|
||||
Force deletion of all "in-flight" workflows. Use with care!
|
||||
|
||||
##
|
||||
## Task Commands
|
||||
##
|
||||
@@ -176,7 +190,7 @@ ok> update task <taskid> [<varName[=varValue>]]*
|
||||
Update the state of the specified <taskId>. Task properties are provided as
|
||||
name/value pairs or references to pre-defined variables.
|
||||
|
||||
<varName> variable name
|
||||
<varName> variable name
|
||||
[*] if specified, define a collection
|
||||
<varValue> variable value (comma-seperate to specify a list of values)
|
||||
|
||||
|
@@ -36,5 +36,11 @@
|
||||
<ref bean="policyTransactionHandlerFactory"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="policyRegistration" abstract="true" init-method="register">
|
||||
<property name="policyComponent">
|
||||
<ref bean="policyComponent" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -82,26 +82,6 @@
|
||||
|
||||
<alias name="namespaceService" alias="NamespaceService"/>
|
||||
|
||||
<!--
|
||||
<bean id="NamespaceService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.service.namespace.NamespaceService</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="namespaceService"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="NamespaceService_transaction"/>
|
||||
<idref local="AuditMethodInterceptor"/>
|
||||
<idref local="exceptionTranslator"/>
|
||||
<idref bean="NamespaceService_security"/>
|
||||
<idref local="NamespaceService_descriptor"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="NamespaceService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
@@ -130,26 +110,6 @@
|
||||
|
||||
<alias name="dictionaryService" alias="DictionaryService"/>
|
||||
|
||||
<!--
|
||||
<bean id="DictionaryService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.service.cmr.dictionary.DictionaryService</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="dictionaryService"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="DictionaryService_transaction"/>
|
||||
<idref local="AuditMethodInterceptor"/>
|
||||
<idref local="exceptionTranslator"/>
|
||||
<idref bean="DictionaryService_security"/>
|
||||
<idref local="DictionaryService_descriptor"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="DictionaryService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
@@ -260,25 +220,6 @@
|
||||
|
||||
<alias name="mimetypeService" alias="MimetypeService"/>
|
||||
|
||||
<!--
|
||||
<bean id="MimetypeService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.service.cmr.repository.MimetypeService</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="mimetypeService"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="AuditMethodInterceptor"/>
|
||||
<idref local="exceptionTranslator"/>
|
||||
<idref bean="MimetypeService_security"/>
|
||||
<idref local="MimetypeService_descriptor"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="MimetypeService_descriptor" parent="AlfrescoServiceDescriptor">
|
||||
<property name="interface">
|
||||
<value>org.alfresco.service.cmr.repository.MimetypeService</value>
|
||||
|
@@ -210,7 +210,13 @@
|
||||
</property>
|
||||
<property name="authenticationService">
|
||||
<ref bean="authenticationServiceImpl" />
|
||||
</property>
|
||||
</property>
|
||||
<property name="maxPermissionCheckTimeMillis">
|
||||
<value>${lucene.query.maxPermissionCheckTimeMillis}</value>
|
||||
</property>
|
||||
<property name="maxPermissionChecks">
|
||||
<value>${lucene.query.maxPermissionChecks}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Link up after method call security -->
|
||||
|
@@ -20,6 +20,14 @@ index.recovery.mode=VALIDATE
|
||||
# Lucene configuration #
|
||||
# #################### #
|
||||
#
|
||||
# The maximum time spent pruning query results
|
||||
#
|
||||
lucene.query.maxPermissionCheckTimeMillis=10000
|
||||
#
|
||||
# The maximum number of results to perform permission checks against
|
||||
#
|
||||
lucene.query.maxPermissionChecks=1000
|
||||
#
|
||||
# Millisecond threshold for text transformations
|
||||
# Slower transformers will force the text extraction to be asynchronous
|
||||
#
|
||||
|
@@ -34,7 +34,7 @@
|
||||
<property name="serviceRegistry">
|
||||
<ref bean="ServiceRegistry"/>
|
||||
</property>
|
||||
</bean>
|
||||
</bean>
|
||||
|
||||
<bean id="avmScript" parent="baseScriptImplementation" class="org.alfresco.repo.jscript.AVM">
|
||||
<property name="scriptName">
|
||||
|
Reference in New Issue
Block a user