Workspaces
In Processmaker, Workspace is the place where a group of processes and their cases are managed as a cohesive unit. Several workspaces are managed by ProcessmakerEach workspace maintains 3 My-Sql databases to store internal information about processes, user-permissions and reports in version 2.5 and earlier
- wf_<WORKSPACE-NAME>
This database contains the information required by the Process Engine, including information about processes, cases, users, PM Tables, etc
- rb_<WORKSPACE-NAME>
This database contains the information about users to maintain a Role-Based Access Control (RBAC) system in ProcessMaker
- rp_<WORKSPACE-NAME>
This database is designed to allow external applications to access data from ProcessMaker cases.
Any data entered to the dynaform in ProcessMaker will be entered to a Case-Variable and stored in ProcessMaker MY-SQL database in the wf_<WORKSPACE>.APPLICATION.APP_DATA field
We can use SQL queries in dynaforms to pull data from external databases or the ProcessMaker databases
With Case Variables data can be pulled from Processmaker triggers and used in the fields in the dynaform
ProcessMaker can also be configured to connect to external databases, allowing an organization to integrate ProcessMaker with other DBMS and business applications which utilize databases
To use a particular database, database modules for PHP should be installed on the server.... !!
Submit
http://wiki.processmaker.com/index.php/2.0/Buttons#Saving_a_Form.27s_DataIt is necessary to add a submit button to every DynaForm
It has the Next Step Link property (which can be set in theProperties tab in the DynaForm Editor). => No Save and Continue
Otherwise, the data entered into a DynaForm will be lost when the user clicks on the Next Step link in a DynaForm
Saving Form's Data
Processmaker offers 4 functions to save data in a dynaform
- submitForm() => values in the fields are saved to the database
- saveForm() => case-variables are created for each field and saved in database
- saveAndRefreshForm()
- saveAndRedirectForm()
Custom Javascript code can be added to Submit button to error-check the data entered before it is submitted
- Below is an egzample of a submit button named "SendBid" will check whether the numbers are within an acceptable range before submitting the DynaForm:If the "Submit" event handler returns true only data will be saved to the database and dynaform closes
function checkBid() { var jobType = getField("JobType").value; var bid = getField("Bid").value; if (jobType == "remodeling" && bid > "$3000") { G.alert("Bid is too high for a " + jobType + " job.\nPlease reduce it.", "Error"); return false; } else if (jobType == "new construction" && bid < "$5000") { G.alert("Bid is too low for a " + jobType + " job.\nPlease increase it.", "Error"); return false; } else return true; } leimnud.event.add(getField("SendBid"), 'click', checkBid);
- To hide the Next Step Link in dynaforms
hiddenById("DYN_FORWARD");
hiddenById("DYN_FORWARD][bullet");
Input Documents
Information about Input Document files and any other files uploaded while running cases is stored in the wf_<WORKSPACE>.APP_DOCUMENT table.
The filename for Input Document files is stored in the wf_<WORKSPACE>.CONTENT table where the CON_CATEGORY field equals 'APP_DOC_FILENAME'.
To search for all the Input Document files for a particular case, first find the case's unique ID and then use it in the following SQL query:
SELECT D.*, C.CON_VALUE FROM CONTENT C, APP_DOCUMENT D WHERE D.APP_DOC_UID = C.CON_ID AND D.APP_UID = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
putting links to multiple input document files
multiple files cannot be uploaded into using file field
http://www.processmakerblog.com/processmaker/links-multiple-input-document-files-dynaforms/
Output Documents
Since uploaded files are stored as files in the harddrive, their size can be as large as allowed by the server's operating system and hard drive.
