Problems to upload information to the form
Hi guys, I have two question:
1) I have an entity called Report and this Report can be related to one or more Missions existing in the database(another entity). On Report Creation Form, we want to create a list where the user can select more than one Mission related.
But I don't know which widget we can use there. We must apply some query in that Mission list. I know how create a list of “vocabulary”, but we don't know how create a list for an entity, and how apply a query in this entity. Could someone help me?
2) I have a Workflow for Report and this workflow has 2 Tasks (nodes). The Task1 was forwarded to User1. This task has a field called “COMMENTS”. I've set this value into a Workflow variable called “responsible_comments”. User1 fills this field, responds to User2 and this Task is finished. The Task2 is started and I want to retrieve the last value of the “responsible_comments” into a Task2 form. I've built the Task2 Form using the Workflow variable “responsible_comments”, but this value is empty. How can I show this value into Task2 Form?
Follow the picture below
1) What you're looking for is probably the “singleDocumentSuggestion” widget since Missions seem to be documents rather than static info from a vocabulary.
To make sure you can only choose mission documents, you'll have to set the “Document page provider name” to a custom “page provider”. Those can only be contributed in XML right now (Advanced settings in Studio), here is some sample code:
<extension point="providers" target="org.nuxeo.ecm.platform.query.api.PageProviderService">
<coreQueryPageProvider name="missionsProvider">
<pattern>
SELECT * FROM Mission WHERE ecm:currentLifeCycleState != 'deleted'
</pattern>
</coreQueryPageProvider>
</extension>
(more pageprovider examples at: http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.8/viewExtensionPoint/org.nuxeo.ecm.platform.query.api.PageProviderService–providers)
2) Why don't you assign the same workflow variable “responsible_comments” to both tasks? Unless I misunderstood something you used a node/task variable for Task1 while you could directly use “responsible_comments”. Unless you overwrite “responsible_comments” between tasks, there's no reason its value could disappear.
2)Thanks for the reply.
I'm using the same variable (responsible_comments) for both tasks, see the image above, I declared in the workflowVariable and variable returns empty
As suggested by manuek above, to help pinpoint to problem you can try to initialize the variable with some random value (in the "Variables" workflow tab), and check if the value indeed appears in the comment of the first task.
Problem resolved,I just upgraded to version 5.8, I think it was a bug in version 5.7.3
Thank You very much
For question 2, have you try to check "read only" in the form tab of your node in Studio? (see http://doc.nuxeo.com/display/Studio/Simple+Workflow+Example?src=search#SimpleWorkflowExample-ConfiguringtheForm after label and translated lines)
Thanks for the reply, but had already done this test still returns empty.
Any other suggestion?
What do you mean by "This task has a field called "COMMENTS" " ? "COMMENTS" is the label of your workflow variable "responsible_comments" ? Have you drag your workflow variable as indicated in the documentation? it should work. Can you send more "picture" (of the layout widget editor for the 2 nodes) ?
I'am using responsible_comments in my workflow variable.
above follows the updated images
Thanks
Thank you very much
Can you try to display responsible_comments with a default_value in the first and/or second node ?
Problem resolved,I just upgraded to version 5.8, I think it was a bug in version 5.7.3
Thank You very much