cancel
Showing results for 
Search instead for 
Did you mean: 

Share Workflow Forms - share-config-custom

stevegreenbaum
Champ in-the-making
Champ in-the-making
I am migrating a custom advanced workflow from Alfresco Explorer to Share.  When I define the form in web-extension/share-config-custom.xml, the form definition doesn't get picked up.  If I cut and paste the definition into share-config.xml in the Alfresco path, the changes are picked up.  Has anyone gotten this working using share-config-custom.xml?  So far I've tried defining the workflow start where the evaluator="string-compare" condition="jbpm$custom:reviewapprovePurchase"
5 REPLIES 5

matjazmuhic
Champ on-the-rise
Champ on-the-rise
It would be great if you posted the code here. Anyways…

The condition must be the tasks name (from task model).

Here's code from my project that works fine for me. Maybe it'll help you.


<config evaluator="task-type" condition="agtm:reviewTask">
  <forms>
   <form>
    <field-visibility>
     <show id="message"/>
     <show id="taskOwner"/>
     <show id="bpm:priority"/>
     <show id="bpm:dueDate"/>
     <show id="bpm:taskId"/>
     <show id="bpm:status"/>
     <show id="packageItems"/>
     <show id="bpm:comment"/>
     <show id="transitions"/>
    </field-visibility>
    <appearance>
     <set id="" appearance="title" label-id="workflow.set.task.info" />
     <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
     <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
     <set id="items" appearance="title" label-id="workflow.set.items" />
     <set id="response" appearance="title" label-id="workflow.set.response" />
     <field id="message">
      <control template="/org/alfresco/components/form/controls/info.ftl" />
     </field>
     <field id="taskOwner" set="info" />
     <field id="bpm:taskId" set="info">
      <control template="/org/alfresco/components/form/controls/info.ftl" />
     </field>
     <field id="bpm:priority" set="info" read-only="true">
      <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
     </field>
     <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
      <control template="/org/alfresco/components/form/controls/info.ftl" />
     </field>
     <field id="bpm:status" set="progress" />
     <field id="packageItems" set="items" />
     <field id="bpm:comment" label-id="workflow.field.comment" set="response">
      <control template="/org/alfresco/components/form/controls/textarea.ftl" />
     </field>
     <field id="transitions" set="response" />
    </appearance>
   </form>
  </forms>
</config

gavinc
Champ in-the-making
Champ in-the-making
Are you using your own install of Tomcat? If so, remember to configure shared/classes in Tomcat's conf/server.xml file, see http://wiki.alfresco.com/wiki/Install_Tomcat6 for details (step 4).

stevegreenbaum
Champ in-the-making
Champ in-the-making
The condition must be the tasks name (from task model).
Here's code from my project that works fine for me. Maybe it'll help you.

Thank you for posting your code.  I was able to resolve my issue.  I had a malformed tag in another part of share-config-custom which was causing the problem which explains why the form definition I was using worked fine when placed in share-config.xml. 

Regarding "condition must be the tasks name" is true for the each of the task screens, but not for the initial screen (for submitting) AFAIK.  The submit screen uses the workflow name as I showed in my original post. 

Are you using your own install of Tomcat? If so, remember to configure shared/classes in Tomcat's conf/server.xml file, see http://wiki.alfresco.com/wiki/Install_Tomcat6 for details (step 4).

I used the standard installer (3.4a, Windows) for this instance.  When I looked at catalina.properties the shared.loader line referenced shared/classes correctly, but did not contain a reference to ${catalina.base}/shared/lib/*.jar as the wiki suggests.  If you think this should be reported, I will submit a jira.

gavinc
Champ in-the-making
Champ in-the-making
Yes, a JIRA for the installer would be good, it may be that it is a conscious decision but it won't hurt to create the JIRA.

You are also right about the form config for starting a workflow, the condition for that uses the workflow name. Viewing/editing task details uses the task type.

stevegreenbaum
Champ in-the-making
Champ in-the-making