Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By atuly7
#788270
I want to skip following stages.
1. Initiator submit form, after that he gets the following window which is in AFTER SUBMIT image or approver approved form he gets the window how to skip that window. Is it possible?

2. When last approver approved task. Task is end he gets the following window which is in END PROCESS image.

Now I want to skip that windows. When initiator submits form it directly go to approver. He should not have to click on that CONTINUE button. Same for end process as well.
Is it possible in processmaker?

I used processmaker Community edition.

Thanks & Regards
Attachments
After Submit.png
After Submit.png (98.83 KiB) Viewed 12787 times
End process.png
End process.png (99.4 KiB) Viewed 12787 times
By zainab
#788272
This stage is the routing screen which shows the information of the next task. To hide this screen create a trigger with code:
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
Now assign this trigger to fire "Before Assignment" in the task you want to hide this screen.
By atuly7
#788292
zainab wrote:This stage is the routing screen which shows the information of the next task. To hide this screen create a trigger with code:
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
Now assign this trigger to fire "Before Assignment" in the task you want to hide this screen.
Thanks for code @zainab. But it works for only initiator. When approver submit form then it won't pass to next user. It remains in same approver inbox. It also doesn't work for "End of Process" .
I tried this code
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
but it doesn't work. It shows that window. Do you have any other solution?

Please check below link as well.
viewtopic.php?f=41&t=709798&start=30

Thanks & Regards
By zainab
#788293
You have to create a trigger with the entire code:
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
and not only:
atuly7 wrote:I tried this code
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
Since you have to hide the routing screen in every task, therefore for all the three tasks you have to assign the same trigger in "Before Asssignment" step. Also if you have other triggers present in Before Assignment step than this trigger should be last in that sequence.
atuly7 wrote:But it works for only initiator. When approver submit form then it won't pass to next user. It remains in same approver inbox. It also doesn't work for "End of Process" .
By atuly7
#788294
zainab wrote:You have to create a trigger with the entire code:
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
and not only:
atuly7 wrote:I tried this code
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
Since you have to hide the routing screen in every task, therefore for all the three tasks you have to assign the same trigger in "Before Asssignment" step. Also if you have other triggers present in Before Assignment step than this trigger should be last in that sequence.
atuly7 wrote:But it works for only initiator. When approver submit form then it won't pass to next user. It remains in same approver inbox. It also doesn't work for "End of Process" .
Yeah, I have tried this as well but it's not working for approver. When approver submits form it doesn't pass to next selected approver. It remains in current user's inbox. If approver selects Rejected or Seek More Information then it doesn't show that window but when he selects Approved then it doesn't pass that request to next user. It remains in current user's inbox. You can check this.
Note: In approver1 and approver2, initiator can select there 1 or more approver.
Thanks & Regards
By zainab
#788297
Hey,

I checked and you are right. No problem there is a work around for this, you need to change the sequence of the triggers. The triggers placed in Before Assignment assign them to fire After Dynaform. And then assign this trigger
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
to fire Before Assignment. This should do the trick as I tested in my process and it worked :)
steps.png
steps.png (53.18 KiB) Viewed 12766 times
By atuly7
#788299
zainab wrote:Hey,

I checked and you are right. No problem there is a work around for this, you need to change the sequence of the triggers. The triggers placed in Before Assignment assign them to fire After Dynaform. And then assign this trigger
Code: Select all
PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();
to fire Before Assignment. This should do the trick as I tested in my process and it worked :)
steps.png
Thanks @zainab I didn't check and just comment.

Please check this post and tell me is it possible?
viewtopic.php?f=41&t=709798&start=30

Thanks & Regards
By zainab
#788309
This trigger hides the routing screen. If you want to display some message you can create your own routing screen template instead of the default screen which is shown.

The default routing screen template(which gives the information of the next task and the assigned user) can be found in location:
/opt/processmaker/workflow/engine/templates/cases/cases_ScreenDerivation.html

Using this template you can create your own template with any information. For this, Edit Process->Routing Template->Choose your Template.
This will change the routing screen for the entire process.

if you want for a particular task, then migrate to Task->Properties->Routing Screen Template->Choose your Template

In case you want to hide the Routing Screen and want to display a message to User, you can do that with the help of Flash Message in dynaforms.
Here have a look at this: http://wiki.processmaker.com/3.0/JavaSc ... a_Dynaform
By atuly7
#788333
zainab wrote:This trigger hides the routing screen. If you want to display some message you can create your own routing screen template instead of the default screen which is shown.

The default routing screen template(which gives the information of the next task and the assigned user) can be found in location:
/opt/processmaker/workflow/engine/templates/cases/cases_ScreenDerivation.html

Using this template you can create your own template with any information. For this, Edit Process->Routing Template->Choose your Template.
This will change the routing screen for the entire process.

if you want for a particular task, then migrate to Task->Properties->Routing Screen Template->Choose your Template

In case you want to hide the Routing Screen and want to display a message to User, you can do that with the help of Flash Message in dynaforms.
Here have a look at this: http://wiki.processmaker.com/3.0/JavaSc ... a_Dynaform
Grid rows get shuffled when approver selects Seek More Information option. Suppose initiator selects fa1,fa2 as first approver and sa1,sa2 as second approver. When fa1 asked for seek more information and select user as fa3 then In fa3 grid rows get shuffled is shown in seekmoreinfo.png
When fa3 adds information and submit it then In fa1, grid rows are shown as shuffled seekmoreinfo1.png
when fa1 approved request and it goes to fa2 then it shows grid in proper manner seekmoreinfo2.png
It happens when initiator selects mutiple user and first selected user not with last one.

