|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectogre.dms.util.client.FlowClient
public class FlowClient
Title: Flowring Docpedia Project
Description:
User can get afMap from Flow Globals ,
ex:
var dataMap = Server.getGlobals(MyTask.getRootID()); //============================= afMap.put("ReqKey", reqKey); afMap.put("DMSServerIP", env.getServerIP()); afMap.put("DMSServerPort", env.getServerPortInString()); afMap.put("Type", type); public final static String APPROVE_TYPE_CHECKIN = "ApCkIn"; public final static String APPROVE_TYPE_PUBLISH = "ApPub"; public final static String APPROVE_TYPE_DELETE = "ApDel"; public final static String APPROVE_TYPE_CANCEL = "ApCan"; if (type is cancel ) afMap.put("OriginalRequest", request);
Constructor Summary | |
---|---|
FlowClient(String dmsIP,
String dmsPort)
Create a FlowClient Object to let flow engine communicate with DMS. |
Method Summary | |
---|---|
void |
approveCheckIn(String reqKey,
String status,
boolean whitSubDoc,
boolean autoPublish,
String checkinMode)
Call this function when the process of check-in document is finished. |
void |
approveCheckIn(String reqKey,
String status,
boolean whitSubDoc,
boolean autoPublish,
String checkinMode,
HashMap map)
Call this function when the process of check-in document is finished. |
void |
approveObsolete(String reqKey,
boolean approveResult,
HashMap map)
Obsolete Document |
void |
cancelApprove(String reqKey)
Call this function when the process is cancelled. |
void |
cancelApprove(String reqKey,
HashMap map)
Call this function when the process is cancelled. |
void |
copyAttFileInfoToDMS(String fileInfoString,
String reqKey,
boolean removeOld)
Copy attfileInfo of eform to DMS. |
String |
copyFileToFlow(VirtualDocument vd,
pe.pase.Task MyTask)
Copy physical files of the Virtual Documentall to Flow server and return attfileInfo String. |
String |
copyFileToFlow(VirtualDocument vd,
pe.pase.Task MyTask,
String subArtInsID)
Copy sub Document(ISO Level 4 Doc)attFile to sub ArtInstance. |
void |
copyTaskAttFileInfoToDMS(String TaskAttachedFileList,
String reqKey,
boolean removeOld)
|
String |
coverDateString(Long longDate)
Transform millisecond into yyyy/mm/DD String |
void |
disconnectServer()
Disconnect DMS connection. |
protected void |
finalize()
|
void |
finishApprove(String reqKey,
boolean result)
Call this function when the process of creating document is finished. |
void |
finishApprove(String reqKey,
boolean result,
boolean withSubDoc)
Call this function when the process of creating document is finished. |
void |
finishApprove(String reqKey,
boolean result,
boolean withSubDoc,
boolean autoPublish)
Call this function when the process of creating document is finished. |
void |
finishApprove(String reqKey,
boolean result,
boolean withSubDoc,
boolean autoPublish,
HashMap map)
Call this function when the process of creating document is finished. |
void |
finishApprove(String reqKey,
boolean result,
boolean withSubDoc,
HashMap map)
Call this function when the process of creating document is finished. |
void |
finishApprove(String reqKey,
boolean result,
HashMap map)
Call this function when the process of creating document is finished. |
static FlowClient |
FlowClientInstance(String dmsIP,
String dmsPort)
|
void |
forceObsoleteDocument(String applyerMemberID,
String docKey)
Obsolete Document Deprecated. |
Vector |
getACL(String subject)
get document ACL by Document Key or get folder ACL by Folder ID |
AttributeType |
getAttributeType(String typeID)
Get AttributeType Object from DMS |
Vector |
getAttributeTypeFullPath(String attrTypeID)
Get full path of attribute type |
Vector |
getAuthorityRecordItemByDocKey(String docKey)
Get AuthorityRecordItem by Document Key |
String |
getCategoryString(VirtualDocument vd)
Get CategoryList String of Virtual Document |
Vector |
getCoSignMemberList(String docKey)
Get countersign record by Document Key |
String |
getCreationDate(VirtualDocument vd)
Get CreationDate of Virtual Document |
Vector |
getDefaultACL(String folderID)
get default ACL of folder |
Vector |
getDefaultVirtualDocumentACL(VirtualDocument vd)
get Default Document ACL. |
DMCI |
getDMCI()
Retrieve the DMCI instance that can get any Service which you need. |
String |
getDocBelongToDeptManagerByDocKeyVec(String docKeys)
getFolderManagersByDocKeyVec V3.0 |
String |
getExpiryDate(VirtualDocument vd)
Get ExpiryDate of Virtual Document |
Vector |
getExtUserList()
get all External Users. |
Vector |
getExtUserListByGroup(String groupID)
Get all External Users by groupID. |
Vector |
getFolderFullPath(String subject)
Get full path of folder from leaf to root by DocKey, FolderID or AttributeID. |
String |
getFolderManagersByDocKeyVec(String docKeys)
getFolderManagersByDocKeyVec V3.0 |
String |
getKeywordString(VirtualDocument vd)
Get Keyword of Virtual Document |
String |
getParentVerDocKey(String docKey)
Get Document Key of the last version. |
Vector |
getPDACL(String docKey)
get physical document ACL by Document Key |
String |
getPlanPublishDate(VirtualDocument vd)
Get PlanPublishDate of Virtual Document |
Vector |
getRelationRecordList(String docKey)
Get Relation Record List by Document Key of source document |
Vector |
getRelationRecordList(String docKey,
String type)
Get Relation Record List by Document Key of source document and document type of target document. |
VirtualDocument |
getUpToDateDocument(String docID)
Get up-to-date Virtual Document by DocumentID |
VirtualDocument |
getVirtualDocument(String reqKey)
get the VirtualDocumet related to the request ID or DocKey Example: var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var vd = dmsFlowClient.getVirtualDocument(reqKey); |
VirtualFolder |
getVirtualFolder(String folderID)
get the VirtualFolder related to the request ID or folderID |
void |
insertAuthorityRecord(AuthorityRecordItem auRecItem)
insert Authority Record to DMS |
void |
insertAuthorityRecord(HashMap hm)
insert Authority Record to DMS Deprecated. |
void |
newCoSignMember(CoSignMember csMember)
Bring CounterSign Record to DMS. |
void |
newCoSignMember(HashMap map)
Bring CounterSign Record to DMS. |
void |
newDistributionMember(DistributionMember disMember)
Bring Distribution Member to DMS Example: var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var disMem = new Packages.ogre.dms.data.DistributionMember; disMem.setMemberID(memID); disMem.setDocKey(docKey); dmsFlowClient.newDistributionMember(disMem); |
void |
newDistributionMember(HashMap map)
Bring Distribution Member to DMS Deprecated. |
void |
newNotifyMember(HashMap map)
Bring Ntification Member to DMS Deprecated. |
void |
newNotifyMember(NotifyMember noMember)
Bring Ntification Member to DMS Example: var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var notifyMemMap = new java.util.HashMap(); notifyMemMap.put("MemberID", memID); notifyMemMap.put("DocKey", docKey); dmsFlowClient.newDistributionMember(notifyMemMap); |
String |
newPublishVD(String loginID,
String docName,
String docDescription,
String[] keyWord,
String[] category,
String folderKey,
String attributeTypeID,
String fileInfoString)
Create a Virtual Document and publish it |
void |
newSignRecord(HashMap map)
Bring Sign Record to DMS, let users can see SignRecord when they click the Approving Record Tag of index card in DMS. |
void |
newSignRecord(SignRecord signRec)
Bring Sign Record to DMS, let users can see SignRecord when they click the Approving Record Tag of index card in DMS. |
String |
newVD(String loginID,
String docName,
String docDescription,
String[] keyWord,
String[] category,
String folderKey,
String attributeTypeID,
String fileInfoString)
Create a new Virtual Document and put it in the workspace of assigned user |
DMSResult |
publishVD(String loginID,
String docKey,
String folderKey)
Publish a Virtual Document to a assigned folder |
boolean |
removeAuthorDefaultACL(VirtualDocument vd)
remove Author default ACL of dockeyID |
boolean |
removeDocumentPD(String docID)
Remove all physical files of virtual document |
DMSResult |
setACL(String userID,
String subject,
Vector aciVec)
update ACL of Virtual Document or Folder |
DMSResult |
setACL(String subject,
Vector aciVec)
update ACL of Virtual Document or Folder |
DMSResult |
setDefaultACL(String folderID,
Vector aciVec)
set default ACL of folder |
DMSResult |
setPDACL(String subject,
Vector aciVec)
set physical document ACL by Document Key or Folder ID |
DMSResult |
updateDefaultACL(DMSUser user,
String docKey,
String folderKey)
copy folder ACL to document ACL |
void |
updateVDtoDMS(HashMap map,
String reqKey,
boolean removeOld)
Update Virtual Document to DMS. |
void |
updateVDtoDMS(VirtualDocument vd,
String reqKey,
boolean removeOld)
Update Virtual Document to DMS. |
boolean |
uploadFileToDMS(String filePath,
String fileName,
String reqKey)
Upload a file into Virtual Document |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlowClient(String dmsIP, String dmsPort)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub, ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient( dataMap.get("DMSServerIP"), dataMap.get("DMSServerPort") );
dmsIP
- StringdmsPort
- StringgetDMCI()
Method Detail |
---|
public static FlowClient FlowClientInstance(String dmsIP, String dmsPort)
public DMCI getDMCI()
public void disconnectServer()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void finishApprove(String reqKey, boolean result)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); if (requestType.equals("ApPub")) {//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means Rejectpublic void finishApprove(String reqKey, boolean result, HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap.get("DMSServerPort")); var cTime = new java.util.Date(); var endTime = cTime.getTime().toString();//use current time as end time because finishApprove function is usually used in last node of the process var totalProcessTime = //count the total process time yourself. you can use current time to minus process startTime var timeMap = new java.util.HashMap(); timeMap.put("endTime", endTime); timeMap.put("processTime", totalProcessTime); if (requestType.equals("ApPub")) {//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true, timeMap); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means Rejectmap
- HashMap this map contains endTime and processTimepublic void finishApprove(String reqKey, boolean result, boolean withSubDoc)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap.get("DMSServerPort")); if (requestType.equals("ApPub")){//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true, true); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means RejectwithSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentpublic void finishApprove(String reqKey, boolean result, boolean withSubDoc, HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var cTime = new java.util.Date(); var endTime = cTime.getTime().toString();//use current time as end time because finishApprove function is usually used in last node of the process var totalProcessTime = //count the total process time yourself. you can use current time to minus process startTime var timeMap = new java.util.HashMap(); timeMap.put("endTime", endTime); timeMap.put("processTime", totalProcessTime); if (requestType.equals("ApPub")){//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true, true, timeMap); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means RejectwithSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentmap
- HashMap this map contains endTime and processTimepublic void finishApprove(String reqKey, boolean result, boolean withSubDoc, boolean autoPublish)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); * if (requestType.equals("ApPub")){//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true, true, true, timeMap); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means RejectwithSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentautoPublish
- boolean get publish Folder By VD AttributeType mapping automaticallypublic void finishApprove(String reqKey, boolean result, boolean withSubDoc, boolean autoPublish, HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var cTime = new java.util.Date(); var endTime = cTime.getTime().toString();//use current time as end time because finishApprove function is usually used in last node of the process var totalProcessTime = //count the total process time yourself. you can use current time to minus process startTime var timeMap = new java.util.HashMap(); timeMap.put("endTime", endTime); timeMap.put("processTime", totalProcessTime); if (requestType.equals("ApPub")){//when a user create a document the requestType will be set as "ApPub" dmsFlowClient.finishApprove(reqKey, true, true, true, timeMap); }
reqKey
- String request keyresult
- boolean approving result, true means Agree, false means RejectwithSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentautoPublish
- boolean get publish Folder By VD AttributeType mapping automaticallymap
- HashMap this map contains endTime and processTimepublic void approveCheckIn(String reqKey, String status, boolean whitSubDoc, boolean autoPublish, String checkinMode)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); if(requestType.equals("ApCkIn")){ dmsFlowClient.approveCheckIn(reqKey, "Accept", true, true, "REVISION") }
reqKey
- String request keystatus
- String approving result, "Accept" or "Reject"whitSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentautoPublish
- boolean get publish Folder By VD AttributeType mapping automaticallycheckinMode
- String revise vision or just edit, "REVISION" or "EDIT"public void approveCheckIn(String reqKey, String status, boolean whitSubDoc, boolean autoPublish, String checkinMode, HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var cTime = new java.util.Date(); var endTime = cTime.getTime().toString();//use current time as end time because approveCheckIn function is usually used in last node of the process var totalProcessTime = //count the total process time yourself. you can use current time to minus process startTime var timeMap = new java.util.HashMap(); timeMap.put("endTime", endTime); timeMap.put("processTime", totalProcessTime); if (requestType.equals("ApCkIn")) { dmsFlowClient.approveCheckIn(reqKey, "Accept", true, true, "REVISION", timeMap) }
reqKey
- String request keystatus
- String approving result, "Accept" or "Reject"whitSubDoc
- boolean publish subDoc(ISO Level 4 Doc) together with parent documentautoPublish
- boolean get publish Folder By VD AttributeType mapping automaticallycheckinMode
- String revise vision or just edit, "REVISION" or "EDIT"map
- HashMap this map contains endTime and processTimepublic void cancelApprove(String reqKey)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); dmsFlowClient.cancelApprove(reqKey);
reqKey
- Stringpublic void cancelApprove(String reqKey, HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var cTime = new java.util.Date(); var endTime = cTime.getTime().toString();//use current time as end time because cancelApprove function is usually used in the end of process var totalProcessTime = //count the total process time yourself. you can use current time to minus process startTime var timeMap = new java.util.HashMap(); timeMap.put("endTime", endTime); timeMap.put("processTime", totalProcessTime); dmsFlowClient.cancelApprove(reqKey, timeMap);
reqKey
- Stringpublic void forceObsoleteDocument(String applyerMemberID, String docKey)
applyerMemberID
- String applyer memberIDdocKey
- Stringpublic void approveObsolete(String reqKey, boolean approveResult, HashMap map)
reqKey
- StringapproveResult
- booleanmap
- HashMappublic VirtualDocument getVirtualDocument(String reqKey)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var vd = dmsFlowClient.getVirtualDocument(reqKey);
ID
- requestID
public VirtualFolder getVirtualFolder(String folderID)
ID
- folderID
public boolean removeDocumentPD(String docID)
docID
- String
public boolean uploadFileToDMS(String filePath, String fileName, String reqKey)
filePath
- StringfileName
- StringreqKey
- String VirtualDocument ID
public void copyAttFileInfoToDMS(String fileInfoString, String reqKey, boolean removeOld)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var attInfo = artIns.getAppValue("attInfo");//attached file component of artInstance dmsFlowClient.copyAttFileInfoToDMS(attInfo, reqKey, true);
fileInfoString
- String AttfileInfoString from artInsreqKey
- requestID or DocumentKeyremoveOld
- boolean is need clear pd List of target vdpublic void copyTaskAttFileInfoToDMS(String TaskAttachedFileList, String reqKey, boolean removeOld)
public void updateVDtoDMS(HashMap map, String reqKey, boolean removeOld)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var hm = new java.util.HashMap(); hm.put("DocumentName", docName); hm.put("DocSecurityLevel", level); hm.put("ExpiryDate", expiryDate); hm.put("AttributeTypeID", attrTypeID); hm.put("VersionID", docVersion); hm.put("Description", description); dmsFlowClient.updateVDtoDMS(hm, reqKey, true);
all keys of hm: DocumentKey //This is generated by the system and the system will not allow you to change it! DocumentName DocumentType Status ParentFolderID LastUpdateDate UnitType DocumentID //This is generated by the system and the system will not allow you to change it! VersionID UpToDate AuthorID AuthorName Description CreationDate ExpiryDate ActualPublishDate PlanPublishDate PublishFolderID ExtraFeatures RelatedDocuments RefDocumentTemplateID BelongToDept AuthorDept DocSecurityLevel DocLevel DocCategory AttributeTypeID Paperless Att1 ˜ Att35
map
- HashMapreqKey
- StringremoveOld
- boolean remove original physical files or notpublic void updateVDtoDMS(VirtualDocument vd, String reqKey, boolean removeOld)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsServerIP = dataMap.get("DMSServerIP"); var dmsServerPort = dataMap.get("DMSServerPort"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dmsServerIP, dmsServerPort); var vd = dmsFlowClient.getVirtualDocument(reqKey); vd.setDocumentName(docName); vd.setDescription(description); vd.setExpiryDate(expiryDate); dmsFlowClient.updateVDtoDMS(vd, reqKey, true);
vd
- VirtualDocumentreqKey
- StringremoveOld
- boolean remove original physical files or notpublic void newSignRecord(HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var signRecMap = new java.util.HashMap(); signRecMap.put("RoleName", roleName); //the role name of the approver signRecMap.put("MemberName", name); //the name of the approver signRecMap.put("MemberID", memID); //the member ID of the approver signRecMap.put("DepName", dep); //the department name of the approver signRecMap.put("SignTime", date); //when the approver signed. type of date is String and use the format which you want to present(ex:2005-06-08 16:50:00) signRecMap.put("ProcessTime", duration); //how much time the approver spent signRecMap.put("Phase", processName); //the node name signRecMap.put("Result", isYesString); //result of approving signRecMap.put("Comment", managerReason); //approver's comment signRecMap.put("DocumentKey", docKey); //Document Key of the Virtual Document signRecMap.put("ReqType", requestType); //Request Type signRecMap.put("RootTaskID", rootTaskID); //Root Task ID signRecMap.put("StartTime", startTime.toString()); //the start time of this node. type is String, but the format is millisecond signRecMap.put("EndTime", new java.util.Date().getTime().toString());//the end time of this node. type is String, but the format is millisecond signRecMap.put("TaskID", MyTask.getID()); //the Task ID of this node dmsFlowClient.newSignRecord(signRecMap);
map
- HashMappublic void newSignRecord(SignRecord signRec)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var signRec = new Packages.ogre.dms.data.SignRecord(); signRec.setRoleName(roleName); //the role name of the approver signRec.setMemberName(name); //the name of the approver signRec.setMemberID(memID); //the member ID of the approver signRec.setDepName(dep); //the department name of the approver signRec.setSignTime(date); //when the approver signed. type of date is String and use the format which you want to present(ex:2005-06-08 16:50:00) signRec.setProcessTime(duration); //how much time the approver spent signRec.setPhase(processName); //the node name signRec.setResult(isYesString); //result of approving signRec.setComment(managerReason); //approver's comment signRec.setDocumentKey(docKey); //Document Key of the Virtual Document signRec.setReqType(requestType); //Request Type signRec.setRootTaskID(rootTaskID); //Root Task ID signRec.setStartTime(startTime.toString()); //the start time of this node. type is String, but the format is millisecond signRec.setEndTime(new java.util.Date().getTime().toString());//the end time of this node. type is String, but the format is millisecond signRec.setTaskID(MyTask.getID()); //the Task ID of this node dmsFlowClient.newSignRecord(signRec);
signRec
- SignRecordpublic void newCoSignMember(HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var csignMemMap = new java.util.HashMap(); csignMemMap.put("MemberID", memID); //the memberID of countersigner csignMemMap.put("DocKey", docKey); //Document Key csignMemMap.put("DocID", docID); //Document ID csignMemMap.put("ProcessTime", processTime); //how much time the countersigner spent csignMemMap.put("TaskID", coSignRootTaskID); //Root Task ID of CoSign Process csignMemMap.put("RootTaskID", rootTaskID); //Root Task ID of parent process csignMemMap.put("DepID", depID); //the department ID of countersigner csignMemMap.put("StartTime", startTime); //the start time of this node. type is String, but the format is millisecond csignMemMap.put("EndTime", endTime); //the end time of this node. type is String, but the format is millisecond dmsFlowClient.newCoSignMember(csignMemMap);
map
- HashMappublic void newCoSignMember(CoSignMember csMember)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var csignMem = new Packages.ogre.dms.data.CoSignMember(); csignMem.setMemberID(memID); //the memberID of countersigner csignMem.setDocKey(docKey); //Document Key csignMem.setDocID(docID); //Document ID csignMem.setProcessTime(processTime); //how much time the countersigner spent csignMem.setTaskID(coSignRootTaskID); //Root Task ID of CoSign Process csignMem.setRootTaskID(rootTaskID); //Root Task ID of parent process csignMem.setDepID(depID); //the department ID of countersigner csignMem.setStartTime(startTime); //the start time of this node. type is String, but the format is millisecond csignMem.setEndTime(endTime); //the end time of this node. type is String, but the format is millisecond dmsFlowClient.newCoSignMember(csignMem);
csMember
- CoSignMemberpublic void newDistributionMember(HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var disMemMap = new java.util.HashMap(); disMemMap.put("MemberID", memID); disMemMap.put("DocKey", docKey); dmsFlowClient.newDistributionMember(disMemMap);
map
- HashMappublic void newDistributionMember(DistributionMember disMember)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var disMem = new Packages.ogre.dms.data.DistributionMember; disMem.setMemberID(memID); disMem.setDocKey(docKey); dmsFlowClient.newDistributionMember(disMem);
disMember
- DistributionMemberpublic void newNotifyMember(HashMap map)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var notifyMemMap = new java.util.HashMap(); notifyMemMap.put("MemberID", memID); notifyMemMap.put("DocKey", docKey); dmsFlowClient.newDistributionMember(notifyMemMap);
map
- HashMappublic void newNotifyMember(NotifyMember noMember)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"), dataMap .get("DMSServerPort")); var notifyMemMap = new java.util.HashMap(); notifyMemMap.put("MemberID", memID); notifyMemMap.put("DocKey", docKey); dmsFlowClient.newDistributionMember(notifyMemMap);
map
- HashMappublic void insertAuthorityRecord(HashMap hm)
hm
- HashMappublic void insertAuthorityRecord(AuthorityRecordItem auRecItem)
auRecItem
- AuthorityRecordItempublic Vector getAuthorityRecordItemByDocKey(String docKey)
docKey
- String
public Vector getCoSignMemberList(String docKey)
docKey
- String
public AttributeType getAttributeType(String typeID)
typeID
- String
public Vector getAttributeTypeFullPath(String attrTypeID)
attrTypeID
- String
public String copyFileToFlow(VirtualDocument vd, pe.pase.Task MyTask)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var vd = dmsFlowClient.getVirtualDocument(reqKey); var attFileInfo = dmsFlowClient.copyFileToFlow(vd, MyTask); var artIns = MyTask.getArtInstance(); artIns.setAppValue("attInfo", attFileInfo);//attInfo is the name of attachefile component in eform
vd
- VirtualDocumentMyTask
- Task
public String copyFileToFlow(VirtualDocument vd, pe.pase.Task MyTask, String subArtInsID)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient(dataMap.get("DMSServerIP"),dataMap.get("DMSServerPort")); var level4RelationRecord = dmsFlowClient.getRelationRecordList(docKey, "iso4"); for (var i = 0, j = level4RelationRecord.size(); i < j; i++) { var relRec = fourthLevelDoc.get(i); //RelationRecord object var targetID = relRec.getTargetID(); //iso level 4 documentID var vd = dmsFlowClient.getUpToDateDocument(reqKey); var artInsL4 = Server.createArtInstance("ART00041110425406235"); //create artInstance for level 4 eform var artInsID = artInsL4.getID(); var attFileInfo = dmsFlowClient.copyFileToFlow(vd, MyTask, artInsID); artInsL4.setAppValue("attInfo", attFileInfo);//attInfo is the name of attached file component in eform }
vd
- VirtualDocument sub Document VDMyTask
- Task root Process TasksubArtInsID
- String sub Document create Form ArtInstanceID
public String getParentVerDocKey(String docKey)
Example:
var dataMap = Server.getGlobals(MyTask.getRootID()); var requestType = dataMap.get("Type");//requestType has three types in common use: ApPub,ApCkIn and ApObsolete var reqKey = dataMap.get("ReqKey"); var dmsFlowClient = new Packages.ogre.dms.util.client.FlowClient( dataMap.get("DMSServerIP"), dataMap.get("DMSServerPort") ); var vd = dmsFlowClient.getVirtualDocument(reqKey); var docKey = vd.getDocumentKey(); //last version is existent is always in check-in and obsolete status if ("ApCkIn".equals(requestType) || "ApObsolete".equals(requestType)) { var parentDocKey = dmsFlowClient.getParentVerDocKey(docKey); }
docKey
- String
public Vector getRelationRecordList(String docKey)
docKey
- String
public Vector getRelationRecordList(String docKey, String type)
Example:
var docKey = vd.getDocumentKey(); //Document Key of source document var rrVec = dmsFlowClient. getRelationRecordList (docKey , "iso4"); for (var i = 0, j = rrVec.size(); i < j; i++) { var docName = rrVec.get(i).getRelationName(); //Document Name of target document var docType = rrVec.get(i).getRelationType(); //iso4 or normal var sourceKey = rrVec.get(i).getSourceKey(); //Document Key of source document var targetKey = rrVec.get(i).getTargetKey(); //Document Key of target document var createDate = rrVec.get(i).getCreateDate(); //created date }
docKey
- Stringtype
- String "iso4" or "normal"
public VirtualDocument getUpToDateDocument(String docID)
docID
- String
public String getCategoryString(VirtualDocument vd)
vd
- VirtualDocument
public String getKeywordString(VirtualDocument vd)
vd
- VirtualDocument
public String getExpiryDate(VirtualDocument vd)
vd
- VirtualDocument
public String getCreationDate(VirtualDocument vd)
vd
- VirtualDocument
public String getPlanPublishDate(VirtualDocument vd)
vd
- VirtualDocument
public String coverDateString(Long longDate)
longDate
- Long
public DMSResult updateDefaultACL(DMSUser user, String docKey, String folderKey)
user
- DMSUserdocKey
- String document keyfolderKey
- String folder ID
public DMSResult setACL(String subject, Vector aciVec)
subject
- String Document Key or Folder IDaciVec
- Vector contains AccessControlItem objects
public DMSResult setACL(String userID, String subject, Vector aciVec)
userID
- subject
- String Document Key or Folder IDaciVec
- Vector contains AccessControlItem objects
public DMSResult setPDACL(String subject, Vector aciVec)
subject
- String Document Key or Folder IDaciVec
- Vector contains AccessControlItem objects
public DMSResult setDefaultACL(String folderID, Vector aciVec)
folderID
- String Folder IDaciVec
- Vector contains AccessControlItem objects
public Vector getPDACL(String docKey)
docKey
- String document key
public Vector getACL(String subject)
subject
- String Document Key or Folder ID
public Vector getDefaultACL(String folderID)
folderID
- String Folder id
public boolean removeAuthorDefaultACL(VirtualDocument vd)
dockeyID
- String Document id
public DMSResult publishVD(String loginID, String docKey, String folderKey)
loginID
- StringdocKey
- String virtualDocument IDfolderKey
- String target FolderID
public String newVD(String loginID, String docName, String docDescription, String[] keyWord, String[] category, String folderKey, String attributeTypeID, String fileInfoString)
loginID
- String assigned user's login IDdocName
- StringdocDescription
- StringkeyWord
- String[]category
- String[]folderKey
- StringattributeTypeID
- StringfileInfoString
- String attached file component on eform(artIns.getAppValue("Attfile"))
public String newPublishVD(String loginID, String docName, String docDescription, String[] keyWord, String[] category, String folderKey, String attributeTypeID, String fileInfoString)
loginID
- StringdocName
- StringdocDescription
- StringkeyWord
- StringfolderKey
- String assigned floderIDattributeTypeID
- String assigned attributeTypeID *fileInfoString
- artIns.getAppValue("fileAttName");
public Vector getFolderFullPath(String subject)
Example:
var fullPathVec = dmsFlowClient.getFolderFullPath("ATT_0000000031"); for (var i = 0, j = fullPathVec.size(); i < j; i++) { var folderName = fullPathVec.get(i).get("name");//i=0 is leaf folder name var folderID = fullPathVec.get(i).get("id");//FolderID }
subject
- String DocKey, FolderID or AttributeID
public Vector getExtUserList()
Example: var extUserList = dmsFlowClient.getExtUserList(); for (var i = 0, j = extUserList.size() ; i < j ; i++) { var userName = extUserList.get(i).getUserName(); //user's name var loginID = extUserList.get(i).getLoginID(); //user's login ID var userEmail = extUserList.get(i).getEMail(); // user's email var userHome = extUserList.get(i).getHome(); //user's company }
public Vector getExtUserListByGroup(String groupID)
Example:
var groupID = "EXTGroup_0000000001"; var extUserList = getExtUserListByGroup(groupID); for (var i = 0, j = extUserList.size() ; i < j ; i++) { var userName = extUserList.get(i).getUserName(); //user's name var loginID = extUserList.get(i).getLoginID(); //user's login ID var userEmail = extUserList.get(i).getEMail(); // user's email var userHome = extUserList.get(i).getHome(); //user's company }
groupID
-
public Vector getDefaultVirtualDocumentACL(VirtualDocument vd)
public String getFolderManagersByDocKeyVec(String docKeys)
public String getDocBelongToDeptManagerByDocKeyVec(String docKeys)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |