cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco content model - default value

fararjeh
Champ in-the-making
Champ in-the-making
Hi


I need default value for property in workdesk , I set default tag in Alfresco content But in workdesk not set default value :


<property name="isJob">
   <title>is Job</title>
   <type>d:boolean</type>
   <mandatory enforced='true'>true</mandatory>
   <default>false</default>
</property>            


How I can set default value for property in workdesk ?
11 REPLIES 11

d_evil
Champ in-the-making
Champ in-the-making
Hi,

by default that value will be handled during creation of objects.

Which version of Alfresco, and which binding do you use?
Binding can be found in owbootstrap.xml <AtomPub> or <WSDL>, important is the URL is contained there.

Default values are provided through CMIS, and should be available in Workdesk.

fararjeh
Champ in-the-making
Champ in-the-making
Hi,

Alfresco version is  4.1.5 and I am using CMIS Binding .



d_evil
Champ in-the-making
Champ in-the-making
Hi,

I did created a model with default values, using your example and it is working.
For CMIS Binding I used <AtomPub>http://localhost:8080/alfresco/cmisatom</AtomPub>.

What are you doing?
More important where do you assume to see that default value definition?

fararjeh
Champ in-the-making
Champ in-the-making
Thanks D.evil , Now Its working , I changed CMIS Binding from web service to AtomPub but what the different between them in workdesk ?

fararjeh
Champ in-the-making
Champ in-the-making
When I select CMIS Binding 'http://localhost:8080/alfresco/cmisatom', The E-File does not work .



java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at com.wewebu.ow.server.ui.OwAppContext.handleRequest(OwAppContext.java:1129)
   at com.wewebu.ow.server.app.OwMainAppContext.handleRequest(OwMainAppContext.java:655)
   at com.wewebu.ow.server.ui.OwWebApplication.handleRequest(OwWebApplication.java:358)
   at org.apache.jsp.default41_jsp._jspService(default41_jsp.java:79)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at com.wewebu.ow.server.servlets.OwServletFilter.doFilter(OwServletFilter.java:57)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
Caused by: com.wewebu.ow.server.exceptions.OwInvalidOperationException: Invalid virtual folder!
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getVirtualFolder(OwStandardSemiVirtualFolderAdapter.java:165)
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getChildren(OwStandardSemiVirtualFolderAdapter.java:71)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISSemiVirtualFolderObject.getChilds(OwCMISSemiVirtualFolderObject.java:188)
   at com.wewebu.ow.server.dmsdialogs.views.OwObjectTreeView.createChildObjects(OwObjectTreeView.java:76)
   at com.wewebu.ow.server.ui.OwTreeView$OwTreeViewNode.createChilds(OwTreeView.java:287)
   at com.wewebu.ow.server.ui.OwTreeView$OwTreeViewNode.toggleExpand(OwTreeView.java:263)
   at com.wewebu.ow.server.ui.OwTreeView.navigate(OwTreeView.java:714)
   at com.wewebu.ow.server.dmsdialogs.views.OwObjectTreeViewEXTJS.navigate(OwObjectTreeViewEXTJS.java:834)
   at com.wewebu.ow.server.plug.owrecord.OwRecordDocument.openFolder(OwRecordDocument.java:426)
   at com.wewebu.ow.server.plug.owrecord.OwRecordDocument.onDispatch(OwRecordDocument.java:472)
   at com.wewebu.ow.server.app.OwMasterDocument.dispatch(OwMasterDocument.java:174)
   at com.wewebu.ow.server.app.OwMimeManager.delegateToMasterPlugin(OwMimeManager.java:1086)
   at com.wewebu.ow.server.app.OwMimeManager.onPluginEventHandler(OwMimeManager.java:1046)
   … 33 more
Caused by: java.lang.UnsupportedOperationException
   at java.util.Collections$UnmodifiableCollection.addAll(Collections.java:1085)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractTransientObject.addFilter(OwCMISAbstractTransientObject.java:117)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISBulkTransientObject.fetchObject(OwCMISBulkTransientObject.java:57)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISBulkTransientObject.retrieveProperties(OwCMISBulkTransientObject.java:49)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAlfrescoBulkTransientObject.secureAspects(OwCMISAlfrescoBulkTransientObject.java:41)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspects(OwCMISAbstractAlfrescoObjectClass.java:57)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspectsClasses(OwCMISAbstractAlfrescoObjectClass.java:78)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getAspectsNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:164)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:309)
   at com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractNativeObject.getProperties(OwCMISAbstractNativeObject.java:108)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISSemiVirtualFolderObject.getProperties(OwCMISSemiVirtualFolderObject.java:376)
   at com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter.getVirtualFolder(OwStandardSemiVirtualFolderAdapter.java:141)
   

deko
Star Contributor
Star Contributor
Which efile does not work? Did your use case really work with the other webservices binding? What are you doing when you are getting this exception? It looks like you are trying to perform an "UnsupportedOperation".

