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 higgledy
#815238
We have a use-case we are calling "Follow-Up step." This is defined as, the original case requester has the ability to ask a question about his case after his case already been completed. Subsequently, the case manager needs to be able to reply to the requester's question, as well. How would I implement such a use-case? Ideally, I'd like this "Follow-Up step" to be part of the same workflow and not need to create a new workflow nor start a new case. Thanks.
User avatar
By amosbatto
#815256
What does this follow-up consist of? Once a case is completed, there is no easy way to reopen it in ProcessMaker (see workarounds below). The easiest solution is to have a separate process for doing follow-up.

If you don't want to do that, then you can either pause or cancel the case. Then unpause or uncancel the case to do the follow-up. Pausing/Unpausing is simpler. There is the PMFUnCancelCase() function which can be executed in a trigger, so you will need to create a separate process for uncancelling cases.

There are workarounds if you don't want to Pause/Unpause the case, such as:
1. Write to the APPLICATION.APP_DATA field in the database to change the case's data.
2. Reopen case the last task in the case by changing the case's status to 'DRAFT' in the APPLICATION table and changing the record for the last task in the APP_DELEGATION so its status is 'OPEN' and it doesn't have a finish date.
3. Use code to clone the case: viewtopic.php?f=44&t=713938&p=798779#p798779
All three of these solutions will probably require creating a separate process (or a plugin) to execute the code to do them.
By higgledy
#815266
the follow-up is a simple process of the original requester asking a question that gets sent to the case supervisor. Then the case supervisor would answer the question. The answer would then be sent back to the requester. There may be several follow-up questions/answers sent back and forth. With this scenario, I am not sure how a case would be finally completed for good.

The idea of pausing the case might work. If the case were paused, and there are no further follow-up questions, how would the case get completed? Which actor would complete the case?
User avatar
By amosbatto
#815272
The assigned user or the process supervisor can manually pause/unpause the case. The other option is to create the following trigger which is fired before assignment in the last task:
Code: Select all
PMFPauseCase(@@APPLICATION, @%INDEX, @@USER_LOGGED);
header("location: casesListExtJsRedirector");
die();
What I recommend is adding a final task to the process named "Follow-up questions" which uses the Self Service assignment rule. Anyone who wants to end the case can then claim the case and finish it. They can also claim the case and then reassign it to a particular person, if that person needs to answer the question.

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]