This workflow accepts external payment applications via email. The applicant attaches the invoice file, describes the requirements in the subject line and body, and sends it. The payment flow is automatically started upon receipt of the email. The invoice file is saved with the date and time automatically appended to the file name. After approval by the supervisor, the accounting department will process the remittance.
Worker (#of Swimlane: 3)
Applicant
Person applying for external payment.
Supervisor
The applicant’s superior who approves the application.
Accounting Department
Accounting department payment officer.
Business Flow (Complexity of Workflow: 19)
11. Remittance request
The applicant will enter supplementary information regarding the application.
61x. Correction: Remittance request
The applicant will amend the application details.
32. Approval of remittance
The applicant’s supervisor will approve the application.
43. Bank transfer
The accountant will process the bank transfer.
54. Report receipt/record details
The applicant records receipts such as delivery notes.
17Add invoice history file
The workflow platform copies the applied invoice file to the history file.
15Set Applicant User
The workflow platform will create Questetra user information from the application email From address.
7Set Title
The workflow infrastructure creates the subject line.
14Set Title
The workflow platform creates a subject (automatic withdrawal).
18Set Title
The workflow infrastructure sets the subject line (Withdrawn).
Business Process Variables (#of Data Item: 15)
▼ Application Contents ▼11
Applicantq_request_user2
The applicant’s user account information is stored.
Application Summaryq_description3
The application summary (application email subject) is stored.
Application Detailsq_detail5
Application details (application email body) are stored.
Invoice Fileq_invoice_file0*
The applied invoice file (email attachment) is stored.
▼ Record of Payment Procedures ▼12
Payment Processing Dateq_payment_date7
Stores the payment completion date.
Payment Commentq_payment_comment8
Comments at the time of payment are stored.
Invoice File Historyq_invoice_file_history1
Contains invoice history files.
▼ Report Receipt/Record Details ▼13
Contents of Receiptq_receipt_detail9
Contains notes on receipts.
Receipt Documentsq_receipt_files10
Documents that should be kept in the record, such as delivery notes, are stored.
This archive contains the BPMN icon, which is only available in the Professional edition.
Notes
You need to associate the Swimlane settings according to your organizational structure upon import
Arrangement Tips
Set Applicant User automatic process Script (click to open)
const org_email = engine.findDataByVarName("q_request_user_mailAddress");
const quser = quserDao.findByEmail(org_email);
if (quser !== null){
engine.setDataByVarName("q_request_user", quser);
}else{
throw new Error( "\n AutomatedTask RequestUserValidError:" +
" User Not Exist \n" );
}
The Questetra account will be searched and set based on the From email address of the application email.
Add invoice history file automatic process Script (click to open)
let files = engine.findDataByVarName("q_invoice_file");
let historyFiles = engine.findDataByVarName("q_invoice_file_history");
let requestDatetime = engine.findDataByVarName("q_request_datetime");
let updateFiles = new java.util.ArrayList();
const formatter = new java.text.SimpleDateFormat("yyyyMMddHHmmssz");
const sufix = formatter.format(requestDatetime);
main();
function main(){
// Processing ends if there is no attached file.
if (files == null) {
return;
}
if (historyFiles === null){
historyFiles = new java.util.ArrayList();
}
for (let i=0; i < files.size(); i++){
const file = files.get(i);
var fileName = file.getName();
var parts = fileName.split(".");
fileName = parts[0] + "-" + sufix + "." + parts[1];
var fileContentType = file.getContentType();
historyFiles.add(new com.questetra.bpms.core.event.scripttask.NewQfile(fileName,fileContentType,file));
updateFiles.add(new com.questetra.bpms.core.event.scripttask.NewQfile(fileName,fileContentType,file));
}
engine.setDataByVarName("q_invoice_file_history",historyFiles);
engine.setDataByVarName("q_invoice_file",updateFiles);
} // main() end
(Application email attached) Date information will be added to the invoice file name. Invoice files are copied, added, and stored in the data item “Invoice File History”.