fararjeh
Champ in-the-making
Champ in-the-making
I have default eFile like HR Dossiers eFile , It happened when I click on the eFile from top menu ,My custom Alfresco content model have an aspect I expect the exception comes from aspect because on the exception written

   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAlfrescoBulkTransientObject.secureAspects(OwCMISAlfrescoBulkTransientObject.java:41)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspects(OwCMISAbstractAlfrescoObjectClass.java:57)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoObjectClass.getAspectsClasses(OwCMISAbstractAlfrescoObjectClass.java:78)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getAspectsNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:164)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAbstractAlfrescoClass.getNativePropertyClasses(OwCMISAbstractAlfrescoClass.java:309)

I would therefore be grateful if you could check my configuration in owbootstrap If an error config existing


   <EcmAdapter>
                <Version>4.1.0</Version>     
                <ClassName>com.wewebu.ow.server.ecmimpl.opencmis.OwCMISNetwork</ClassName>
                <adapterSessionConf>
                    <entry key="com.wewebu.owd.objectclassfactory.classname">com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAlfrescoObjectClassFactory</entry>
                </adapterSessionConf>
               
                <openCmisConf>
                    <entry key="org.apache.chemistry.opencmis.objectfactory.classname">org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl</entry>
                </openCmisConf>

                <AtomPub>http://127.0.0.1:8181/alfresco/cmisatom</AtomPub>  
    
                <DefaultObjectStore>Main Repository</DefaultObjectStore>            

            <SemiVirtualRecordClasses optionid="">               
               <SemiVirtualRecordClassName virtualfolder="employeetemplate.xml" folderclassname="F:kaad:employee" includephysicalchilds="false" searchSubstructure="true">   
                <VirtualFolderProperty    folderproperty="cmis:folder.cmis:name">P:kaad:identifiable.kaad:id</VirtualFolderProperty>
                <VirtualFolderProperty    folderproperty="OW_ObjectPath">OwSearchPath</VirtualFolderProperty>
              </SemiVirtualRecordClassName>
            </SemiVirtualRecordClasses>                  
            
                <OwApplicationObjectBaseDir>WEB-INF/cmis/</OwApplicationObjectBaseDir>
               
                <PreferedPropertyOrder optionid="">
                        <property>cmis:name</property>
                        <property>cmis:lastModifiedBy</property>
                        <property>cmis:creationDate</property>
                        <property>cmis:createdBy</property>
                </PreferedPropertyOrder>

                <CreationInitialValues optionid="">                 
                </CreationInitialValues>
               
                <NameProperties optionid="">                
                </NameProperties>

                <PreferredPropertyType optionid="">
                </PreferredPropertyType>
               
                <DefaultVersionHandling>
                   <FolderChildren>preserve</FolderChildren>
                </DefaultVersionHandling>

              <Authentication mode="LDAP" recursionlevel="1">
                  <java.naming.provider.url>ldap://localhost:1389</java.naming.provider.url>
                  <SchemaInterpreter>com.wewebu.ow.server.util.ldap.OwStandardSchemaInterpreter</SchemaInterpreter>

                  <UsersDirectory>ou=users,dc=google,dc=com</UsersDirectory>
                  <GroupsDirectory>ou=groups,dc=google,dc=com</GroupsDirectory>

                  <java.naming.factory.initial>com.sun.jndi.ldap.LdapCtxFactory</java.naming.factory.initial>
                  <java.naming.security.authentication>simple</java.naming.security.authentication>
                  <java.naming.security.principal>cn=Manager</java.naming.security.principal>
                  <java.naming.security.credentials>secret</java.naming.security.credentials>
                  <loginQueryName>uid</loginQueryName>
                  <anonymousLogin>false</anonymousLogin>

                  <GroupsObjectClass>groupOfNames</GroupsObjectClass>
                  <GroupReferenceAttribute>member</GroupReferenceAttribute>
                  <UserGroupReference>!</UserGroupReference>

                  <AttributeNameLongName>cn</AttributeNameLongName>
                  <AttributeNameShortName>uid</AttributeNameShortName>            
              </Authentication>
              <AspectRetrieveUrl>http://127.0.0.1:8181/alfresco/service/api/classes/</AspectRetrieveUrl>
</EcmAdapter>

d_evil
Champ in-the-making
Champ in-the-making
Hi fararjeh,

that looks like an error from an earlier version, and should be fixed in a newer version of Workdesk.
Can you get the latest version of Workdesk and try again?

Regarding your Binding Questions:
AtomPub is little bit faster than the WSDL (SOAP), and consumes less memory based on the Design of communication.

fararjeh
Champ in-the-making
Champ in-the-making
Hi D.evil

Thank you for reply, Alfresco Workdesk version is 4.1.0 .

About AtomPub and WSDL , Are all features on WSDL exist on AtomPub by Workdesk ?