11-08-2010 03:20 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="scwf:helloWorldUI">
<start-state name="start">
<task name="scwf:submitHelloWorldTask" />
<transition name="" to="hello"></transition>
</start-state>
<node name="hello">
<transition name="" to="end1">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="scwf_helloName" access="read"/>
<expression>
logger.log("Hello, " + scwf_helloName + "!");
</expression>
</script>
</action>
</transition>
</node>
<end-state name="end1"></end-state>
</process-definition><?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="scwf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Workflow Model</description>
<author>Optaros</author>
<version>1.0</version>
<!– Imports are required to allow references to definitions in other models –>
<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" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri=" http://www.someco.com/model/workflow/1.0" prefix="scwf" />
</namespaces>
<types>
<type name="scwf:submitHelloWorldTask">
<parent>bpm:startTask</parent>
<properties>
<property name="scwf:helloName">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>true</multiple>
</property>
</properties>
</type>
</types>
</model>
#
# Hello World UI Workflow
#
# scWorkflowModel related strings
scwf_workflowmodel.type.scwf_submitHelloWorldTask.title=Start Hello World UI Workflow Erik
scwf_workflowmodel.type.scwf_submitHelloWorldTask.description=Submit a workflow that says hello in the log
scwf_workflowmodel.property.scwf_helloName.title=Name
scwf_workflowmodel.property.scwf_helloName.description=Say hello to this person
# processdefinition related strings
scwf_helloWorldUI.workflow.title=Hello World UI
scwf_helloWorldUI.workflow.description=A simple hello wo<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registration of new models –>
<bean id="someco.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/model/scModel.xml</value>
<value>alfresco/extension/model/scWorkflowModel.xml</value>
</list>
</property>
</bean>
<bean id="extension.workflowBootstrap" parent="workflowDeployer">
<property name="labels">
<list>
<value>alfresco.extension.scWorkflow</value>
</list>
</property>
</bean>
</beans>
11-09-2010 10:06 AM
11-16-2010 09:34 AM
Hi,
you probably miss configuration in web-client-config-custom.xml file. You should create such file and add to spring configuration in similar way as model. In this file you should define what should be visible on each process step.
Thanks,
smicyk
<types>
<type name="scwf:submitReviewTask">
<parent>bpm:startTask</parent>
<mandatory-aspects>
<aspect>scwf:thirdPartyReviewable</aspect>
</mandatory-aspects>
</type>
<type name="scwf:adminReview">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>read_package_item_actions</default>
</property>
</overrides>
</type>
<type name="scwf:revise">
<parent>bpm:workflowTask</parent>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
</overrides>
</type>
</types>
<aspects>
<aspect name="scwf:thirdPartyReviewable">
<title>Someco Third Party Reviewable</title>
<properties>
<property name="scwf:reviewerEmail">
<type>d:text</type>
<mandatory>false</mandatory>
<multiple>false</multiple>
</property>
</properties>
</aspect>
</aspects>protected String finishImpl(FacesContext context, String outcome){} method, and what I want is to asve it to the propertie that I defined.<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>sc:weable</aspect>
<aspect>cm:lockable</aspect>
<aspect>sc:ref</aspect>
<aspect>sc:place</aspect>
</mandatory-aspects>
</type>
<aspects>
<aspect name="sc:weable">
<title>Content Weable</title>
<properties>
<property name="sc:published">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</aspect>
<aspect name="sc:ref">
<title>Node reference</title>
<properties>
<property name="sc:referencia">
<type>d:noderef</type>
</property>
</properties>
</aspect>
<aspect name="sc:place">
<title>Place</title>
<properties>
<property name="sc:placename">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
</aspect>
</aspects>
protected String place;
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
super.finishImpl(context, outcome);
// add the selected aspect (the properties page after the wizard
// will allow us to set the properties)
QName aspectToAdd = Repository.resolveToQName(this.aspect);
this.getNodeService().addAspect(this.createdNode, aspectToAdd, null);
Map<QName,Serializable> test = getNodeService().getProperties(this.createdNode);
Set<QName> it = test.keySet();
for(QName s:it){//There is no property in this list with the name placename, but I already defined it in the model
if(s.getLocalName().equals("placename")){ //Does not work, it does not find it
test.put(s, this.getPlace());
}
}
getNodeService().setProperties(this.createdNode, test); //Update the properties of the model
return outcome;
}<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<h:panelGrid columns="2">
<h:outputText value="#{msg.aspect}: " />
<h:selectOneMenu value="#{WizardManager.bean.aspect}">
<f:selectItems value="#{WizardManager.bean.aspects}" />
</h:selectOneMenu>
<h:outputText value="Place:" />
<h:inputText value="#{WizardManager.bean.place}" />
</h:panelGrid>
11-17-2010 02:11 PM
<wizard name="createContent" managed-bean="CustomCreateContentWizard"
title-id="custom_create_content_wizard_title"
description-id="create_content_desc"
icon="/images/icons/new_content_large.gif">
<step name="details" title-id="details" description-id="create_content_step1_desc">
<page path="/jsp/content/create-content-wizard/details.jsp"
title-id="create_content_step1_title"
description-id="create_content_step1_desc"
instruction-id="default_instruction" />
</step>
<step name="content" title-id="enter_content" description-id="create_content_step2_desc">
<condition if="#{CreateContentWizard.mimeType == 'text/html'}">
<page path="/jsp/content/create-content-wizard/create-html.jsp"
title-id="create_content_step2_title"
description-id="create_content_step2_desc"
instruction-id="default_instruction" />
</condition>
<condition if="#{CreateContentWizard.mimeType == 'text/xml'}">
<page path="/jsp/content/create-content-wizard/create-xml.jsp"
title-id="create_content_step2_title"
description-id="create_content_step2_desc"
instruction-id="default_instruction" />
</condition>
<!– Default to the inline text editor –>
<page path="/jsp/content/create-content-wizard/create-text.jsp"
title-id="create_content_step2_title"
description-id="create_content_step2_desc"
instruction-id="default_instruction" />
</step>
<step name="aspect" title-id="select_aspect" description-id="create_content_step3_desc">
<page path="/jsp/extension/wizards/custom-content-wizard/add-aspect.jsp"
title-id="create_content_step3_title"
description-id="create_content_step3_desc"
instruction-id="default_instruction" />
</step>
<step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp"
title-id="summary"
description-id="summary_desc"
instruction-id="content_finish_instruction" />
</step>
</wizard><type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>sc:weable</aspect>
</mandatory-aspects>
</type>
<aspect name="sc:weable">
<title>Content Weable</title>
<properties>
<property name="sc:place">
<type>d:text</type>
<default></default>
</property>
<property name="sc:published">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</aspect>
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
super.finishImpl(context, outcome);
ServiceRegistry serviceRegistry = Repository.getServiceRegistry(context);
PermissionService perService = serviceRegistry.getPermissionService();
if(validateUserGroup()){
perService.deletePermissions(createdNode);
perService.setInheritParentPermissions(createdNode, false);
perService.setPermission(createdNode, Constants.GRUPO_COMERCIAL, PermissionService.COORDINATOR, true);
perService.setPermission(createdNode, Constants.GRUPO_ADMINISTRADOR, PermissionService.EDITOR, true);
}
// add the selected aspect (the properties page after the wizard
// will allow us to set the properties)
QName aspectToAdd = Repository.resolveToQName(this.aspect);
//QName aspectToAdd2 = Repository.resolveToQName("sc:place");
this.getNodeService().addAspect(this.createdNode, aspectToAdd, null);
//this.getNodeService().addAspect(this.createdNode, aspectToAdd2, null);
Map<QName,Serializable> test = getNodeService().getProperties(this.createdNode);
Set<QName> it = test.keySet();
for(QName s:it){
if(s.getLocalName().equals("published")){
test.put(s, this.isPublicar());
}
if(s.getLocalName().equals("place")){
test.put(s, this.getPlace());
}
}
getNodeService().setProperties(this.createdNode, test);
return outcome;
}Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.