Joget DX Preview Release Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Page tree
Skip to end of metadata
Go to start of metadata

根据 Ivan Shu.的反馈和分享,这是  Multiple Approval  改进版本

在这个版本中,添加了Deadline 以便定期自动检查批准。这将防止“过程审批”中的脚本无法同时运行多个审批实例,从而无法获得所需的最终批准计数。

KB:Download the App

编辑:

1.过程审批 - >工具:更新应用程序

更改

 

workflowManager.assignmentComplete(actId, null);
to
workflowManager.assignmentComplete(actId);

 

assignmentComplete方法只接受一个参数。

2.流程应用 - >工具:流程审批

else if(rowCount >= approvalCount){
workflowManager.processVariable(processId, statusVariableName, "Approved");
}

如果您接受3个用户中的2个用户的批准,其他用户的运行过程将不会完全完成。

示例修复

else if(rowCount == Integer.valueOf(no_approvals)){ //no_approvals is my own variable where I store number of assignees for request to be approved
    	String[] approvalIdsSplit = approvalIds.split(",");
	for(String approvalId : approvalIdsSplit){
		if(!approvalId.equalsIgnoreCase("") && !approvalId.equalsIgnoreCase(recordId)){
			try{
				workflowManager.processAbort(approvalId);
                System.out.println(" aborting : " + approvalId);
			}catch(Exception e){
                    System.err.println("Exception: " + e.getMessage());
			}			
		}
	}
	workflowManager.processVariable(processId, statusVariableName, "approved");
}
  • No labels