Searching tasks by complex variables values

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2016 03:59 AM
The rest api saves the complex objects as byte array, that makes it impossible to query the tasks using the values assigned to the complex variable saved with the task…
So has is it possible to query the tasks using the task variable values in that case ??
So has is it possible to query the tasks using the task variable values in that case ??
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2016 10:11 AM
It's possible to register custom serializers for that. From the docs:
"It’s possible to support additional variable-types with a custom JSON representation (either simple value or complex/nested JSON object). By extending the initializeVariableConverters() method on org.activiti.rest.service.api.RestResponseFactory, you can add additional org.activiti.rest.service.api.engine.variable.RestVariableConverter classes to support converting your POJO’s to a format suitable for transferring through REST and converting the REST-value back to your POJO. The actual transformation to JSON is done by Jackson."
"It’s possible to support additional variable-types with a custom JSON representation (either simple value or complex/nested JSON object). By extending the initializeVariableConverters() method on org.activiti.rest.service.api.RestResponseFactory, you can add additional org.activiti.rest.service.api.engine.variable.RestVariableConverter classes to support converting your POJO’s to a format suitable for transferring through REST and converting the REST-value back to your POJO. The actual transformation to JSON is done by Jackson."

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2016 10:57 AM
If i implemented the custom complex object, is it possible to query tasks based on values assigned to fields in that object using REST calls ?
For example using the where clause : http://docs.alfresco.com/5.0/pra/1/concepts/act-tasks-get-tasks.html
It would be great if you can provide any references on how to implement this
For example using the where clause : http://docs.alfresco.com/5.0/pra/1/concepts/act-tasks-get-tasks.html
It would be great if you can provide any references on how to implement this
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2016 05:42 AM
You're referencing the alfresco docs … so I'm assuming you're using Activiti in Alfresco?
If so, sadly my answer above does not apply: Alfresco has it's own REST APi that is very different from the Activiti one.
I'd guess in Alfresco you have to use a custom webscript to do that …. but then you'd also need a custom query to be able to query it properly. I don't know how that would be done in Alfresco exactly.
If so, sadly my answer above does not apply: Alfresco has it's own REST APi that is very different from the Activiti one.
I'd guess in Alfresco you have to use a custom webscript to do that …. but then you'd also need a custom query to be able to query it properly. I don't know how that would be done in Alfresco exactly.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2016 05:45 AM
yes, I'm using activiti in alfresco…
Can't find a thing about that in the documentation which is weird
Can't find a thing about that in the documentation which is weird
