Discussion about developing the ProcessMaker application and suggestions for improving it

Moderator: amosbatto

By nnorman
#826265
Hello,

I created a process that starts with an empty event type follows by an empty task that is set up to fire a couple of triggers but none of the triggers were fired and the case stalls at this empty task, see attached screen shot. New cases are generated by calling REST endpoint on /api/1.0/workflow/cases from an external web form. Will you please share any tips and advice you have? Thank you so much!
Attachments
hr_new_case.PNG
hr_new_case.PNG (43.55 KiB) Viewed 105 times
User avatar
By amosbatto
#826268
The first task in a process has to be a normal task which is assigned to a user.

There are two way to deal with this problem:
Option 1:
Install the extraRest plugin.
You can create the new case using REST:
POST /cases
Then, use the following endpoint to execute triggers in that new case:
PUT extrarest/case/{app_uid}/execute-trigger/{tri_uid}
With this trigger, a user who is the ProcessMaker can execute triggers in cases assigned to other users, so make sure that the user in your script on your external web site is assigned as a Process Supervisor.

Second Option:
Use Web Entry to start the case from your external web site. You can add an iframe to your external web site that displays the Web Entry form. Then, select the option for multiple forms in the Web Entry properties (even of you only have one form). Then set a trigger to fire after the Dynaform or before assignment in the Web Entry dialog box.
webEntryTriggerAfterForm.png
webEntryTriggerAfterForm.png (79.55 KiB) Viewed 97 times
By nnorman
#826382
Thank you so much Amosbatto for your suggestions!!! We will look into both options and see which one we'll use. I'll post result soon.

amosbatto wrote: Fri Aug 30, 2019 8:57 pm The first task in a process has to be a normal task which is assigned to a user.

There are two way to deal with this problem:
Option 1:
Install the extraRest plugin.
You can create the new case using REST:
POST /cases
Then, use the following endpoint to execute triggers in that new case:
PUT extrarest/case/{app_uid}/execute-trigger/{tri_uid}
With this trigger, a user who is the ProcessMaker can execute triggers in cases assigned to other users, so make sure that the user in your script on your external web site is assigned as a Process Supervisor.

Second Option:
Use Web Entry to start the case from your external web site. You can add an iframe to your external web site that displays the Web Entry form. Then, select the option for multiple forms in the Web Entry properties (even of you only have one form). Then set a trigger to fire after the Dynaform or before assignment in the Web Entry dialog box.

webEntryTriggerAfterForm.png
By nnorman
#826448
Hi Amosbatto,

We decided to go with Second Option (we couldn't import the extraREST) but the trigger still didn't fired. I guess I don't quite understand the web entry configuration on the start task especially when we're using an external web form. Attached is screen shot of how I am configuring the web entry start task, what should I use for step 1 Approver Review Form (Dynaform) since it's not a Processmaker native dynaform? Also since the start task is a web entry, can the next task be a script task? Your help is much appreciated!!!!

amosbatto wrote: Fri Aug 30, 2019 8:57 pm The first task in a process has to be a normal task which is assigned to a user.

There are two way to deal with this problem:
Option 1:
Install the extraRest plugin.
You can create the new case using REST:
POST /cases
Then, use the following endpoint to execute triggers in that new case:
PUT extrarest/case/{app_uid}/execute-trigger/{tri_uid}
With this trigger, a user who is the ProcessMaker can execute triggers in cases assigned to other users, so make sure that the user in your script on your external web site is assigned as a Process Supervisor.

Second Option:
Use Web Entry to start the case from your external web site. You can add an iframe to your external web site that displays the Web Entry form. Then, select the option for multiple forms in the Web Entry properties (even of you only have one form). Then set a trigger to fire after the Dynaform or before assignment in the Web Entry dialog box.

webEntryTriggerAfterForm.png
Attachments
hr_new_case_1.PNG
hr_new_case_1.PNG (51.54 KiB) Viewed 39 times
User avatar
By amosbatto
#826453
nnorman wrote: Tue Sep 10, 2019 4:45 pm (we couldn't import the extraREST)
Was there an error when you tried to import it?
If so, what what was the error and what is your environment?
I have mostly tested extraRest in PM 3.3.X (manual install) with Debian 9.5 and PHP 5.6.38, so I'm curious if there are environments where it fails
nnorman wrote:I guess I don't quite understand the web entry configuration on the start task especially when we're using an external web form.
Web Entry will give you a URL. You can then either add a link to your external web site which directs to that URL or embed the web entry in your web site with an <iframe>. Here are HTML examples:
Code: Select all
<a href="http://example.com/sysworkflow/en/neoclassic/5392182485d78006f8a9444090008315/4361649365d780125533392014593841.php">application form</a>

<iframe src="http://example.com/sysworkflow/en/neoclassic/5392182485d78006f8a9444090008315/4361649365d780125533392014593841.php" width="99%">
nnorman wrote: Also since the start task is a web entry, can the next task be a script task?
No, you can't use a script task as the first task. You have to use a trigger instead of a script task.
Task doesnt have any users.

I have created a small process. Users are assigned[…]

NEW MOBILE APP ISSUE

Just trying to setup to use the mobile App with my[…]

It's really a great idea. I have followed the seco[…]

yes i use php thanks for the information