Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#786396
Hi everybody!

I have been trying to mass advance cases (+300) to the next task in the process. It works more or less. But the more I want to electing about choosing the cases, the more things get hacky, especially because we use LDAP.

Probably the right solution in our case is to use plain SQL to manipulate the cases and probably a bit of PHP if cases forms need manipulation.

Here is our scenario:
A user complains he can't manage his inbox because it is flooded with 480 case while he only works on less than 100. He needs to advance, or simply get rid of the rest. How should we determine the unnecessary cases? Easy! They originate from a particular process, they have been assigned from a certain person, and have a case variable set to a determined value.

Easy to do in theory, but while on practice, this causes me many problems:
    [*] I cannot proceed to route the cases as an admin because LDAP [*] How do query I for cases both based on database columns and case variables? [*] The operation takes too much time and, past PHP execution timeout, the batch hangs out, may corrupt some cases and another batch is needed.
Given that I have a set of cases IDs, how can I force advance them only using SQL?

Thank you in advance.
Last edited by touhamm on Tue Sep 06, 2016 4:46 am, edited 1 time in total.
#786425
Hi
I would consider cancelling the affected cases, there is documentation on doing that with sql.

One other way would be to remove the steps within the task and 'click through' so no data is recorded (which would be accurate)


Really a back log of 480 case isn't that bad as you say, only 4x normal workload, but some people choose to be difficult
right now in our production we don't close cases (leave them open indefinitely) because we may need to change the case data that we use for analytics. So that last user has 8000+ cases in her inbox.

Hope this helps.
#786436
To do this only in MySQL is definitely not recommended, because you would have to modify the existing entries in APPLICATION, APP_CACHE_VIEW, and APP_DELEGATION, plus add a new entry in APP_DELEGATION. You have to get lots of details right.

I have designed a "Manage Cases" process which queries the APPLICATION table in MySQL for the cases you want and displays them in a grid with a checkbox. Then mark the cases which should be routed to the next task. A trigger after the DynaForm calls PMFDerivateCase() for each of the cases.
Download:
(48.45 KiB) Downloaded 367 times
To use this process, assign your admin to the first task in the process and run a case in the "Manage Cases" process.

I haven't tested any of the other functions besides routing, so I commented them out in the trigger code. I'll try to test the other options when I have more time (cancel case, pause case, unpause case and reopen case) and make them work as well.

Note: in version 3.0.1.8, calling PMFDerivateCase() works, but it generates a warning message, just ignore the warning messages.
#786441
Thank you for your answers.

I have chosen to go a simpler and dumber way:
    [*]Create a secondary account for the user [*]Dress a list of all cases minus desired ones in (desired list selected manually from reporting tool). [*]A simple reassigneCase() to the secondary user does the work.
Simple, Dumb, Safe. It can be done by an admin or the user himself, all cases stay in the same progress and there is no data loss.

Whne run php.exe processmaker help , I get error […]

Salut les gars. Savez-vous pourquoi vous devez fa[…]

Finally :D https://sourceforge.net/projects/pro[…]

There are two administrators on our server, both u[…]