first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
package wenrgise.workflow.core;
public class WflConstants {
public static final String APPROVE = "Approve";
public static final String SUBMIT = "Submit";
public static final String REJECT = "Reject";
public static final String REVISE = "Revise";
public static final String CLOSE = "Close";
public static final String CANCEL = "Cancel";
public static final String PI = "PurchaseIndent";
public static final String TE = "TenderEnquiry";
public static final String QT = "Quotation";
public static final String TEP = "TenderEnquiryProposal";
public static final String PP = "PurchaseProposal";
public static final String PO = "PurchaseOrder";
public static final String DO = "DeliveryOrder";
public static final String DS = "DeliverySchedule";
public static final String LEAVE = "Leave";
public static final String LOAN = "Loan";
public static final String APPRAISAL = "Appraisal";
public static final String ADVANCE = "Advance";
public static final String TRANSFER = "Transfer";
public static final String DEPUTATION = "Deputation";
public static final String SEPARATION = "Separation";
public static final String TRAINING = "Training";
public static final String MR = "Marerial Requisition";
public static final String GRS = "Good Receipt Sheet";
public static final String MRN = "Material Return Note";
public static final String MIN = "Material Issue Note";
public static final String STNIN = "Stores Transfer Note IN";
public static final String STNOUT = "Stores Transfer Note Out";
public static final String SAJ = "Stores Adjustment";
public static final String CHALLAN = "Challan";
public static final String RSV = "Reservation";
public static final String REJECTED = "Rejected";
public static final String PENDING = "Pending";
public static final String FINALLY_APPROVED = "FinallyApproved";
public static final String APPROVED = "Approved";
public static final String REVISED = "Revised";
public static final String CLOSED = "Closed";
public static final String INITIATED = "Initiated";
public static final String SUCCESS = "Success";
public static final String ERROR = "Error";
public static final String MAIL_SENT = "MailSent";
public static final String TRUE = "true";
public static final String FALSE = "false";
public static final String SYSTEM_MAIL_ADDRESS = "enrgise@tcs.com";
}

View File

@@ -0,0 +1,13 @@
package wenrgise.workflow.core;
import java.io.Serializable;
public interface WflDepartment extends Serializable {
String getDepartmentId();
void setDepartmentId(String paramString);
String getDepartmentName();
void setDepartmentName(String paramString);
}

View File

@@ -0,0 +1,58 @@
package wenrgise.workflow.core;
import java.io.Serializable;
import java.util.HashMap;
public interface WflDocumentInfo extends Serializable {
WflResource getRequester();
void setRequester(WflResource paramWflResource);
WflResource getCreator();
void setCreator(WflResource paramWflResource);
String getRequesterAction();
void setRequesterAction(String paramString);
String getDocumentTypeId();
void setDocumentTypeId(String paramString);
String getDocumentId();
void setDocumentId(String paramString);
String getDocumentNumber();
void setDocumentNumber(String paramString);
String getModuleId();
void setModuleId(String paramString);
WflSite getSite();
void setSite(WflSite paramWflSite);
HashMap getDocumentAttributes();
void setDocumentAttributes(HashMap paramHashMap);
String getWorkListId();
void setWorkListId(String paramString);
String getDocumentType();
void setDocumentType(String paramString);
String getInitiatedFlag();
void setInitiatedFlag(String paramString);
String getDocDesc();
void setDocDesc(String paramString);
}

View File

@@ -0,0 +1,33 @@
package wenrgise.workflow.core;
import java.io.Serializable;
public interface WflResource extends Serializable {
String getEmployeeId();
void setEmployeeId(String paramString);
String getEmpNo();
void setEmpNo(String paramString);
WflSite getLoginSite();
void setLoginSite(WflSite paramWflSite);
String getUserId();
void setUserId(String paramString);
WflDepartment getDepartment();
void setDepartment(WflDepartment paramWflDepartment);
String getRouteDtlId();
void setRouteDtlId(String paramString);
String getDelegatedBy();
void setDelegatedBy(String paramString);
}

View File

@@ -0,0 +1,41 @@
package wenrgise.workflow.core;
import java.io.Serializable;
public interface WflRole extends Serializable {
String getApprovalLevel();
void setApprovalLevel(String paramString);
String getDeleteFlag();
void setDeleteFlag(String paramString);
String getDocTypeId();
void setDocTypeId(String paramString);
String getInsertFlag();
void setInsertFlag(String paramString);
String getPreAuditFlag();
void setPreAuditFlag(String paramString);
String getQueryFlag();
void setQueryFlag(String paramString);
String getRoleDesc();
void setRoleDesc(String paramString);
String getRoleId();
void setRoleId(String paramString);
String getUpdateFlag();
void setUpdateFlag(String paramString);
}

