-
1. Re: Retrieving Form Data with kie server rest api
diego-torres Mar 4, 2017 9:13 AM (in response to rodrigo.burdet)Hello Rodrigo.
Please look at this implementation:
GitHub - diego-torres/subform-ticket: jBpm get sub-form demo.
And let me know if your implementation is somehow different or if it works for you.
-
2. Re: Retrieving Form Data with kie server rest api
dmarrazzo Mar 5, 2017 2:31 AM (in response to rodrigo.burdet)Hello Rodrigo,
are serializable your custom type?
can you provide a reproducer?
-
3. Re: Retrieving Form Data with kie server rest api
rodrigo.burdet Mar 6, 2017 12:03 PM (in response to diego-torres)Your example works for me. But when i try to add another subform in the same parent form, your solution does not work.
In your example i added a IssueList subform and the response i get:
{
"form": {
"dataHolder": [
{
"id": "issueList",
"inputId": "",
"name": "#E9E371",
"outId": "issueLIst",
"type": "dataModelerEntry",
"value": "org.acme.ticket_support.IssueList"
},
{
"id": "ticket",
"inputId": "",
"name": "#E9E371",
"outId": "ticket",
"type": "dataModelerEntry",
"value": "org.acme.ticket_support.Ticket"
}
],
"displayMode": "default",
"field": [
{
"defaultSubform": "component-ticket.form",
"errorMessage": ",,,,,,,,",
"fieldClass": "java.lang.Object",
"fieldRequired": false,
"groupWithPrevious": false,
"id": 1575399852,
"inputBinding": "ticket",
"label": ",,,Subform2,ticket,,,,",
"name": "ticket",
"outputBinding": "ticket",
"position": 0,
"readonly": false,
"title": ",,,,,,,,",
"type": "Subform"
},
{
"addItemText": ",,,,,,,,",
"bag-type": "org.acme.ticket_support.Issue",
"cancelItemText": ",,,,,,,,",
"defaultSubform": "issue-subform.form",
"deleteItems": true,
"enableTableEnterData": false,
"errorMessage": ",,,,,,,,",
"expanded": false,
"fieldClass": "java.util.List",
"fieldRequired": false,
"hideCreateItem": false,
"id": 272361770,
"label": "SSClass,SSStyle,,,,issueList (issueList),,,,,",
"name": "issueList_issueList",
"newItemText": ",,,,,,,,",
"outputBinding": "issueLIst/issueList",
"position": 1,
"previewSubform": "issue-subform.form",
"readonly": false,
"tableSubform": "issue-subform.form",
"title": ",,,,,,,,",
"type": "MultipleSubform",
"updateItems": true,
"visualizeItems": true
}
],
"id": 1417469681,
"name": "ticket-support.support-taskform.form",
"status": 0
}
}
Which still hides subform information
-
4. Re: Retrieving Form Data with kie server rest api
rodrigo.burdet Mar 6, 2017 12:11 PM (in response to dmarrazzo)Dear Donato. No, my custom type is not serializable. But a curious fact is that having only one subform with non-serializable data works well. Adding another subform breaks the hole thing.
Regards
-
5. Re: Retrieving Form Data with kie server rest api
rodrigo.burdet Mar 6, 2017 12:41 PM (in response to rodrigo.burdet)Here is an implementation with 2 subforms that doesnt work
-
6. Re: Retrieving Form Data with kie server rest api
diego-torres Mar 15, 2017 4:17 PM (in response to rodrigo.burdet)I am observing this few things:
1. In the EAP log I found the following error logged by the kie-server:
2017-03-15 15:26:13,461 ERROR [stderr] (default task-57) java.lang.NullPointerException
2017-03-15 15:26:13,462 ERROR [stderr] (default task-57) at org.kie.server.services.jbpm.ui.form.InMemoryFormProvider.filterXML(InMemoryFormProvider.java:214)
2017-03-15 15:26:13,462 ERROR [stderr] (default task-57) at org.kie.server.services.jbpm.ui.form.InMemoryFormProvider.render(InMemoryFormProvider.java:87)...Is that something you can also see?
2. I add fields "by origin", as the inbound/outbound linking is made automatically for me I don't have to further change that. I am observing that you are adding fields "by type" and then adding the properties to tie them to inbound/outbound variable mappings right?
By the log it seems to be missing a reference to the "outboundBinding", but I will keep researching how that is getting missed because as far as I can see to this moment, all configurations are in place for inbound/outbound.