How to solve this problem?

Thanks & Reagards
Attachments
seekmoreinfo.png
seekmoreinfo.png (118.08 KiB) Viewed 12749 times
seekmoreinfo1.png
seekmoreinfo1.png (122.28 KiB) Viewed 12749 times
seekmoreinfo2.png
seekmoreinfo2.png (122.87 KiB) Viewed 12749 times
seekmoreinfo3.png
seekmoreinfo3.png (119.29 KiB) Viewed 12749 times
By zainab
#788336
Modify your SQL Statement in trigger where you Get the Approvers Comments. Use ORDER BY to fetch the rows in Ascending Order with respect to Approver's ID:
Code: Select all
SELECT Concat(APPROVER,'-',FIRSTNAME,' ',LASTNAME) as approver, F.COMMENT AS remarks, F.APPROVED_DATE AS date, S.VALUE AS status FROM PMT_FIRST_APPROVER F INNER JOIN PMT_APPROVAL_STATUS S ON F.STATUS=S.ID WHERE F.APPLICATION_NUMBER = '".@@APPLICATION."' ORDER BY F.ID ASC"
By atuly7
#788365
zainab wrote:Modify your SQL Statement in trigger where you Get the Approvers Comments. Use ORDER BY to fetch the rows in Ascending Order with respect to Approver's ID:
Code: Select all
SELECT Concat(APPROVER,'-',FIRSTNAME,' ',LASTNAME) as approver, F.COMMENT AS remarks, F.APPROVED_DATE AS date, S.VALUE AS status FROM PMT_FIRST_APPROVER F INNER JOIN PMT_APPROVAL_STATUS S ON F.STATUS=S.ID WHERE F.APPLICATION_NUMBER = '".@@APPLICATION."' ORDER BY F.ID ASC"
Thanks zainab.
I want your help. When initiator selects fa1,fa2 as first approver and sa1,sa2 as second approver and submit it.
fa1 approved request. Suppose fa2 rejected that request then it goes initiator but on different dynaform(Review Note). Now initiator do some changes and submit it then goes to fa2 but I want that request go to fa1 then fa2 and so on. I removed that conditions from trigger. But it didn't work and request directly goes to sa1.
Is it possible to route request in selected sequence?

Thanks & Regards
By zainab
#788366
For the case that you mentioned, that is after changes made by the initiator, you want the loop to start again from fa1 onwards. For this simply assign the trigger, which initializes count and and initializes the loop, to execute After Dynaform. i.e., First Loop Trigger. So that after the initiator makes the required changes, the loop starts all over again.

If you want to have a different sequence depending upon the initiator then you can include a grid, from which the initiator would select the approvers all over again in any sequence it prefers.

Hope this helps.
By NAlvarado
#816108
I created a trigger using this

PMFDerivateCase(@@APPLICATION, @%INDEX);
G::header("Location: casesListExtJsRedirector");
die();

and placed it in Before Assignment as my last trigger as I have another trigger there. It completely stops the WF and I can't reassign it or do anything. Ideas? I'm on 3.2
User avatar
By amosbatto
#816113
You should use jumping() instead PMFDerivateCase().

By the way, if you really want to use PMFDerivateCase(), then you should use PHP's header() function instead of G::header() (which has a bug in recent versions of PM):
Code: Select all
header("Location: casesListExtJsRedirector");
By NAlvarado
#816138
Thanks, i tried the following and it gave me errors in the WF. I placed the trigger in the Before Assignment step after the second trigger I have.

jumping(@@APPLICATION, @%INDEX);
//G::header("Location: casesListExtJsRedirector");
die();

With and without die() and still received errors.
By NAlvarado
#816140
I re-read the thread and I have moved any Before Assignment Triggers to After Dynaform and kept this trigger in the Before Assignment. It seems to be working with the below in the trigger. Thanks!

jumping(@@APPLICATION, @%INDEX);
User avatar
By mdbarber
#823032
amosbatto wrote:You should use jumping() instead PMFDerivateCase().

By the way, if you really want to use PMFDerivateCase(), then you should use PHP's header() function instead of G::header() (which has a bug in recent versions of PM):
Code: Select all
header("Location: casesListExtJsRedirector");
Processmaker version: 3.1.3

The problem with jumping() (or PMFDerivateCase()) is that they seem to mess with the variables stored in other triggers in the same case.

For example in my first task I have a trigger that stores in a variable the value of the currently logged in user. If I have jumping() and this trigger both set to fire before assignment, then my variable containing the currently logged in user returns NULL.

Is there another way to hide the "Assign task/Event" window?

Thank you for your help.

Maxime
User avatar
By amosbatto
#823035
@maxine, You can call Cases::derivateCase(), but it does exactly the same thing as the other two functions.

When do you set the triggers to fire which save the logged user and when does the trigger fire which uses the saved logged user?

Here is what I recommend you do to save the current logged user:
Code: Select all
@@currentUser = @@USER_LOGGED;
PMFSendVariables(@@APPLICATION, array('currentUser'=>@@USER_LOGGED));
jumping(@@APPLICATION, @%INDEX);
User avatar
By mdbarber
#823050
Thank you for replying Amos.
amosbatto wrote:When do you set the triggers to fire which save the logged user and when does the trigger fire which uses the saved logged user?
The trigger is initially set before assignment. But I have tried setting it elsewhere and I still encounter the same problem.

I think that PMFSendVariables is the only solution.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]