It is possible to redirect the web browser to a different URL (web address) inside ProcessMaker triggers using PHP's header('location: URL') function. For URLs inside ProcessMaker, see G::header(), but use header()
instead of G::header()
.
ProcessMaker is an easy to use Business Process Management (BPM) and workflow software solution. Design, run, report, and improve your business processes.
ProcessMaker’s latest release is now available for download from SourceForge. Version 1.2-2425 includes some neat new features, as well as several bug fixes. The new PM Tables feature allows admins to create, edit, and manage new database tables directly from ProcessMaker. ProcessMaker news, events, releases, and updates Moderator: ArturoRobles: 87 Topics 219 Posts New ProcessMaker Webinars and by mattrmclaren Wed Nov 25, 2020 11:34 pm: Licensing Discussion and questions around ProcessMaker Licensing Moderator: ArturoRobles: 26 Topics 81 Posts Re: Community vs Enterprise by programerboy Thu Oct 29, 2020 12:04 pm. Strict Standards: Non-static method G::LoadTemplate should not be called statically, assuming $this from incompatible context in /opt/compiled/smarty/c/%%6B^6BE.
If redirecting to a different step in the current task, it is recommended to use the PMFRedirectToStep() function, because it will save the variables in the current trigger before redirecting the web browser. If using header()
, then save the variables to the current case with PMFSendVariables() before redirecting the web browser.
If using JavaScript, then the web browser can redirected by assigning the URL to window.location.href.
Here are some of the URLs which aren't documented in the ProcessMaker wiki:
- Open Step:
'../cases/cases_Step?TYPE={TYPE}&UID={OBJECT-UID}&POSITION={STEP-NUMBER}&ACTION={ACTION}'
Opens the specified step for the current task of the current case, as long as the currently logged-in user has the proper privileges to open the case. The UID is the unique ID for the object (DynaForm, Input Document, Output Document or External Step) and the POSITION is the positive integer for the step in the task. The first step in a task has a POSITION of1
, the second step is2
, etc. The object's unique ID can be found by editing a process and opening the list of DynaForms, Input Documents or Output Documents and clicking on their UID button. Alternatively, the UID for an object can be looked up in the wf_{workspace}.CONTENT.CON_ID field whereCON_CATEGORY
equals'DYN_TITLE'
,'INP_DOC_TITLE'
or'OUT_DOC_TITLE'
. The POSITION can be looked up in the wf_{workspace}.STEP.STEP_POSITION field.
TheTYPE
andACTION
depend upon the type of step:- DynaForms:
'../cases/cases_Step?TYPE=DYNAFORM&UID={DYNAFORM-UID}&POSITION={STEP-NUMBER}&ACTION=EDIT'
- Input Documents:
'../cases/cases_Step?TYPE=INPUT_DOCUMENT&UID={INPUT-DOC-UID}&POSITION={STEP-NUMBER}&ACTION=ATTACH'
- Output Documents:
'../cases/cases_Step?TYPE=OUTPUT_DOCUMENT&UID={OUTPUT-DOC-UID}&POSITION={STEP-NUMBER}&ACTION=GENERATE'
- External steps:
'../cases/cases_Step?TYPE=EXTERNAL&UID={EXT-STEP-UID}&POSITION={STEP-NUMBER}&ACTION=EDIT'
- Notifications (Email):
'../cases/cases_Step?TYPE=MESSAGE&UID={NOTIFICATION-UID}&0POSITION={STEP-NUMBER}&ACTION='
- Assign next user (at end of task):
'../cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN'
- DynaForms:
- Download a file:
'../cases/cases_ShowDocument?a=<CASE-DOCUMENT-UID>'
Download or opens an Input Document file or an attached file (not the step for the Input Document), as long as the currently logged-in user has permissions to open the file. Each file created in or uploaded to a case is assigned a case document unique ID which can be used to access that file. To find a file's UID, query the wf_{workspace}.APP_DOCUMENT.APP_DOC_ID field or use the inputDocumentList() web service. If needing to access particular version of the Input Document file, concatenate'&v={VERSION-NUMBER}'
to the URL, where the version starts counting from the number1
. The version number can be looked up in the wf_{workspace}.APP_DOCUMENT.DOC_VERSION field.
- Download an Output Document file:
'../cases/cases_ShowOutputDocument?a={CASE-DOCUMENT-UID>&ext={EXTENSION}'
If the currently logged-in user has permissions, opens a generated Output Document file (not the step for the Output Document). Each generated Output Document is assigned a case document unique ID which can be used to access its files. To find the UID for a generated Output Document, query the wf_{workspace}.APP_DOCUMENT.APP_DOC_ID field or use the outputDocumentList() web service. The extension for the generated output document can be 'pdf', 'doc' or 'html'. If needing to access particular version of the generated Output Document, concatenate'&v={VERSION-NUMBER}'
to the URL, where the version starts counting from the number1
. The version number can be looked up in the wf_{workspace}.APP_DOCUMENT.DOC_VERSION field.
- Route case:
'../cases/cases_Derivate'
Route (derivate) the current case to the next task in the process.
Note:The recommended way to route a case to the next task is use PMFDerivateCase(), the routeCase() web service or the PUT /cases/{app_uid}/route-case endpoint.
- Reassign case:
'../cases/cases_Reassign?APP_UID=<CASE-UID>&DEL_INDEX=<INDEX>'
Open the screen to reassign the specified case to another user. The currently logged-in user has to have the PM_REASSIGNCASE permission in his/her role and must either be the currently designated user to work on the case or have Process Permissions for read-only access to the case. The APP_UID is the case unique ID and the DEL_INDEX is the delegation index, which is an positive integer counting the tasks in a process, starting from 1. Use the@@APPLICATION
and@%INDEX
system variables to get the case UID and delegation index for the current case. For other cases, these values can be looked up using the caseList() web service or querying the wf_<WORKSPACE>.APP_DELEGATION.APP_UID and wf_<WORKSPACE>.APP_DELEGATION.DEL_INDEX fields in the database.
- Review case:
'../cases/cases_OpenToRevise?APP_UID={CASE-UID}&DEL_INDEX={INDEX}&to_revise=true&action=to_revise'
In version 2.X, open a case as a Process Supervisor to review it and edit its DynaForms and Input Document files. The currently logged-in user must have the PM_SUPERVISOR permission in his/her role and must be assigned as a Supervisor for the process. The {CASE-UID} is the case's unique ID and the {INDEX} is the case's delegation index.
- Login:
'../login/login[?u=sys{WORKSPACE}/{LANG}/{SKIN}/{PATH}/{PAGE}]'
Logout of ProcessMaker and redirect to the login page. If the optional'u'
parameter is included, then will redirect to that page after login. Include the full web address after the IP address (and port number).
For example, to redirect to a new case after login:'../login/login?u=sysworkflow/en/classic/cases/cases_New'
- Use session ID:
'Location: {URL}?sid={SESSION-ID}'
Enter ProcessMaker with a different session ID and redirect to the specified URL in ProcessMaker. Session IDs are created with each new login, so this option allows a different user (or the same user with a different login) to enter ProcessMaker. Session IDs can be obtained with the login() web service or by querying the wf_{workspace}.LOGIN_LOG.LOG_SID or wf_{workspace}.SESSION.SES_UID fields in the database. If querying the database for active session IDs, note that the wf_{workspace}.LOGIN_LOG.LOG_STATUS and wf_{workspace}.SESSION.SES_STATUS fields are not very accurate, because they are only changed when a user clicks on 'Logout'. If a session expires, because the user does not have any activity for a certain amount of time (which is 24 minutes by default), then these fields will not be updated.
For example, to enter with the session ID '9501648404de51de1818eb7059342855' and redirect to a new case:'../cases/cases_New?sid=9501648404de51de1818eb7059342855'