Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
#822316
Hello, I'm trying to use the ExtraRest 1.8 API to list a user's paused cases. I even list the cases in progress, usually canceled but when trying to filter by the paused instead of returning the paused cases of the logged in user it returns all cases of all users of the workspace ... I am using the following GET: myIp: 8080 / api / 1.0 / workflow13 / extrarest / cases / user / 00000000000000000000000000000001? action = paused.
Following the https://sourceforge.net/p/pmcommunity/c ... aramoption guidelines
User avatar
By amosbatto
#822317
That is very strange. I just tried it with PM 3.3.0 Community and extraRest1.8 (in Debian 9.5) and I am is able to return the admin's paused cases using that endpoint:
/api/1.0/workflow/extrarest/cases/user/00000000000000000000000000000001?action=paused

Are you sure that you didn't make a mistake in your code?

PS: you can also use ?status=PAUSED, but it will return many duplicates.
By marcosfpa
#822394
See my tests in POSTMAN, when filter by paused lists all the tasks of all users of the workspace:
get_paused.png
get_paused.png (75.24 KiB) Viewed 6197 times
Already when it fits all, canceled, etc. filters correctly the tasks only of the logged in user:
get_todo.png
get_todo.png (75.61 KiB) Viewed 6197 times
Any idea?
User avatar
By amosbatto
#822402
This is really strange. I can't reproduce the problem in PM 3.3.0 Community with extraRest 1.8 in Debian 9.5 with PHP 5.6.37.

I have tried these variations and they all worked correctly:
- admin getting his own paused cases.
- admin getting paused cases of another user.
- user with MANAGER role getting his own cases.
- user with MANAGER role getting paused cases of another user.
- user with OPERATOR role getting his own paused cases.

What versions of PM and PHP are you using and what operating system? Did you upgrade this installation of PM?
Does the standard GET /cases/paused endpoint work correctly for you?
By marcosfpa
#822408
PHP Version 5.5.9, PM 3.2 community ( updated over 3.1 ) e Ubuntu 14...
GET / cases / paused also returns all cases instead of just one ...
Upgrade to 3.3 could help?
User avatar
By amosbatto
#822415
I doubt that upgrading will fix the problem, since GET /cases/paused should work correctly in all versions. I suspect that something is wrong in your database.

Go to Admin > Settings > Case List Cache Builder and click on "Build Cache" to rebuild the APP_CACHE_VIEW table. Does the endpoint return anything different after rebuilding APP_CACHE_VIEW?

In the command line of your ProcessMaker server, check the database structure. Do this:
cd /opt/processmaker
php processmaker database-verify-consistency
What do you see?

How did you upgrade PM? Did you transfer the database from another server?
By marcosfpa
#822427
I did the procedures and nothing has changed. Below the result of database-verify-consistency:
inconsistencia.png
inconsistencia.png (24.78 KiB) Viewed 6168 times
And yes, in recent days we changed the database to another server dedicated to the database, can have influence?
By marcosfpa
#822441
When trying to make processmaker database-up upgrade does but does not solve anything. What I noticed when I executed gives an error:
data-upgrade.png
data-upgrade.png (30.3 KiB) Viewed 6150 times
User avatar
By amosbatto
#822452
The deprecated warning about using # instead of // for comments won't cause any problems.

If you run processmaker database-verify-consistency again, do you still see 1194 user related inconsistencies ?
User avatar
By amosbatto
#822462
When you are inside the ProcessMaker interface and go to Home > Paused, do the correct cases appear for the user? Are the correct number of "Paused" cases listed in the side bar?

PS: If you want someone at ProcessMaker Inc. to look at your database and try to figure out what is wrong, you need to pay for a support contract.
By marcosfpa
#822475
I use an interface that we developed and mounts the list of cases via API, incidentally it is extremely slow, and now I have checked what I said and in the traditional processmaker interface does not show the number of cases:
paused_pm_interface.png
paused_pm_interface.png (41.72 KiB) Viewed 6090 times
Can the slowness of the API be mitigated by upgrading to the latest version?

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]