cancel
Showing results for 
Search instead for 
Did you mean: 

How to pre-fill the start form with properties of the selected document.

mtsiak
Star Contributor
Star Contributor

When a users selects a document in order to start a workflow, how could we show at the start form some its properties (e.g. creator, associations, other custom properties from out custom aspects)?

6 REPLIES 6

shyam_ghodasra
Confirmed Champ
Confirmed Champ

Hi,

So when user attache some document in to the workflow at that time you want to show your property for that you need to do customization in "\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls\workflow\packageitems.ftl"

First in that FTL understand how "Description" and "Modified on" property is coming then try to display your custom property in that FTL...

if you stuck some where comment here...

Thanks 
Shyam Ghodasra.

So, there isn' t any type of task/execution listener that runs before start form?

Hi,

What you want to archive that you can do with the upper solution.

There is executionListener based on start event..But it will run when you click on the start workflow button..

What I understood from your que is you want to display the custom property when user select the document so it is not releted to executionListener.

Thanks 
Shyam Ghodasra.

The user picks a document and starts a workflow. 

In the start form, the user also selects a list of related documents.

If the packageitem-document has its custom property "my:relatedDocs" set, we would like the start form to be pre-filled. 

Yes so make the changes in packageitems.ftl after select document check is there any doc related to that then append in to related document..

 

This is little bit helpful to under stand how to customize this type of things...java - Alfresco community 5.1.x workflow form add input fields dynamically - Stack Overflow 

Thanks,
Shaym Ghodasra

ok. thank you for your reply, although (if i am not wrong) this is a case where Yahoo js helps to update a table of data that user submits in the start form. Our case is the start form to be pre-filled with properties of the selected document.

thank you again for your interest.