Trouble Retrieving form properties in my test

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2012 02:41 PM
Hi,
I am trying to get the form properties but, i am not getting any form properties in my test case. Could you please let me know if i am missing anything?
Thanks,
Raj
I am trying to get the form properties but, i am not getting any form properties in my test case. Could you please let me know if i am missing anything?
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"> <process id="document_workflow" name="Document workflow"> <startEvent id="starteventDocumentWorkflow" name="Start"></startEvent> <userTask id="usertaskRegistration" name="Registration"> <extensionElements> <activiti:formProperty id="booleanProperty" name="Property" type="boolean" required="true" readable="true" writable="true" default="true"/> <activiti:formProperty id="stringProperty" name="Property" type="string" required="true" readable="true" writable="true" default="someString"/> <activiti:formProperty id="longProperty" name="Property" type="long" required="true" readable="true" writable="true" default="42"/> <activiti:formProperty id="longExpressionProperty" name="Property" type="long" required="true" readable="true" writable="true" default="${12 * 2 - 1}"/> </extensionElements> </userTask>…………….…………….
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); TaskFormData formData = formService.getTaskFormData(task.getId()); List<FormProperty> formProperties = formData.getFormProperties();
–>empty listThanks,
Raj
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2012 03:41 AM
And By the way, I am looking at the right user task usertaskRegistration.
Raj
Raj
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2012 08:11 AM
Don't see anything wrong at first sight. Do you have a simple unit test with that code that I can run to verify?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2012 04:09 AM
Sorry, that was my problem. I was pointing to the wrong workflow.
Thanks,
Raj
Thanks,
Raj
