Hi Thomas, Could you try using TransientVariables[1] for your use-case? REST api provided through WSO2 BPS is actually wrapping the REST API provided by Activiti.In [2] it suggests that transient variables might be better for performance.
[1] https://www.activiti.org/userguide/#apiTransientVariables [2] http://www.jorambarrez.be/blog/2016/09/01/how-to-use-transient-variables-in-activiti/ Thanks Himasha On Wed, Nov 1, 2017 at 12:33 AM, Thomas LEGRAND < [email protected]> wrote: > Hello everybody, > > I am creating an interface to display the list of the current user tasks > waiting for approval. In this list, I display some information provided by > the variables inside the process instances. For example, it can be the id > of an object that I defined during the creation of the instance of the > process. > > To retrieve the information for the list, I am using the REST API. But, > because I would like the user to be able to filter the list with criteria, > I am using the query endpoint for the tasks to be able to filter by the > values of the variables in the instances. > > However, I have a problem because it seems that I have huge responsiveness > lag when I want the REST API to return the current state of the variables > of the instances. Actually, when I send a query request, it takes around 40 > seconds for the server to respond, if it does not time out. The problem > disappears when I don't set the attribute to retrieve the list of the > variables in my query request. > > For example, this one causes problems: > > { > "includeProcessVariables": true > "variables": [ > { > "name": "group", > "operation": "equals", > "value": "MyGroupName > } > ] > } > > whereas this one causes no problems: > { > "variables": [ > { > "name": "group", > "operation": "equals", > "value": "MyGroupName > } > ] > } > > I don't see other way to retrieve "custom" informations from a process > instance except by using the variables. And because this is a list I want > to display, it is really overkill to retrieve the list of the instances to > loop on each one of them to retrieve their variables. > > Of course, in this example, I try to retrieve the current pending > instances because one of their user task is waiting to be unblocked by a > user. But I am doing the same thing to retrieve a list of already finished > tasks/process instances (so by using the historic-task-instances endpoint). > And I have exactly the same problem. Too much time to respond or time out. > > So, here are my questions: > > - Do you have any idea from where those "latency" problems could come from? > - Do you know if I can use the Activiti Java API with the embedded > Activiti in the WSO2 Business Process Server? > > I am using WSO2 Enterprise Integrator 6.0.0. > > Regards, > > Thomas > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Himasha Guruge Senior Software Engineer WS*O2* *Inc.* Mobile: +94 777459299 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