View File

@@ -0,0 +1,11 @@
package wenrgise.workflow.core;
import java.io.Serializable;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
public interface WflService extends Serializable {
WflStatus process(WflDocumentInfo paramWflDocumentInfo);
boolean canDo(WflDocumentInfo paramWflDocumentInfo) throws EnrgiseApplicationException, EnrgiseSystemException;
}

View File

@@ -0,0 +1,17 @@
package wenrgise.workflow.core;
import java.io.Serializable;
public interface WflSite extends Serializable {
String getSiteId();
void setSiteId(String paramString);
String getSiteName();
void setSiteName(String paramString);
String getParentSiteId();
void setParentSiteId(String paramString);
}

View File

@@ -0,0 +1,21 @@
package wenrgise.workflow.core;
import java.io.Serializable;
public interface WflStatus extends Serializable {
String getStatus();
void setStatus(String paramString);
WflResource assignedTo();
void assign(WflResource paramWflResource);
String getErrCode();
void setErrCode(String paramString);
String getErrMsg();
void setErrMsg(String paramString);
}

View File

@@ -0,0 +1,10 @@
package wenrgise.workflow.core;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
public interface WorkFlow {
WflStatus start(WflDocumentInfo paramWflDocumentInfo);
boolean canDo(WflDocumentInfo paramWflDocumentInfo) throws EnrgiseApplicationException, EnrgiseSystemException;
}

View File

@@ -0,0 +1,25 @@
package wenrgise.workflow.core.impl;
import wenrgise.workflow.core.WflDepartment;
public class WflDepartmentImpl implements WflDepartment {
private String departmentId;
private String departmentName;
public String getDepartmentId() {
return this.departmentId;
}
public void setDepartmentId(String newDepartmentId) {
this.departmentId = newDepartmentId;
}
public String getDepartmentName() {
return this.departmentName;
}
public void setDepartmentName(String newDepartmentName) {
this.departmentName = newDepartmentName;
}
}

View File

@@ -0,0 +1,138 @@
package wenrgise.workflow.core.impl;
import java.util.HashMap;
import wenrgise.workflow.core.WflDocumentInfo;
import wenrgise.workflow.core.WflResource;
import wenrgise.workflow.core.WflSite;
public class WflDocumentInfoImpl implements WflDocumentInfo {
private WflResource requester = null;
private WflResource creator = null;
private String requesterAction = null;
private String documentTypeId = null;
private String documentId = null;
private String documentNumber = null;
private String moduleId = null;
private WflSite site = null;
private HashMap documentAttributes;
private String workListId;
private String documentType = null;
private String initiatedFlag;
private String docDesc;
public WflResource getCreator() {
return this.creator;
}
public void setCreator(WflResource newCreator) {
this.creator = newCreator;
}
public String getDocumentId() {
return this.documentId;
}
public void setDocumentId(String newDocumentId) {
this.documentId = newDocumentId;
}
public String getDocumentNumber() {
return this.documentNumber;
}
public void setDocumentNumber(String newDocumentNumber) {
this.documentNumber = newDocumentNumber;
}
public String getDocumentTypeId() {
return this.documentTypeId;
}
public void setDocumentTypeId(String newDocumentTypeId) {
this.documentTypeId = newDocumentTypeId;
}
public String getModuleId() {
return this.moduleId;
}
public void setModuleId(String newModuleId) {
this.moduleId = newModuleId;
}
public WflResource getRequester() {
return this.requester;
}
public void setRequester(WflResource newRequester) {
this.requester = newRequester;
}
public String getRequesterAction() {
return this.requesterAction;
}
public void setRequesterAction(String newRequesterAction) {
this.requesterAction = newRequesterAction;
}
public WflSite getSite() {
return this.site;
}
public void setSite(WflSite newSite) {
this.site = newSite;
}
public HashMap getDocumentAttributes() {
return this.documentAttributes;
}
public void setDocumentAttributes(HashMap newDocumentAttributes) {
this.documentAttributes = newDocumentAttributes;
}
public String getWorkListId() {
return this.workListId;
}
public void setWorkListId(String newWorkListId) {
this.workListId = newWorkListId;
}
public String getDocumentType() {
return this.documentType;
}
public void setDocumentType(String newDocumentType) {
this.documentType = newDocumentType;
}
public String getInitiatedFlag() {
return this.initiatedFlag;
}
public void setInitiatedFlag(String newInitiatedFlag) {
this.initiatedFlag = newInitiatedFlag;
}
public String getDocDesc() {
return this.docDesc;
}
public void setDocDesc(String newDocDesc) {
this.docDesc = newDocDesc;
}
}

