Approval Process, Unanimous Decision Making 20230726
The approval process is based on unanimous approval, where several decision-makers are designated when a proposal of more than 5 million yen is drafted. The decision is taken with the approval of all decision-makers.
Worker (#of Swimlane: 5)
  • Applicant
    • Person in charge of drafting the decision.
  • Team Leader
    • Leader of the same organisation as the applicant who confirms the decision.
  • Approver(s)
    • Head of the department to which the originator belongs, and heads of the administration, sales and development departments
  • Head of Department
    • The head of the department who is the supervisor of the applicant who approves the request.
  • Directors & Deputy Directors
    • The head or deputy head of the department who is the supervisor of the applicant who approves the request.
Business Flow (Complexity of Workflow: 17)
  • 11. Submit a request for approval
    • The applicant drafts a circular for approval.
  • 41x. Respond to a rejection
    • The applicant can either revise the drafted content and resubmit or withdraw it.
  • 32. Confirm
    • The applicant’s supervisor checks the draft and returns it if it is incomplete.
  • 123a. Approval Decision
    • If the external payment is less than 1 million, the director or deputy director makes the decision.
  • 143b. Approval Decision
    • If the external payment is 1-5 million, the department manager decides. If 24 hours pass without a decision being made, go to 3a.
  • 283c. Approval Decision
    • If the external payment is more than 5 million, more than one approver will make a decision.
Workflow Diagram (click to open)
Business Process Variables (#of Data Item: 24)
  • ▼ Application ▼ 0
  • Applicant’s Affiliation q_Drafter_Org 1*
    • The department to which the applicant belongs is stored. (“Organisation” in the workflow platform)
    • processInstanceInitQgroupId
  • Applicant q_Drafter 2*
    • The applicant is stored. (“user” in the workflow platform).
    • ${processInstance.initQuserId}
  • Time of Submission q_Submission_Time 3
    • The date and time of submission is stored. It is entered according to the automatic processing setting of “1. Submit a request for approval” or “1x. Respond to a rejection”.
  • Description of and reasons for drafting q_Reason 4*
    • The contents of the draft and the reasons for it are stored.
  • Appendix q_Attachment 5
    • It contains attachments relating to the content of the drafting.
  • External Payment q_Payment 6*
    • The amount of the external payment is stored.
  • Number of internal workers q_Man_Hours 7
    • The amount of internal man-hours is stored.
  • Budget Classification q_Classification 8
    • The budget category of the draft is stored.
  • Budget category remarks q_Classification_Remarks 9
    • The remarks of the budget category of the draft content are stored.
  • ▼ Approver ▼ 19
  • (Additional) Approver 1 q_add_approver1 17
    • Additional approvers are stored.
  • (Additional) Approver 2 q_add_approver2 18
    • Additional approvers are stored.
  • ▼ Confirmation and Approval ▼ 10
  • Approver/Rejector q_judgement_user 23*
    • The user who made the approval/rejection decision is stored.
  • Approval result q_decision_result 13
    • The approval results are stored.
  • Approved/Rejected List q_judgement_user_list 22
    • Approval/rejection results and user names are stored in list format.
  • Confirmed Leader q_Confirmer 11
    • The leader confirming the draft is stored. The data is entered according to the automatic processing setting in “2. Confirm”.
  • Reader Confirmation Time q_Confirmed_Time 12
    • The date and time of approval when the draft content is confirmed is stored. This is entered according to the automatic processing setting in “2. Confirm”.
  • Director/deputy director q_Approver 14
    • The head of department/deputy head of department who approved the draft is stored. The information is entered according to the automatic processing setting of “3a/b/c. Approve and approve”.
  • Director/Deputy Director Decision Time q_Approved_Time 15
    • The date and time when the draft was approved is stored. The date is entered according to the automatic processing setting of “3a/b/c. Approve and approve”.
  • ▼ Internal Communication ▼ 20
  • Comments / Messages q_discussion 21
    • Internal comments and messages are stored.
  • ◆Script: Unanimous – Control 16

Field Name, num, Initial Value

Download

This archive can be imported as a Workflow App on BPMS.

Notes

  • The data item “◆Script: Unanimous – Control” should only be set to “Viewable” in step 3c.

Arrangement Tips

(click to open) “3c. Approval Decision” process decoration JavaScript

<script>
const DECISION_FORM_NAME = 'data[13].selects'; // Character string containing the definition number of option "Approval result"
const DECISION_FORM_FIELD_NAME = 'q_decision_result'; // Specify the field name of the option "Approval result"
const DECISION_REJECT_VALUE = 'ng';   // Specify the ID of the option "Approval result"
const DECISION_JUDGEMENT_USER_LIST = 'q_judgement_user_list';   // Specify the field name of the string type "approval/rejection list"
const DECISION_JUDGEMENT_USER = 'q_judgement_user';   // Specify the field name of the user type "approver/rejector"
let userName;
let isChangeItem = false;
function user_readyHandler(e) {
	const submitBtn = document.getElementById('submitButton');
	const saveOnlyBtn = document.getElementById('saveOnlyButton');
	let selects = qbpms.form.get( DECISION_FORM_FIELD_NAME );
	qbpms.form.set( DECISION_JUDGEMENT_USER ,  null );
	if (selects.length !== 0){
		console.log("selects[0].value: " + selects[0].value );
		if ( selects[0].value === DECISION_REJECT_VALUE ){
			let items = document.getElementsByName( DECISION_FORM_NAME );
			items[1].disabled = true;
			alert("This request for approval has already been rejected. \nPlease check the contents of the draft and enter your comments. ");
			let decisionNote = document.getElementById('user_decision_description');
			decisionNote.innerHTML = "This petition has already been rejected. <br>Please check the contents of the draft and enter your comments.";
		}
	}
	
	submitBtn.addEventListener('click', function() {
		user_controlDecisionForm();
	});
	saveOnlyBtn.addEventListener('click', function() {
		user_controlRejectDecisionForm();
	});
}
function user_addedChangeItemEvent(e) {
	console.log("Decision Form Change");
	let selects = qbpms.form.get( DECISION_FORM_FIELD_NAME );
	if (selects.length !== 0){
		if ( qbpms.form.get(DECISION_JUDGEMENT_USER) === null ){
			isChangeItem = false;
			qbpms.form.set( DECISION_FORM_FIELD_NAME , null );
			alert("Register "Approve/Reject" and specify "Approve/Reject" again.");
		}else{
			isChangeItem = true;
			user_setJudgementUsersList("Rejected");
		}
	}
}
qbpms.form.on('ready', user_readyHandler);
qbpms.form.on('change', DECISION_FORM_FIELD_NAME ,user_addedChangeItemEvent);
function user_controlDecisionForm(){
	let checkForm = document.getElementsByName( DECISION_FORM_NAME );
	console.log(checkForm + " length:" + checkForm.length);
	selects = qbpms.form.get( DECISION_FORM_FIELD_NAME );
	if (selects.length !== 0){
		let items = document.getElementsByName( DECISION_FORM_NAME );
		if (items[1].disabled){
			checkForm[0].remove();
		}
		if (!isChangeItem){
			if ( qbpms.form.get(DECISION_JUDGEMENT_USER) === null ){
				qbpms.form.set( DECISION_FORM_FIELD_NAME , null );
				alert("Register "Approve/Reject" and specify "Approve/Reject" again.");
			}else{
				user_setJudgementUsersList("Approved");
			}
		}
		if ( selects[0].value === DECISION_REJECT_VALUE ){
		console.log( DECISION_FORM_FIELD_NAME + " not appoval!");
		}
	}else{
		console.log( DECISION_FORM_FIELD_NAME + " remove! not regist");
		//checkForm[0].remove();
		if ( qbpms.form.get(DECISION_JUDGEMENT_USER) === null ){
			qbpms.form.set( DECISION_FORM_FIELD_NAME , null );
			alert("Register "Approve/Reject" and specify "Approve/Reject" again.");
		}else{
			user_setJudgementUsersList("Approved");
		}
	}
}
function user_controlRejectDecisionForm(){
	let checkForm = document.getElementsByName( DECISION_FORM_NAME );
	console.log(checkForm + " length:" + checkForm.length);
	console.log("checkForm[0]:" + checkForm[0]);
	console.log("checkForm[1]:" + checkForm[1]);
	console.log( DECISION_FORM_FIELD_NAME + " remove! not regist");
	checkForm[1].remove();
	checkForm[0].remove();
}
function user_setJudgementUsersList( judgeText ){
	console.log("--user_setJudgementUsersList()--");
	userName = qbpms.form.get(DECISION_JUDGEMENT_USER).name;
	console.log("userName: " + userName);
	let list = (qbpms.form.get( DECISION_JUDGEMENT_USER_LIST ) + "\n" + judgeText + ":" + userName).trim();
	qbpms.form.set(DECISION_JUDGEMENT_USER_LIST ,  list );
}
</script>

Capture

See also

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: