AnsweredAssumed Answered

[Solved] Workflow causes error

Question asked by sihnu on Mar 24, 2011
Latest reply on Apr 13, 2011 by sihnu
Hello

I've been following book Alfresco Developer's Guide and I'm trying to do customized workflow as presented in the book. After writing the files I can't login to Alfresco Share. Here is the model (scWorkflowModel.xml):



<?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="dz" />
    <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
  </imports>

  <!– Introduction of new namespaces defined by this model –>
  <namespaces>
    <namespaces 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>true</mandatory>
          <multiple>false</multiple>
        </property>
      </properties>
    </type>
  </types>

</model>

Here is the process definition:

<?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 World!");
           </expression>
         </script>
       </action>
     </transition>
   </node>
   <end-state name="end1"></end-state>
</process-definition>

And here model context (there is a refer to anothe model also, though that model works fine):

<?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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/ak-model.xml</value>
      <value>alfresco/extension/model/scWorkflowModel.xml</value>
            </list>
        </property>
    </bean>

    <bean id="extension.ak.resourceBundle" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.messages.asiakirja</value>
         </list>
      </property>
   </bean>

   <bean id="extension.workflowBootstrap" parent="workflowDeployer">
      <property name="labels">
         <list>
            <value>alfresco.extension.scWorkflow</value>
         </list>
      </property>
   </bean>
</beans>

I can't get to workflow console to deploy the workflow. What's causing the problem?

Outcomes