View File

@@ -0,0 +1,77 @@
package wenrgise.workflow.core.impl;
import wenrgise.workflow.core.WflDepartment;
import wenrgise.workflow.core.WflResource;
import wenrgise.workflow.core.WflSite;
public class WflResourceImpl implements WflResource {
private String employeeId = null;
private String empNo = null;
private String userId = null;
private WflSite loginSite = null;
private WflDepartment department = null;
private String routeDtlId;
private String delegatedBy;
public WflDepartment getDepartment() {
return this.department;
}
public void setDepartment(WflDepartment newDepartment) {
this.department = newDepartment;
}
public String getEmployeeId() {
return this.employeeId;
}
public void setEmployeeId(String newEmployeeId) {
this.employeeId = newEmployeeId;
}
public String getEmpNo() {
return this.empNo;
}
public void setEmpNo(String newEmpNo) {
this.empNo = newEmpNo;
}
public WflSite getLoginSite() {
return this.loginSite;
}
public void setLoginSite(WflSite newLoginSite) {
this.loginSite = newLoginSite;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String newUserId) {
this.userId = newUserId;
}
public String getRouteDtlId() {
return this.routeDtlId;
}
public void setRouteDtlId(String newRouteDtlId) {
this.routeDtlId = newRouteDtlId;
}
public String getDelegatedBy() {
return this.delegatedBy;
}
public void setDelegatedBy(String newDelegatedBy) {
this.delegatedBy = newDelegatedBy;
}
}

View File

@@ -0,0 +1,37 @@
package wenrgise.workflow.core.impl;
import java.util.logging.Logger;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.workflow.core.WflDocumentInfo;
import wenrgise.workflow.core.WflService;
import wenrgise.workflow.core.WflStatus;
import wenrgise.workflow.core.WorkFlow;
import wenrgise.workflow.exception.WorkFlowServiceNotFoundException;
import wenrgise.workflow.impl.WorkFlowImpl;
public class WflServiceImpl implements WflService {
public static final Logger log = Logger.getLogger("wenrgise.workflow.utility.WorkflowPlugin");
public boolean canDo(WflDocumentInfo docInfo) throws EnrgiseApplicationException, EnrgiseSystemException {
return true;
}
public WflStatus process(WflDocumentInfo docInfo) {
try {
WorkFlow wfl = getWorkFlowImplementation(docInfo);
log.severe("proc1");
if (wfl != null) {
log.severe("proc2");
return wfl.start(docInfo);
}
return null;
} catch (WorkFlowServiceNotFoundException oSx) {
return null;
}
}
private WorkFlow getWorkFlowImplementation(WflDocumentInfo docInfo) throws WorkFlowServiceNotFoundException {
return (WorkFlow)new WorkFlowImpl();
}
}

View File

@@ -0,0 +1,35 @@
package wenrgise.workflow.core.impl;
import wenrgise.workflow.core.WflSite;
public class WflSiteImpl implements WflSite {
private String siteId = null;
private String parentSiteId = null;
private String siteName = null;
public String getSiteId() {
return this.siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getParentSiteId() {
return this.parentSiteId;
}
public void setParentSiteId(String parentSiteId) {
this.parentSiteId = parentSiteId;
}
public String getSiteName() {
return this.siteName;
}
public void setSiteName(String newSiteName) {
this.siteName = newSiteName;
}
}

View File

@@ -0,0 +1,46 @@
package wenrgise.workflow.core.impl;
import wenrgise.workflow.core.WflResource;
import wenrgise.workflow.core.WflStatus;
public class WflStatusImpl implements WflStatus {
private String status = null;
private WflResource wflResource = null;
private String errCode;
private String errMsg;
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public WflResource assignedTo() {
return this.wflResource;
}
public void assign(WflResource resource) {
this.wflResource = resource;
}
public String getErrCode() {
return this.errCode;
}
public void setErrCode(String newErrCode) {
this.errCode = newErrCode;
}
public String getErrMsg() {
return this.errMsg;
}
public void setErrMsg(String newErrMsg) {
this.errMsg = newErrMsg;
}
}