cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced workflow properties not showing up

bcoulson
Champ in-the-making
Champ in-the-making
All

I have been battling with this all week and am at wits end. So here is what I have. I am using Alfresco 3.4 and the jBPM 3.2 workflow engine. I have a workflow that is actually the sample workflow from the Alfresco Developer Guide eBook. I have reviewed the documentation and forums, wiki countless times and keep coming up empty. Here is my process definition file:


<?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="toHello" to="hello"></transition>
</start-state>

<task-node name="hello">
   <transition name="toEnd" to="end1">
   <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <script>
         <variable name="scwf_helloName" access="read"/>
         <expression>
            System.out.println("Hello " + scwf_helloName + "!");
         </expression>
      </script>
   </action>
   </transition>
</task-node>
<end-state name="end1"></end-state>
</process-definition>

Here is my workflow model:

<?xml version="1.0" encoding="UTF-8"?>
<model name="scwf:workflowmodel"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>Someco Workflow Model</description>
   <author>Optaros</author>
   <version>1.0</version>
   <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>
   <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>
                  <default>false</default>
               </property>
            </properties>
      </type>
   </types>
</model>

Here is my resource bundle:

scwf_workflowmodel.type.scwf_submitHelloWorldTask.title=Start Hello World UI Workflow
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 world process

Here is my content model.

<?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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
      <property name="models">
         <list>
            <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>

And finally my configuration for the webUI from web-client-config-custom.xml

   <config evaluator="node-type" condition="scwf:helloWorldUI" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="scwf:helloName" component-generator="TextFieldGenerator" display-label_id="scwf_helloName"/>
         <separator name="sep2" display-label-id="user_filter_user" component-generator="HeaderSeparatorGenerator" />
      </property-sheet>
   </config>

Whenever I select a piece of content and attempt to start Advanced Workflow for it, the property for helloName does not show up. HELP!! My model is parsed just fine. Do I need to include the bpm:assignee in my workflow? Also I never see anything in my log file when I use the AlfrescoJavaScript action for other non-UI workflow that execute successfully. And I have turned logging to DEBUG for log4j.properties
Regards
Brenda
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
All

And finally my configuration for the webUI from web-client-config-custom.xml

   <config evaluator="node-type" condition="scwf:helloWorldUI" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="scwf:helloName" component-generator="TextFieldGenerator" display-label_id="scwf_helloName"/>
         <separator name="sep2" display-label-id="user_filter_user" component-generator="HeaderSeparatorGenerator" />
      </property-sheet>
   </config>

Hi bcoulson,
Actually there are two problems in your  workflow

Custom property is not visible because of problem in web-client-config-custom.xml
as you have mentioned wrong task name in config just replace "scwf:helloWorldUI" with the "scwf:submitHelloWorldTask".

Other problem is in your task-node there is no task mentioned.

bcoulson
Champ in-the-making
Champ in-the-making
Mitpatoliya

OMG!! Thank you soo much - it finally works. I have been struggling with this for over a week and I knew it had to be something silly I was doing. So in my web-client-config-custom.xml file, for each config file, the the condition is meant to be the task name? I know I saw another request for this, but is there documentation/schema details for how to configure these items? It would help me to understand what is allowed/not allowed, what is the meaning of the condition attribute and the types of evaluators that are allowable for a config item?

Thank you - you have been enormously helpful.
Brenda