Agentflow
V3.1

pe.pase
Class BasedClientAPI

java.lang.Object
  extended by pe.pase.BasedClientAPI
All Implemented Interfaces:
ClientAPI
Direct Known Subclasses:
webform.WebFormClientAPI

public abstract class BasedClientAPI
extends java.lang.Object
implements ClientAPI


Field Summary
protected  Log logger
           
protected  DBService m_dbService
           
protected  FileService m_fileService
           
protected  FlowService m_flowService
           
protected  OrgService m_orgService
           
protected  PDEService m_pdeService
           
protected  ReportService m_reportService
           
protected  SecurityService m_securityService
           
protected  UtilityService m_utilityService
           
 
Constructor Summary
BasedClientAPI()
           
 
Method Summary
 void addDebugLog(java.lang.String msg)
          Add debug log message.
 void addErrLog(java.lang.String msg)
          Add err log message.
 void addExeLog(java.lang.String msg)
          Add execution log message.
 boolean addFreqApRole(java.lang.String freID, java.lang.String rolID)
          Add a PASEFreqAP role.
 void addInfoLog(java.lang.String msg)
          Add information log message.
 boolean addMonitorRelation(java.lang.String sourceTaskID, java.lang.String createdRootTaskID)
          Add task monitor relation, store root task ID and those created root task ID when executed.
 boolean addMonitorRelation(java.lang.String sourceTaskID, java.util.Vector createdRootTaskIDs)
          Add task monitor relation, store root task ID and those created root task ID when executed.
 int addNewSessionConnectionURL(int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Add a new db URL at the end of the db configuration list.
 void addSessionConnectionURL(int seq, int type, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Set a db URL to db configuration.
 void addSessionConnectionURL(int seq, int type, java.lang.String name, java.lang.String dburl, java.lang.String username, java.lang.String password)
          Set a db URL to db configuration.
 void addWarningLog(java.lang.String msg)
          Add warning log message.
 void announceOnlineClient(ClientMessage msg)
          Annouce a message to online Client.
 java.util.List ArtSQLloadValue(java.lang.String sql)
          The method is used to load value from database by nickname (the RTRepository).
 java.util.Vector batchProcess(java.util.List completeTask, java.util.List removeTask, java.util.List createPro)
          For flow control, batch create, remove and complete process Examples: // CompleteTask var completeVector = new java.util.Vector(); var tsk = Client.getTask("Tsk000000832832"); Client.checkTaskComplete(tsk); completeVector.add(tsk); java.lang.System.out.println("Complete"); // RemoveRootTask var removeVector = new java.util.Vector(); removeVector.add("Tsk000000835835"); java.lang.System.out.println("Remove"); // CreateProcess var createVector = new java.util.Vector(); var cv = new java.util.Vector(); var userID = "jdwa"; var proID = "PRO0570993694941810"; var hm = new java.util.HashMap(); var popUp = new java.lang.Boolean("true"); cv.add(userID); cv.add(proID); cv.add(hm); cv.add(popUp); createVector.add(cv); java.lang.System.out.println("Create"); // Call bachProcess var ret = Client.batchProcess(completeVector, removeVector, createVector); java.lang.System.out.println(ret);
 boolean checkPassword(java.lang.String loginId, java.lang.String pass)
          Check user input password whether it's correct.
 boolean checkPassword(java.lang.String mID, java.lang.String pwd, java.util.Vector roleList)
          Check user input password whether it's correct and whether the user is in role list.
 boolean checkTaskComplete(Task t)
          Check the task and fit it to the complete-conditon.
abstract  void clearCache()
          This method is using for clear client cache Examples: Client.clearCache();
 void clearServerCache()
          This method is using for clear server cache Examples: Client.clearServerCache();
 boolean closeForm(javax.swing.JPanel innerframe)
          Close the form in Agenda.
 java.util.HashMap completeTask(Task t)
          Complete the task.
 java.util.HashMap completeTask(Task t, java.lang.String stateID)
          Complete the task with setting the artifact state.
abstract  boolean connect()
           
 PASEartInstance createArtInstance(java.lang.String aID)
          Create artifact instance.
 PASEartInstance createArtInstance(java.lang.String tID, java.lang.String aID)
          Create artifact instance.
abstract  javax.swing.JPanel createForm(java.lang.String artInsID)
          Create a artifact form by current artifact style in Agenda.
 javax.swing.JPanel createForm(java.lang.String artID, java.lang.String artInsID)
          Create a artifact form in Agenda.
 javax.swing.JPanel createForm(java.lang.String artInsID, java.lang.String stateName, boolean bRunScript)
          Create a artifact form by current artifact style in Agenda.
 javax.swing.JPanel createForm(java.lang.String artInsID, java.lang.String stateName, boolean bRunScript, boolean save)
           
abstract  javax.swing.JPanel createForm(java.lang.String artInsID, java.lang.String stateName, boolean bRunScript, boolean save, boolean print, int close, int x, int y, int width, int height)
          Create a artifact form by current artifact style in Agenda.
abstract  void createFormExt(java.lang.String artInsID, java.lang.String stateName, boolean isRunScript, boolean canSave, boolean canPrint, boolean canReviewProcess)
          Opens a form with the specified parameters.
 PASEartInstance createFreqArtInstance(java.lang.String aID)
           
 java.lang.String createProcess(java.lang.String proID, java.util.HashMap args)
          Create an auto-popup process and assign to current operator.
 java.lang.String createProcess(java.lang.String proID, java.util.HashMap args, boolean isPopUp)
          Create a process by specified isPopUp value and assign to current operator.
 java.lang.String createProcess(java.lang.String usrID, java.lang.String proID, java.util.HashMap args)
          Create a non-auto-PopUp process and assign to specified member id.
 java.lang.String createProcess(java.lang.String usrID, java.lang.String proID, java.util.HashMap args, boolean isPopUp)
          Create a process by specified isPopUp value and assign to specified member id.
abstract  java.lang.String createProcess(java.lang.String usrID, java.lang.String proID, java.util.HashMap args, boolean isPopUp, boolean isDelible)
          Create a process by specified isPopUp and isDelible value and assign to specified member id.
abstract  java.lang.String createProcess(java.lang.String userID, java.lang.String roleID, java.lang.String proID, java.util.HashMap args, boolean isPopUp, boolean isDelible, java.lang.String taskID, java.lang.String dtTemplateID, boolean isShowMonitorRelation)
          Create a process by specified isPopUp and isDelible and isShowMonitorRelation value and assign to specified member id and use the specified DataTransferTemplate.
 java.lang.String createProcessByRandom(java.lang.String proID, java.util.HashMap args)
          Create a non-auto-PopUp process and assign to random of specified roles.
 ScheduleEvent createScheduleEvent()
          Create new ScheduleEvent Examples: var event = Client.createScheduleEvent();
 SessionConnection createSessionConnection(int sequence)
          Create a SessionConnection object with database configuration, by the specific sequence.
 SessionConnection createSessionConnection(java.lang.String name)
          Create a SessionConnection object with database configuration, by the specific name.
 boolean delete(java.lang.String sqlcmd)
          The method is used to delete value in database (the RTRepository).
 boolean delete(java.lang.String sqlcmd, java.util.Vector record, java.util.Vector columnTypeList)
          The method is used to delete value in database (the RTRepository).
 boolean deleteCompany(Company company)
          Delete a Company in organization.
 boolean deleteDepartment(Department dep)
          Delete a Department in organization.
 boolean deleteGlobals(java.lang.String rootTaskID)
          Delete globals.
 boolean deleteMemberRecord(MemberRecord mbr)
          Delete a MemberRecord in organization.
 boolean deletePASEMessage(PASEMessage msg)
          Delete message from database.
 boolean deleteRole(Role role)
          Delete a Role in organization.
 java.util.HashMap deleteSessionConnectionURL(java.lang.String name)
          Delete a db URL from db configuration.
 boolean deleteTaskAttachedFile(java.lang.String fileID)
          Get file content of the specified task attached file.
 boolean disconnect()
           
 boolean doUIAction(java.lang.String action, java.util.Hashtable globalVar)
          Note: JSP WebForm does not implement this method.
 boolean forceCompleteATask(Task parentTask)
          Completea an task, which task type is "Add Announce Sign".
 boolean forceReassignTask(java.lang.String p_TaskID, java.lang.String p_MemID)
          Force to reassign the task.
 java.lang.String generateID()
          Note: JSP WebForm does not implement this method.
 java.util.Vector getAddSignTaskList(java.lang.String signTaskId)
          get AddCSResultData list of the same singTaskId
 java.util.Vector getAllArtifact()
          Get all artifacts Examples: var allArtList = Client.getAllArtifact(); for(var i = 0;i < allArtList.size();i++) { var artifact = allArtList.get(i); //returns Artifact object }
 java.util.Vector getAllCSSignResult(java.util.Vector parseTaskList)
           
 java.util.Vector getAllDepartmentByName(java.lang.String mName)
          Get all departments with the same name.
 java.util.Vector getAllDepIDOfCompany()
          Get all departments' IDs in the company.
 java.util.Vector getAllDepNameOfCompany()
          Get all departments' name in the company.
 java.util.Vector getAllIapSignResult(java.lang.String iapTaskID)
           
 java.util.List getAllManager(MemberRecord mbr, boolean mainRoleOnly)
          Get All mamager with the specified MemberRecord
 java.util.List getAllManagerByID(java.lang.String memId)
          Get All mamager with the specified member id
 java.util.List getAllManagerByLoginID(java.lang.String loginId)
          Get All mamager with the specified member's login id
 java.util.List getAllManagerByNo(java.lang.String memNo)
          Get All mamager with the specified member No.
 java.util.Vector getAllMember()
          Return all member of system
 java.util.Vector getAllMemberByCName(java.lang.String mName)
          Get all members with the same name.
 java.util.Vector getAllProcess()
          Note: JSP WebForm does not implement this method.
 java.util.Vector getAllProjectRoleByName(java.lang.String mName)
          Get All Project Role Objects by the same Name.
 java.util.Vector getAllRoleByName(java.lang.String mName)
          Get all roles with the same name.
 java.util.Vector getAllRoleIDOfCompany()
          Get all role id in the company.
 java.util.Vector getAllRoleNameOfCompany()
          Get all role name in the company.
 java.util.Vector getAllUnitType()
          Get All Unit Types
 java.util.Vector getAllUnitType(int levelNumber, int relation, java.lang.String orderBy)
          Get All UnitTypes with the specified level number, relation and orderBy
 java.lang.String getApplication(java.lang.String type)
          Get the registered file type mapping.
abstract  Artifact getArtifact(java.lang.String artID)
          Get artifact by the specified artifact id.
 java.util.Vector getArtifactForm(java.lang.String aID)
          Get artifact forms of the specified artifact.
 java.util.Vector getArtifactInstance(java.lang.String aID)
           
 java.util.Vector getArtifactOfCompany()
          Get all artifacts in the company.
 java.util.Vector getArtifactOfProject(java.lang.String prjID)
          Get all artifacts which will be used by the specified project.
 java.util.HashMap getArtInsDefaultMap(java.lang.String propertys, java.lang.String artState, java.lang.String dvType, Task task, java.lang.String artID, java.lang.String[] priorityLocaleStr)
          Returns the artifact instance default value map.
 PASEartInstance getArtInstance(java.lang.String iID)
          Get artifact instance by the specified instance id.
 PASEartInstance getArtInstance(java.lang.String iID, java.lang.String tID)
          Get artifact instance with the specified instance id and task id.
 java.lang.String getArtTskID(java.lang.String iID)
          Get the latest associated TaskID with the Artifact Instance.
 java.util.HashMap getATaskNote(java.lang.String tID)
          Get all ATask information for the specified root task.
 java.lang.String getAttachFilePath(AttachFileInfo fileInfo)
          get relative path of AttachFileInfo Object uploaded to Server Side Examples: var m_attached = Form.getComponent("AttachedFile0"); var m_filelist = m_attached.getProperty("FileList"); for(var i = 0, n = m_filelist.size(); i < n; ++i) { java.lang.System.out.println("FilePath : " + Client.getAttachFilePath(m_filelist.get(i))); }
 java.lang.String getAttachFilePath(java.lang.String fid)
          get relative path of AttachFileInfo Object uploaded to Server Side Examples: var m_attached = Form.getComponent("AttachedFile0"); var m_filelist = m_attached.getProperty("FileList"); var fid; for(var i = 0, n = m_filelist.size(); i < n; ++i) { fid = m_filelist.get(i).getFileID(); java.lang.System.out.println("FilePath : " + Client.getAttachFilePath(fid)); }
 java.awt.Frame getClientMainFrame()
          To getting the agenda main frame.
abstract  java.lang.String getClientMode()
          Return the current .
 Company getCompany()
          Get company.
 CSSignInfo getCSSignInfo(Task task)
           
 java.util.Map getCSTaskNote(java.lang.String taskId)
           
 java.util.Vector getCurrentArtInstance()
           
abstract  MemberRecord getCurrentMember()
          Get current member.
 java.lang.String getDbConnectionCurrentState()
          Get the information about the system database connection : Max. connection size, Min. connection size, Current used connection size.
 DBProcess getDBProcess(java.lang.String pID)
          Get DBProcess by process id Examples: var pID = "PRO0549992486182610"; var dbProcess = Client.getDBProcess(pID); //returns the DBProcess object
 Department getDepartment(java.lang.String dID)
          Get department by the specified department id.
 MemberRecord getDepartmentHead(MemberRecord mbr, boolean mainRoleOnly)
          Get the manager of first unit department with the specified MemberRecord
 MemberRecord getDepartmentHeadByID(java.lang.String memId)
          Get the manager of first unit department with the specified member id
 MemberRecord getDepartmentHeadByLoginID(java.lang.String loginId)
          Get the manager of first unit department with the specified member's login id
 MemberRecord getDepartmentHeadByNo(java.lang.String memNo)
          Get the manager of first unit department with the specified member No.
 java.lang.String getDeputyMemID()
          Get deputy member id.
 java.lang.String getDeputyName()
          Get deputy name.
 EmailTemplate getEmailTemplate(java.lang.String etID)
          getEmailTemplate by PROID or ETID Examples: var etID = "ETXXXXXXXXXXXXX"; var emailTemp = Client.getEmailTemplate(etID); var subject = emailTemp.getSubject(); var body = emailTemp.getBody(); var sender = emailTemp.getSender(); var receiver = emailTemp.getReceiver();
 UnitType getFirstLevelUnitType()
          Get first unit's unit types
abstract  java.lang.String getFlowServerIP()
          Get IP address of server.
abstract  java.lang.String getFlowServerPort()
          Get RMI port of server.
 FormAPI getFormAPI(java.awt.Component cmp)
          Get FormAPI of the specified component.
 java.util.Vector getFreqApListOfMember(java.lang.String mID)
          Get the PASEFreqAp processes of the specified member.
 java.util.HashMap getGlobals(java.lang.String rootTaskID)
          Get globals data from previous setGlobals function.
 java.lang.String getGroupSignIDOfTask(java.lang.String taskID)
          To get group sign id of the specified task id.
 java.util.List getGroupSignTaskIDList(java.lang.String groupSignID)
          To get task id list of the specified group sign id.
 java.util.HashMap getGroupSignTaskMap(java.lang.String groupSignID)
          To get a HashMap of the specified group sign id.
 java.util.Vector getInvolvedExecutors(java.lang.String rootTaskID)
          Return ID list of executors who involved in the root process Examples: var v = Client.getInvolvedExecutors("Tsk000000835835");
 java.util.Vector getInvolvedMembers(java.lang.String rootTaskID)
          Return ID list of members who involved in the root process Examples: var v = Client.getInvolvedMembers("Tsk000000835835");
 java.lang.Object getLocalObject(java.lang.String id)
          Get a local object by a special id.
 java.util.HashMap getLocalObjectMap()
          Get a local object map which contains all local object.
 java.lang.String[] getManager(java.lang.String id)
          Get manager id by member id, role id, or department id.
 Role getManagerRole(java.lang.String id)
          Get manager role by the specified member, role or department ID.
 java.util.Vector getManagersOfDRM(java.lang.String id)
          Get all manager id by member id, role id, or department id.
 MemberRecord getMember(java.lang.String id)
          Get member by id, login id, or user name.
 AccessMember getMemberAccess()
          Get current member function right Examples: var accessMember = Client.getMemberAccess(); //returns the AccessMember object
 java.util.Vector getMemberArtifactAccess()
          Get current member domination for artifact access Examples: var accessArtList = Client.getMemberArtifactAccess(); for(var i = 0;i < accessArtList.size();i++) { var accessArt = accessArtList.get(i); //returns the AccessArtifact object }
 MemberRecord getMemberByCName(java.lang.String mName)
          Get member by the specified user name.
 MemberRecord getMemberByID(java.lang.String mID)
          Get member by the specified member id.
 MemberRecord getMemberByName(java.lang.String mLoginID)
          Get member by the specified login id.
abstract  java.lang.String[] getMemberInfoByTree(int left, int top, int width, int height)
          Show the dialog of organization tree and return member info.
 AccessOnLineUser getMemberOnLineAccess()
          Get current member domination for on-line user access Examples: var accessOnLineUser = Client.getMemberOnLineAccess(); //returns the AccessOnLineUser object
 java.util.Vector getMemberTask(java.lang.String mID)
           
 java.util.Vector getMemberTaskAccess()
          Get current member domination for task access Examples: var accessTaskList = Client.getMemberTaskAccess(); for(var i = 0;i < accessTaskList.size();i++) { var accessTask = accessTaskList.get(i); //returns the AccessTask object }
 java.lang.String getMemID(java.lang.String loginID)
          Get member id by the specified login id Examples: var memID = Client.getMemID("Jacky");
 java.lang.String getNewArtInsID()
          Create a new artifact instance id Examples: var newArtID = Client.getNewArtInsID();
 java.lang.String getNewFileID()
          Create a new attached file id Examples: var newfileID = Client.getNewFileID();
 MemberRecord getNextManager(MemberRecord mbr)
          Get Next manger with the specified MemberRecord
 MemberRecord getNextManager(MemberRecord mbr, int levelNumber)
          Get Next manger with the specified MemberRecord and level of unit type
 MemberRecord getNextManagerByID(java.lang.String memId)
          Get Next manger with the specified member id
 MemberRecord getNextManagerByID(java.lang.String memId, int levelNumber)
          Get Next manger with the specified member id and level of unit type
 MemberRecord getNextManagerByLoginID(java.lang.String loginId)
          Get Next manger with the specified member's login id
 MemberRecord getNextManagerByLoginID(java.lang.String loginId, int levelNumber)
          Get Next manger with the specified member's login id and level of unit type
 MemberRecord getNextManagerByNo(java.lang.String memNo)
          Get Next manger with the specified member No.
 MemberRecord getNextManagerByNo(java.lang.String memNo, int levelNumber)
          Get Next manger with the specified member No. and level of unit type
 Department getOneDepartmentByName(java.lang.String mName)
          Get department by the specified department Name.
 Role getOneRoleByName(java.lang.String mName)
          Get one role by the specified role name.
 java.util.Vector getOnLineUnderUser()
          Get on-line member list of current member's undermen Examples: var onlineUnderUserList = Client.getOnLineUnderUser(); for(var i = 0;i < onlineUnderUserList.size();i++) { var member = onlineUnderUserList.get(i); //returns MemberRecord object }
 java.util.Vector getOnLineUser()
          Get all on-line member list Examples: var onlineUserList = Client.getOnLineUser(); for(var i = 0;i < onlineUserList.size();i++) { var member = onlineUserList.get(i); //returns MemberRecord object }
 java.util.Vector getParentIDListOfMember(java.lang.String memID, boolean bMainRoleOnly)
          Get All parent CompanyID, RolID, DepID, MemID of Member.
 PASEOrgModel getPASEOrgModel()
          Get the PASEOrgModel.
 java.util.Vector getPASEProcessOfMember(java.lang.String mID)
          Get the root processes of the specified member.
 java.util.Vector getPDiagramDetail(java.lang.String rootTID)
          Get the detail of process diagram.
 java.util.HashMap getPDiagramState(java.lang.String rootTID)
          Get the states of process diagram.
 PASEProcess getProcess(java.lang.String pID)
          This function has been deprecated.
 java.util.HashMap getProcessDiagram(java.lang.String rootPID, java.lang.String rootTaskID)
          Get a process diagram.
 java.util.Vector getProcessTask(java.lang.String pID)
           
 Project getProject(java.lang.String prjID)
          Get project by the specified project id.
 java.util.Vector getProjectOfCompany()
          Get all projects in the company.
 java.util.Vector getProjectOfDepartment(java.lang.String dID)
          Get the projects in the specified department.
 java.util.Vector getProjectOfManager(java.lang.String managerID)
          Get the projects which project manager is the same with the specified project manager.
 ProjectRole getProjectRole(java.lang.String rID)
          Get project role by the specified role id.
 ReportService getReportService()
          get ReportService
 Role getRole(java.lang.String rID)
          Get role by the specified role id.
 java.util.Vector getRootDBProcessOfProject(java.lang.String prjID)
          Get the list of the root DBProcess by the specified project id.
 java.util.Vector getRootTaskOfMember(java.lang.String mID)
          Get root tasks which managed by the specified member.
 java.util.Vector getRootTaskOfMember(java.lang.String mID, int state)
          Get root tasks which managed by the specified member.
 java.util.Vector getRootTaskOfProcess(java.lang.String pID)
          Retrieving the root Tasks of the given DBProcess id.
 java.util.Vector getRootTaskOfProcess(java.lang.String pID, int state)
          Retrieving the root Tasks of the given DBProcess id and task state.
 ScheduleEvent getScheduleEvent(java.lang.String id)
          Get schedule event Examples: var event = Client.getScheduleEvent(eventID);
 java.util.HashMap getServerStatus()
           
 long getServerTime()
          Get the server time in milliseconds Examples: var time = Client.getServerTime(); var date = new java.util.Date(time);
 java.lang.Object getService(java.lang.String serviceName)
          Get Remote Service by the given service name
 java.util.HashMap getSessionConnectionURL(int sequence)
          Get the db configuration info with the specific sequence number Examples: var config = Client.getSessionConnectionURL(1); java.lang.System.out.println(config);
 java.util.HashMap getSessionConnectionURL(java.lang.String name)
          Get a db configuration by given name.
 java.util.Vector getSessionConnectionURLList()
          Get all db configurations.
 java.lang.String getSignatureImage(java.lang.String mID)
          Get the signature image by the specified member id.
 java.util.Vector getSubDepIDOfDR(java.lang.String id, boolean exp)
          Get sub-department's id by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubDepNameOfDR(java.lang.String id, boolean exp)
          Get sub-department's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubMemberCNameOfDR(java.lang.String id, boolean exp)
          Get sub-member's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubMemberIDOfDR(java.lang.String id, boolean exp)
          Get sub-member's ID by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubRoleIDOfDR(java.lang.String id, boolean exp)
          Get sub-role's id by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubRoleNameOfDR(java.lang.String id, boolean exp)
          Get sub-role's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.
 java.util.Vector getSubTaskList(java.lang.String parentID)
          Get subtasks of the specified task.
 Task getTask(java.lang.String tID)
          Get task by the specified task id.
 java.lang.String getTaskAttachedFileContent(java.lang.String fileID)
          Get file content of the specified task attached file.
 java.util.Vector getTaskOfMember(java.lang.String mID)
          Get tasks which managed by the specified member.
 java.util.Vector getTaskOfMember(java.lang.String mID, int state)
          Get tasks which managed by the specified member.
 java.util.Vector getTaskOfProcess(java.lang.String pID)
          Get tasks in the specified process.
 java.util.Vector getTaskOfProcess(java.lang.String pID, int state)
          Get tasks in the specified process.
 java.util.Vector getTaskOfRootTask(java.lang.String rootTID)
          Get tasks of the specified root task.
 java.util.Vector getTranslateArtInsList(java.lang.String artID)
          Artifact translate.
 java.util.Iterator getTypeMap()
          Get the mapping of application and type
 int getUncompletePATaskNo(Task parentTask)
          Calculate the tasks count which tasks are "Add Parallel Announce" and are complete under the specified task.
 UnitType getUnitType(java.lang.String uid)
          Get the Unit Type with the specified unit id
 UnitType getUnitTypeByLoginID(java.lang.String loginId)
          Get the Unit Type with the specified member's login id
 UnitType getUnitTypeByMember(MemberRecord mbr)
          Get the Unit Type with the specified MemberRecord
 UnitType getUnitTypeByMemID(java.lang.String memId)
          Get the Unit Type with the specified member id
 UnitType getUnitTypeByNo(java.lang.String memNo)
          Get the Unit Type with the specified member No.
 boolean goBackTo(java.lang.String fromTaskID, java.lang.String toProID, boolean artMode)
          For task schedule and flow control.
 boolean goBackTo(java.lang.String fromTaskID, Task toTask, boolean artMode)
          For task schedule and flow control.
 boolean goBackTo(Task fromTask, java.lang.String toProID, boolean artMode)
          For task schedule and flow control.
 java.util.HashMap goBackToWithDetailRet(Task fromTask, java.lang.String toProID, boolean artMode)
          For task schedule and flow control, go back to previous process node Examples: Client.goBackToWithDetailRet(fromTask, "ProXXXX", true);
 java.util.HashMap initProcess(PASEProcess process)
          Initial the process.
 boolean insert(java.lang.String sqlcmd, java.util.Vector record, java.util.Vector columnTypeList)
          The method is used to insert value to database (the RTRepository).
 boolean insertDepartment(Department dep)
          Insert a Department to organization.
 boolean insertMemberRecord(MemberRecord mbr)
          Insert a MemberRecord to organization.
 boolean insertRole(Role role)
          Insert a Role to organization.
 void insertScheduleEvent(ScheduleEvent evt)
          Insert ScheduleEvent into table Examples: Client.insertScheduleEvent(event);
 boolean insertTaskAttachedFile(TaskAttachedFileInfo fileInfo)
          insert a task attached file.
 boolean isATaskComplete(Task t)
           
 boolean isCompanyManager(MemberRecord mbr)
          Is manager of the company with the specified MemberRecord
 boolean isCompanyManagerByID(java.lang.String memId)
          Is manager of the company with the specified member id
 boolean isCompanyManagerByLoginID(java.lang.String loginId)
          Is manager of the company with the specified member's login id
 boolean isCompanyManagerByNo(java.lang.String memNo)
          Is manager of the company with the specified member No.
 boolean isCSTaskComplete(Task t)
           
 boolean isHalfHoliday(java.lang.String date)
          Check specified date whether it's a half of holiday in system's default calendar.
 boolean isHalfHoliday(java.lang.String date, java.lang.String memID)
          Check specified date whether it's a half of holiday in member's calendar.
 boolean isHoliday(java.lang.String date)
          Check specified date whether it's a holiday in system's default calendar.
 boolean isHoliday(java.lang.String date, java.lang.String memID)
          Check specified date whether it's a holiday in user's calendar.
 boolean isMemberInRoleList(java.lang.String mID, java.util.Vector roleIDList)
          Check whether the specified member is in the specified role list.
 boolean isRestSat(java.lang.String date)
          Check specified date whether it's a rest Saturday.
 boolean isServerConnecting()
           
 boolean isWorkday(java.lang.String date, java.lang.String memID)
          Check specified date whether it's a work day in member's calendar.
 void lockTask(java.lang.String tskID)
          For task schedule and flow control, set the task lock Examples: Client.lockTask("TskXXXXXXX");
 Department newDepartment()
          Create a Department instance.
 MemberRecord newMemberRecord()
          Create a MemberRecord instance.
 Role newRole()
          Create a Role instance.
 java.util.HashMap notifyTask(java.lang.String tskID)
          For task schedule and flow control, set the task notify Examples: var result = Client.notifyTask("TskXXXXXXX"); var booleanResult = result.get("retValue"); //returns Boolean object if(!
 java.util.Vector parseAddASResultString(java.lang.String result)
          Parse the countersign result string to CSResultData.
 java.util.Vector parseCSResultString(java.lang.String result, java.util.List auditNameList)
          Parse the countersign result string to CSResultData Examples: var task = Form.getCurrentTask(); //task is CSTask if(task.getTaskType().equals("csreview")) { var result = task.getCSInstance().getNote(); var resultObjList = Client.parseCSResultString(result, task.getAuditList()); for(var i = 0;i < resultObjList.size();i++) { var resultData = resultObjList.get(i); //resultData is CSResultData object } }
 void printArtifactList(java.util.Vector artInsIDList, java.lang.String printMode, java.lang.String pageMode, java.lang.String viewState, boolean bRunScript, int top, int down, int left, int right, int orientation)
          This method is using for batch printing artifact instances.
abstract  void printArtifactList(java.util.Vector artInsIDList, java.lang.String printMode, java.lang.String pageMode, java.lang.String viewState, boolean bRunScript, int width, int height, int top, int down, int left, int right, int orientation, boolean popUpDlg)
          This method is using for batch printing artifact instances.
 java.util.Vector query(java.lang.String sqlcmd, java.util.Hashtable columnProperty)
          The method is used to query value from database (the RTRepository).
 java.util.Vector query(java.lang.String sqlcmd, java.util.Hashtable columnProperty, int top)
          The method is used to query value from database (the RTRepository).
 java.util.Vector query(java.lang.String sqlcmd, java.util.Vector columnNameList)
          The method is used to query value from database (the RTRepository).
 boolean registerType(java.lang.String type, java.lang.String app)
          Register file type mapping.
 boolean removeAFTVElementVO(java.lang.String subject, java.lang.String item)
          remove AFTVElementVO from database Examples: var artInsId = MyTask.getArtInstance().getID(); var itemId = "ITEM0"; var result = Client.removeAFTVElementVO(artInsId, itemId); returns true if it sets successfully ;false otherwise
 boolean removeLocalObject(java.lang.String id)
          Remove an local object.
 void removeScheduleEvent(java.lang.String id)
          Remove ScheduleEvent by event id Examples: Client.removeScheduleEvent(eventID);
 boolean removeType(java.lang.String type)
          Remove the registered file type mapping.
 void reScheduleTask(Task task)
          Reschedule the task Cron Event(s) Examples: var duration = 5; var task = Form.getCurrentTask(); task.setDuration(duration); Client.reScheduleTask(task);
 boolean resetDeputyAndDeputyState(java.lang.String memId, java.lang.String deputyId, boolean deputyState)
          Reset deputy state and deputy member.
 boolean resetMemberDelegation()
           
 boolean resetMemberDelegation(MemberRecord mbr)
          Redispatch tasks to deputy of the member and also update memberrecord.
abstract  boolean runJScript(java.lang.String script, java.util.HashMap globalVar)
          Script Runner.
 void runScriptOnServer(java.lang.String code, Task t)
          Run script on server.
 boolean saveAFTVElementVO(AFTVElementVO vo)
          save AFTVElementVO to database Examples: var artInsId = MyTask.getArtInstance().getID(); var itemId = "ITEM0"; var vo = new Packages.pe.pase.AFTVElementVO(artInsId, itemId); vo.setPrincipal("DEP00001091073095699"); vo.setOfflineReadonly(0); vo.setEditCount(1); vo.setSaveCount(-1); var result = Client.saveAFTVElementVO(vo); returns true if it sets successfully ;false otherwise
abstract  void saveArtifactListToJPG(java.util.Vector artInsIDList, java.util.Vector fileList, java.lang.String viewState, boolean bRunScript, int top, int down, int left, int right, int orientation)
          This method is using for batch saving artifact instances to JPG file.
abstract  void saveArtifactListToPDF(java.util.Vector artInsIDList, java.lang.String pageMode, java.lang.String fileName, java.lang.String viewState, boolean bRunScript, int top, int down, int left, int right, int orientation)
          This method is using for batch saving artifact instances to PDF file.
 java.util.Vector searchData(SearchCondition cond)
           
 java.util.Vector searchScheduleEvent(ScheduleSearchCondition cond)
          Search ScheduleEvent by condition search Examples: var ret = Client.searchScheduleEvent(searchEvent);
 void sendHTMLMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String text)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, java.util.HashMap auth)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, java.lang.String tskID)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, Task task)
          Send E-Mail through internet, using HTML format.
 void sendHTMLMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, Task task, java.lang.String script)
          Send E-Mail through internet, using HTML format.
 void sendMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String text)
          Send E-Mail through internet.
 void sendMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text)
          Send E-Mail through internet.
 void sendMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList)
          Send E-Mail through internet.
 void sendMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, java.util.HashMap auth)
          Send E-Mail through internet.
 void sendMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, java.lang.String tskID)
          Send E-Mail through internet.
 void sendMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, Task task)
          Send E-Mail through internet.
 void sendMailExt(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String text, java.util.Vector fileList, Task task, java.lang.String script)
          Send E-Mail through internet.
 boolean sendPASEMessage(PASEMessage msg)
          Send message through message-system built in Agentflow.
 void sendTemplateMail(java.lang.String from, java.lang.String to, java.lang.String cc, java.lang.String etID, java.util.Vector fileList, java.lang.String taskID, boolean isHtml)
          Send E-Mail Template through internet, using HTML format.
 boolean setArtInsState(PASEartInstance artInstance, java.lang.String stateID)
          Set artifact instance state.
 void setDbService(DBService dBService)
           
 void setFileService(FileService fileService)
           
 void setFlowService(FlowService flowService)
           
 void setGlobals(java.lang.String rootTaskID, java.util.HashMap args)
          Keep data into database and then reuse.
 void setLocalObject(java.lang.String id, java.lang.Object obj)
          Set a local object which belongs to this client.
 boolean setMonitorRelation(java.lang.String sourceTaskID, java.lang.String createdRootTaskID)
          Set task monitor relation, store root task ID and those created root task ID when executed.
 boolean setMonitorRelation(java.lang.String sourceTaskID, java.util.Vector createdRootTaskIDs)
          Set task monitor relation, store root task ID and those created root task ID when executed.
 void setOrgService(OrgService orgService)
           
 void setPdeService(PDEService pdeService)
           
 void setReportService(ReportService reportService)
           
 void setSecurityService(SecurityService securityService)
           
 void setUtilityService(UtilityService utilityService)
           
 boolean SQLdeleteValue(java.lang.String sql)
          The method is used to delete value from database (the RTRepository).
 boolean SQLinsertValue(java.lang.String sql)
          The method is used to insert value to database (the RTRepository).
 java.util.List SQLloadValue(java.lang.String sql)
          The method is used to load value from database (the RTRepository).
 boolean SQLupdateValue(java.lang.String sql)
          The method is used to update value to database (the RTRepository).
 java.util.HashMap startTask(Task oldTask)
          Start the task.
 void stopRootTask(java.lang.String rootID)
          For flow control, stop the root process Examples: Client.stopRootTask("Tsk000000835835");
 java.util.HashMap suspendTask(Task t)
           
 void unlockCoSign(java.lang.String rt_proID)
          Unlock a countrsign task.
 void unlockTask(java.lang.String tskID)
          For task schedule and flow control, set the task unlock Examples: Client.unlockTask("TskXXXXXXX");
 boolean update(java.lang.String sqlcmd, java.util.Vector newRecord, java.util.Vector newColumnTypeList, java.util.Vector oldRecord, java.util.Vector oldColumnTypeList)
          The method is used to update value to database (the RTRepository).
 boolean updateArtInstance(PASEartInstance instance)
          Update artifact instance Notice: Artifact instance is carrying artifact state information.
 boolean updateArtInstance(java.lang.String tID, PASEartInstance instance)
          Update artifact instance Examples: var newArtInstance = Client.createArtInstance("ART0099992486182440"); var task = Form.getCurrentTask(); var flag = Client.updateArtInstance(task.getID(), newArtInstance);
 boolean updateArtInstanceLog(java.lang.String tID, PASEartInstance instance)
          Update artifact instance log Examples: var task = Form.getCurrentTask(); var artInstance = task.getArtInstance(); var flag = Client.updateArtInstanceLog(task.getID(), artInstance);
 boolean updateAttachFileInfo(java.lang.String attachCmpName, AttachFileInfo fileInfo)
          update file information of the specified attach file uploaded by attach file component attachCmpName Examples: var attachFileCmp = Form.getComponent("AttachFile0"); var fileList = attachFileCmp.getProperty("FileList"); var fileInfo = fileList.get(0); fileInfo.setNote("file note"); var result = Client.updateAttachFileInfo("AttachFile0", fileInfo);
 boolean updateCompany(Company company)
          Update a Company in organization.
 boolean updateDepartment(Department dep)
          Update a Department in organization.
 boolean updateDeputyAndState(java.lang.String deputyId, boolean deputyState)
          Update deputy member id and state.
 boolean updateMemberRecord(MemberRecord mbr)
          Update a MemberRecord in organization.
 boolean updatePASEMessage(PASEMessage msg)
          Update the message state includes both IsNew and IsReply fields.
 boolean updateRole(Role role)
          Update a Role in organization.
 void updateScheduleEvent(ScheduleEvent evt)
          Update ScheduleEvent Examples: Client.updateScheduleEvent(event);
 boolean updateTask(Task t)
          Update the task data.
 boolean updateTaskState(Task t)
          Update the task state.
 boolean updateUnitType(UnitType unit)
          Update the specified unit type
 void waitTask(java.lang.String tskID)
          For task schedule and flow control, set the task waiting Examples: Client.waitTask("TskXXXXXX");
 void waitTask(java.lang.String tskID, java.lang.String timeString)
          For task schedule and flow control, set the task waiting Examples: Client.waitTask("TskXXXXXX","2001/12/10/14/12");
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pe.pase.ClientAPI
createForm
 

Field Detail

logger

protected Log logger

m_dbService

protected DBService m_dbService

m_fileService

protected FileService m_fileService

m_flowService

protected FlowService m_flowService

m_orgService

protected OrgService m_orgService

m_pdeService

protected PDEService m_pdeService

m_reportService

protected ReportService m_reportService

m_securityService

protected SecurityService m_securityService

m_utilityService

protected UtilityService m_utilityService
Constructor Detail

BasedClientAPI

public BasedClientAPI()
Method Detail

addDebugLog

public void addDebugLog(java.lang.String msg)
Description copied from interface: ClientAPI
Add debug log message.

Examples:

        Client.addDebugLog("This is a debug log message!");
        

Specified by:
addDebugLog in interface ClientAPI
Parameters:
msg - the given message

addErrLog

public void addErrLog(java.lang.String msg)
Description copied from interface: ClientAPI
Add err log message.

Examples:

        Client.addErrLog("This is a err log message!");
        

Specified by:
addErrLog in interface ClientAPI
Parameters:
msg - the given message

addExeLog

public void addExeLog(java.lang.String msg)
Description copied from interface: ClientAPI
Add execution log message.

Examples:

        Client.addExeLog("This is a execution log message!");
        

Specified by:
addExeLog in interface ClientAPI
Parameters:
msg - the given message

addFreqApRole

public boolean addFreqApRole(java.lang.String freID,
                             java.lang.String rolID)
Description copied from interface: ClientAPI
Add a PASEFreqAP role.

Examples:

        var ret = Client.addFreqApRole(freID, rolID);
        

Specified by:
addFreqApRole in interface ClientAPI
Parameters:
freID - the given PASEFreqApID
rolID - the given RoleID
Returns:
true if the adding is successful; false otherwise.

addInfoLog

public void addInfoLog(java.lang.String msg)
Description copied from interface: ClientAPI
Add information log message.

Examples:

        Client.addInfoLog("This is a information log message!");
        

Specified by:
addInfoLog in interface ClientAPI
Parameters:
msg - the given message

addMonitorRelation

public boolean addMonitorRelation(java.lang.String sourceTaskID,
                                  java.lang.String createdRootTaskID)
Description copied from interface: ClientAPI
Add task monitor relation, store root task ID and those created root task ID when executed.

Examples:

        var taskID = Form.getCurrentTask().getID();
        var createRootTaskID = Client.createProcess(userID,proID,args,false, true);
        var result = Client.addMonitorRelation(taskID, createRootTaskID);
        if(result) {
                java.lang.System.out.println("Success!");
        } else {
                java.lang.System.out.println("Failed!");
        }
        

Specified by:
addMonitorRelation in interface ClientAPI
Parameters:
sourceTaskID - the given RootTaskID
createdRootTaskID - the given created RootTaskID
Returns:
true if the execution is successful; false otherwise.

addMonitorRelation

public boolean addMonitorRelation(java.lang.String sourceTaskID,
                                  java.util.Vector createdRootTaskIDs)
Description copied from interface: ClientAPI
Add task monitor relation, store root task ID and those created root task ID when executed.

Examples:

        var taskID = Form.getCurrentTask().getID();
        var createRootTaskID = Client.createProcess(userID,proID,args,false, true);
        var idList = new java.util.Vector();
        idList.add(createRootTaskID);
        var result = Client.addMonitorRelation(taskID, idList);
        if(result) {
                java.lang.System.out.println("Success!");
        } else {
                java.lang.System.out.println("Failed!");
        }
        

Specified by:
addMonitorRelation in interface ClientAPI
Parameters:
sourceTaskID - the given RootTaskID
createdRootTaskIDs - the given created RootTaskID list
Returns:
true if the execution is successful; false otherwise.

addNewSessionConnectionURL

public int addNewSessionConnectionURL(int type,
                                      java.lang.String name,
                                      java.lang.String dburl,
                                      java.lang.String username,
                                      java.lang.String password)
Description copied from interface: ClientAPI
Add a new db URL at the end of the db configuration list. PASE Server must be restarted to execute the configuration. The database type:

Examples:

  Client.addSessionConnectionURL(0, "MS-SQL1", "jdbc:inetdae:192.168.8.1:1433?charset=Big5&database=Test", "sa", "sql");
        

Specified by:
addNewSessionConnectionURL in interface ClientAPI
Parameters:
type - the database type
name - the name to recognize the configuration
dburl - the database URL
username - the username to login in database
password - true password to login in database
Returns:
the sequence which the data is store in configuration

addSessionConnectionURL

public void addSessionConnectionURL(int seq,
                                    int type,
                                    java.lang.String dburl,
                                    java.lang.String username,
                                    java.lang.String password)
Description copied from interface: ClientAPI
Set a db URL to db configuration. System will generate a name for this configuration automatcally. It would replace another configuration by given the sequence number. PASE Server must be restarted to execute the configuration. The database type:

Examples:

        Client.addSessionConnectionURL(1, 0, "jdbc:inetdae:192.168.8.1:1433?charset=Big5&database=Test", "sa", "sql");
        

Specified by:
addSessionConnectionURL in interface ClientAPI
Parameters:
seq - the sequence which the data is store in configuration, from 1
type - the database type
dburl - the database URL
username - the username to login in database
password - true password to login in database

addSessionConnectionURL

public void addSessionConnectionURL(int seq,
                                    int type,
                                    java.lang.String name,
                                    java.lang.String dburl,
                                    java.lang.String username,
                                    java.lang.String password)
Description copied from interface: ClientAPI
Set a db URL to db configuration. It would replace another configuration by given the sequence number. PASE Server must be restarted to execute the configuration. The database type:

Examples:

  Client.addSessionConnectionURL(1, 0, "MS-SQL1", "jdbc:inetdae:192.168.8.1:1433?charset=Big5&database=Test", "sa", "sql");
        

Specified by:
addSessionConnectionURL in interface ClientAPI
Parameters:
seq - the sequence which the data is store in configuration, from 1
type - the database type
name - the name to recognize the configuration
dburl - the database URL
username - the username to login in database
password - true password to login in database

addWarningLog

public void addWarningLog(java.lang.String msg)
Description copied from interface: ClientAPI
Add warning log message.

Examples:

        Client.addWarningLog("This is a warning log message!");
        

Specified by:
addWarningLog in interface ClientAPI
Parameters:
msg - the given message

announceOnlineClient

public void announceOnlineClient(ClientMessage msg)
Description copied from interface: ClientAPI
Annouce a message to online Client. Note: JSP WebForm does not implement this method.

Examples:

        //show a Message Dialog
        var type = Packages.pe.pase.ClientMessage.MSG_TYPE_DIALOG;
        var clientMsg0 = new Packages.pe.pase.ClientMessage(type);
        var msgData   = new Packages.java.util.HashMap();
        msgData.put("title","This is a title");
        msgData.put("content","some message for you");
        clientMsg0.setParam(msgData);
        Client.announceOnlineClient(clientMsg0);

        // show text
        var type = Packages.pe.pase.ClientMessage.MSG_TYPE_DUMP;
        var clientMsg1 = new Packages.pe.pase.ClientMessage(type);
        var str  = new Packages.java.lang.String("dump this message on screen");
        clientMsg1.setParam(str);
        Client.announceOnlineClient(clientMsg1);

        // show beep
        var type = Packages.pe.pase.ClientMessage.MSG_TYPE_BEEP;
        var clientMsg2 = new Packages.pe.pase.ClientMessage(type);
        var times = new Packages.java.lang.Integer(10);
        clientMsg2.setParam(times);
        Client.announceOnlineClient(clientMsg2);
        

Specified by:
announceOnlineClient in interface ClientAPI
Parameters:
msg - the given the ClientMessage object
See Also:
ClientMessage

ArtSQLloadValue

public java.util.List ArtSQLloadValue(java.lang.String sql)
Description copied from interface: ClientAPI
The method is used to load value from database by nickname (the RTRepository).

Examples:

        var sql = "select Label1,TextArea1 from Artifact1 ";
        var dataSet = Client.ArtSQLloadValue(sql);
        if (dataSet.size()>0) {
                for (var i=0; i<dataSet.size(); i++){
                        var record = dataSet.get(i);
                        var userID = record.get("Label1");
                        //returns the Label1 field value is like "FR099"
                        var userName = record.get("TextArea1");
                        //returns the TextArea1 field value is like "JeanLin"
                }
        }
        

Specified by:
ArtSQLloadValue in interface ClientAPI
Parameters:
sql - the input SQL data string in nickname
Returns:
the value mapping to the SQL syntax

batchProcess

public java.util.Vector batchProcess(java.util.List completeTask,
                                     java.util.List removeTask,
                                     java.util.List createPro)
Description copied from interface: ClientAPI
For flow control, batch create, remove and complete process

Examples:

        // CompleteTask
        var completeVector = new java.util.Vector();
        var tsk = Client.getTask("Tsk000000832832");
        Client.checkTaskComplete(tsk);
        completeVector.add(tsk);
        java.lang.System.out.println("Complete");

        // RemoveRootTask
        var removeVector = new java.util.Vector();
        removeVector.add("Tsk000000835835");
        java.lang.System.out.println("Remove");

        // CreateProcess
        var createVector = new java.util.Vector();
        var cv = new java.util.Vector();
        var userID = "jdwa";
        var proID = "PRO0570993694941810";
        var hm = new java.util.HashMap();
        var popUp = new java.lang.Boolean("true");
        cv.add(userID);
        cv.add(proID);
        cv.add(hm);
        cv.add(popUp);
        createVector.add(cv);
        java.lang.System.out.println("Create");

        // Call bachProcess
        var ret = Client.batchProcess(completeVector, removeVector, createVector);
        java.lang.System.out.println(ret);
        

Specified by:
batchProcess in interface ClientAPI
Parameters:
completeTask - the Vector of task object.
removeTask - the Vector of Root Task ID.
createPro - Vector of createprocess parameters

checkPassword

public boolean checkPassword(java.lang.String loginId,
                             java.lang.String pass)
Description copied from interface: ClientAPI
Check user input password whether it's correct.

Examples:

        var loginId = "f4";
        var pass = "squre";
        var Result = Client.checkPassword(loginId, pass);
        //returns true if the password is correct; false otherwise
        

Specified by:
checkPassword in interface ClientAPI
Returns:
true if the password is correct; false otherwise.

checkPassword

public boolean checkPassword(java.lang.String mID,
                             java.lang.String pwd,
                             java.util.Vector roleList)
Description copied from interface: ClientAPI
Check user input password whether it's correct and whether the user is in role list.

Examples:

        var loginId = "f4";
        var pass = "squre";
        var roleList = Client.getDepartment("DEP0000972876387719").getRoleList();
        var Result = Client.checkPassword(loginId,pass,roleList);
        //returns true if the password is correct; false otherwise
        

Specified by:
checkPassword in interface ClientAPI
pwd - the given password
roleList - the given role list
Returns:
true if the password is correct and the user is in the role list; otherwise false

checkTaskComplete

public boolean checkTaskComplete(Task t)
Description copied from interface: ClientAPI
Check the task and fit it to the complete-conditon.

Examples:

        var task = Form.getCurrentTask();
        if (Client.checkTaskComplete(task)) {
                Form.closeForm();
                Client.completeTask(task);
        }
        

Specified by:
checkTaskComplete in interface ClientAPI
Parameters:
t - the task
Returns:
true if the task fit the complete-condition; otherwise false

clearCache

public abstract void clearCache()
Description copied from interface: ClientAPI
This method is using for clear client cache

Examples:

        Client.clearCache();
        

Specified by:
clearCache in interface ClientAPI

clearServerCache

public void clearServerCache()
Description copied from interface: ClientAPI
This method is using for clear server cache

Examples:

        Client.clearServerCache();
        

Specified by:
clearServerCache in interface ClientAPI

closeForm

public boolean closeForm(javax.swing.JPanel innerframe)
Description copied from interface: ClientAPI
Close the form in Agenda. Note: JSP WebForm does not implement this method.

Examples:

        var panel = Client.createForm("Ans000000546546","",true);
        panel.setTitleVisible(false);   // set the title invisible
        Client.closeForm(panel);                // release the panel resource keeped in Agenda
        var mf = Client.getClientMainFrame();
        var dlg = new Packages.javax.swing.JDialog(mf,"Control Panel",false);
        dlg.getContentPane().add(panel);
        dlg.pack();
        dlg.setVisible(true);
        

Specified by:
closeForm in interface ClientAPI
Parameters:
innerframe - the form to close
Returns:
true for success; false for unsuccess

completeTask

public java.util.HashMap completeTask(Task t)
Description copied from interface: ClientAPI
Complete the task.

Examples:

        var taskID          = "Tsk000000221222";
        var artExitStateID  = "AST0371992486182500";
        var task            = Client.getTask(taskID);
        var artInstance     = task.getArtInstance();
        Client.setArtInsState(artInstance,artExitStateID);
        var hashmap  = Client.completeTask(task);
        var retValue = hashmap.get("retValue");
        //returns true if it starts successfully;false otherwise
        

Specified by:
completeTask in interface ClientAPI
Parameters:
t - the given Task
Returns:
the result ( [Key:Value] = [retValue:Boolean(true)] )
See Also:
Task

completeTask

public java.util.HashMap completeTask(Task t,
                                      java.lang.String stateID)
Description copied from interface: ClientAPI
Complete the task with setting the artifact state.

Examples:

        var taskID         = "Tsk000000226229";
        var artExitStateID = "AST0371992486182500";
        var task           = Client.getTask(taskID);
        var hashmap  = Client.completeTask(task,artExitStateID);
        var retValue = hashmap.get("retValue");
        //returns true if it starts successfully;false otherwise
        

Specified by:
completeTask in interface ClientAPI
Parameters:
t - the given Task
stateID - the given atrifact state id
Returns:
the result ( [Key:Value] = [retValue:Boolean(true)] )
See Also:
Task

connect

public abstract boolean connect()
                         throws java.lang.Exception
Throws:
java.lang.Exception

createArtInstance

public PASEartInstance createArtInstance(java.lang.String aID)
Description copied from interface: ClientAPI
Create artifact instance.

Examples:

        var aID  = "ART0099992486182440";
        var PASEartInstance = Client.createArtInstance(aID);
        //returns PASEartInstance object
        

Here are some more examples of how PASEartInstance can be used:

        var ArtifactName = PASEartInstance.getName();
        //returns artifact name is like "ApplyForm"

        var ArtifactID   = PASEartInstance.getArtifactID();
        //returns artifact id is like "ART0099992486182440"
        

Specified by:
createArtInstance in interface ClientAPI
Returns:
the PASEartInstanceSee Also:
PASEartInstance

createArtInstance

public PASEartInstance createArtInstance(java.lang.String tID,
                                         java.lang.String aID)
Description copied from interface: ClientAPI
Create artifact instance.

Examples:

        var task = Form.getCurrentTask();
        var tID  = task.getID();
        var aID  = "ART0099992486182440";
        var PASEartInstance = Client.createArtInstance(tID, aID);
        //returns PASEartInstance object
        

Here are some more examples of how PASEartInstance can be used:

        var ArtifactName = PASEartInstance.getName();
        //returns artifact name is like "ApplyForm"

        var ArtifactID   = PASEartInstance.getArtifactID();
        //returns artifact id is like "ART0099992486182440"
        

Specified by:
createArtInstance in interface ClientAPI
Parameters:
tID - the given task id
Returns:
the PASEartInstance object
See Also:
PASEartInstance

createForm

public abstract javax.swing.JPanel createForm(java.lang.String artInsID)
Description copied from interface: ClientAPI
Create a artifact form by current artifact style in Agenda.

Examples:

        var dlg = new Packages.javax.swing.JOptionPane();
        var panel = Client.createForm("Ans000000219219");
        if (panel != null) {
                dlg.showMessageDialog(Form,"CreatForm fail");
        }
        

Specified by:
createForm in interface ClientAPI
Parameters:
artInsID - the given artifact instance id
Returns:
JPanel of specified artifact form.

createForm

public javax.swing.JPanel createForm(java.lang.String artID,
                                     java.lang.String artInsID)
Description copied from interface: ClientAPI
Create a artifact form in Agenda.

Examples:

        var dlg = new Packages.javax.swing.JOptionPane();
        var panel = Client.createForm("ART0099992486182440","Ans000000219219");
        if (panel == null) {
                dlg.showMessageDialog(Form,"CreatForm fail");
        }
        

Specified by:
createForm in interface ClientAPI
Parameters:
artID - the given artifact id
artInsID - the given artifact instance id
Returns:
JPanel of specified artifact form.

createForm

public javax.swing.JPanel createForm(java.lang.String artInsID,
                                     java.lang.String stateName,
                                     boolean bRunScript)
Description copied from interface: ClientAPI
Create a artifact form by current artifact style in Agenda. Notice: 1. component enable, component visibility will be set according to stateName parameter, if stateName is empty then current state of this instance is used instead. 2. openFormAction, okAction, closeFormAction scripts will be executed only when bRunScript parameter is true. 3. The created form will provide 'save' and 'print' functions. i.e. The user can modify/save the data in the form and print the form also.

Examples:

        Client.createForm("Ans000000219219","S1",false);
        

Specified by:
createForm in interface ClientAPI
Parameters:
artInsID - the given artifact instance id
stateName - the prefer viewing and script-running state
bRunScript - true for running pre-Action and Action in the state defined by variable stateName
Returns:
JPanel of specified artifact form.

createForm

public javax.swing.JPanel createForm(java.lang.String artInsID,
                                     java.lang.String stateName,
                                     boolean bRunScript,
                                     boolean save)

createForm

public abstract javax.swing.JPanel createForm(java.lang.String artInsID,
                                              java.lang.String stateName,
                                              boolean bRunScript,
                                              boolean save,
                                              boolean print,
                                              int close,
                                              int x,
                                              int y,
                                              int width,
                                              int height)
Description copied from interface: ClientAPI
Create a artifact form by current artifact style in Agenda. Notice: 1. component enable, component visibility will be set according to stateName parameter, if stateName is empty then current state of this instance is used instead. 2. openFormAction, okAction, closeFormAction scripts will be executed only when bRunScript parameter is true. 3. this method only works with applet form and java client.

Examples:

        Client.createForm("Ans000000219219","S1",false,false,false,javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE,0,0,400,300);
        

Specified by:
createForm in interface ClientAPI
Parameters:
artInsID - the given artifact instance id
stateName - the prefer viewing and script-running state
bRunScript - true for running pre-Action and Action in the state defined by variable stateName
save - show save button
print - show print and printPreview button. (only works with applet form)
close - would be WindowConstants.DO_NOTHING_ON_CLOSE, WindowConstants.HIDE_ON_CLOSE, WindowConstants.DISPOSE_ON_CLOSE. (only works with applet form)
x - define position x. (only works with applet form)
y - define position y. (only works with applet form)
width - define width. (only works with applet form)
height - define height. (only works with applet form)
Returns:
JPanel of specified artifact form.

createFormExt

public abstract void createFormExt(java.lang.String artInsID,
                                   java.lang.String stateName,
                                   boolean isRunScript,
                                   boolean canSave,
                                   boolean canPrint,
                                   boolean canReviewProcess)
Description copied from interface: ClientAPI
Opens a form with the specified parameters. If the given artifact instance is associated a task and the canReviewProcess is true, the form will provide information of the Task(such as Task attachments, notes, counter sign result, added announce/sign result, process review ...etc). If the atifact instance is not associated any task, the canReviewPorcess parameter will be inefficacious(ignored). Notice: 1. This method is implemented in Web application(JSP or Applet) only. 2. component enable, component visibility will be set according to stateName parameter, if stateName is empty then current state of this instance is used instead. 3. openFormAction, okAction, closeFormAction scripts will be executed only when bRunScript parameter is true.

Specified by:
createFormExt in interface ClientAPI
Parameters:
artInsID - the given artifact instance ID
stateName - the state name for running script
isRunScript - a flag denotes if the created form will run the scripts of the state name
canSave - a flag denotes if the user can modify the fields of the created form
canPrint - a flag denotes if the user can print the created form
canReviewProcess - a flag denotes if the user can review information of the Task that was associated the given artifact instance. This parameter will be ignored if the given artifact intance is not associated any Task.

createFreqArtInstance

public PASEartInstance createFreqArtInstance(java.lang.String aID)

createProcess

public java.lang.String createProcess(java.lang.String proID,
                                      java.util.HashMap args)
Description copied from interface: ClientAPI
Create an auto-popup process and assign to current operator.

Examples:

        var proID = "PRO0548992486182550";
        var args = new java.util.HashMap();

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(proID,args);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
Returns:
the created root task's id

createProcess

public java.lang.String createProcess(java.lang.String proID,
                                      java.util.HashMap args,
                                      boolean isPopUp)
Description copied from interface: ClientAPI
Create a process by specified isPopUp value and assign to current operator. Note:JSP WebForm does not implement this method.

Examples:

        var proID = "PRO0548992486182550";
        var args = new java.util.HashMap();
        var isPopUp = false;

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(proID,args,isPopUp);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
proID - the process id of the process intended to be created
args - a HashMap data containing optional data provided to the new process ( [Key:Value] = [retValue:Boolean(true/false)])
isPopUp - true if it will auto-PopUp the frame; false otherwise.
Returns:
the created root task's id

createProcess

public java.lang.String createProcess(java.lang.String usrID,
                                      java.lang.String proID,
                                      java.util.HashMap args)
Description copied from interface: ClientAPI
Create a non-auto-PopUp process and assign to specified member id.

Examples:

        var userID = "MEM0000992492169920";
        var proID = "PRO0548992486182550";
        var args = new java.util.HashMap();

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(userID,proID,args);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
usrID - the given member id
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
Returns:
the created root task's id

createProcess

public java.lang.String createProcess(java.lang.String usrID,
                                      java.lang.String proID,
                                      java.util.HashMap args,
                                      boolean isPopUp)
Description copied from interface: ClientAPI
Create a process by specified isPopUp value and assign to specified member id. Note:JSP WebForm does not implement this method.

Examples:

        var userID = "MEM0000992492169920";
        var proID = "PRO0548992486182550";
        var args = new java.util.HashMap();
        var isPopUp = false;

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(userID,proID,args,isPopUp);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
usrID - the given member id
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
isPopUp - true if it will auto-PopUp the frame; false otherwise.
Returns:
the created root task's id

createProcess

public abstract java.lang.String createProcess(java.lang.String usrID,
                                               java.lang.String proID,
                                               java.util.HashMap args,
                                               boolean isPopUp,
                                               boolean isDelible)
Description copied from interface: ClientAPI
Create a process by specified isPopUp and isDelible value and assign to specified member id. Note:JSP WebForm does not implement this method.

Examples:

        var userID = "MEM0000992492169920";
        var proID  = "PRO0548992486182550";
        var args = new java.util.HashMap();
        var isPopUp   = false;
        var isDelible = true;

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(userID,proID,args,isPopUp,isDelible);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
usrID - the given member id
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
isPopUp - true if it will auto-PopUp the frame; false otherwise.
isDelible - true if it's delible; false otherwise.
Returns:
the created root task's id

createProcess

public abstract java.lang.String createProcess(java.lang.String userID,
                                               java.lang.String roleID,
                                               java.lang.String proID,
                                               java.util.HashMap args,
                                               boolean isPopUp,
                                               boolean isDelible,
                                               java.lang.String taskID,
                                               java.lang.String dtTemplateID,
                                               boolean isShowMonitorRelation)
Description copied from interface: ClientAPI
Create a process by specified isPopUp and isDelible and isShowMonitorRelation value and assign to specified member id and use the specified DataTransferTemplate. Note:JSP WebForm does not implement this method.

Examples:

        var userID = "MEM0000992492169920";
        var member = Client.getMember(userID);
        var roleID = member.getMainRoleID();
        var proID  = "PRO0548992486182550";
        var args = new java.util.HashMap();
        var isPopUp   = false;
        var isDelible = true;
        var MyTask = Form.getCurrentTask();
        var taskID = MyTask.getID();
        var dtTemplateID = "DTT01701098176268071";
        var isShowMonitorRelation = false;

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(userID,roleID,proID,args,isPopUp,isDelible,taskID,dtTemplateID,isShowMonitorRelation);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcess in interface ClientAPI
Parameters:
userID - the given memebr id
roleID - the given role id
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
isPopUp - true if it will auto-PopUp the frame; false otherwise.
isDelible - true if it's delible; false otherwise.
taskID - the task id of the task which execute this script, i.e., the task id of the current task -- the task during which this method is invoked
dtTemplateID - the given DataTransferTemplate id
isShowMonitorRelation - true if it will show monitor relation in monitor; false otherwise.
Returns:
the created root task's id

createProcessByRandom

public java.lang.String createProcessByRandom(java.lang.String proID,
                                              java.util.HashMap args)
Description copied from interface: ClientAPI
Create a non-auto-PopUp process and assign to random of specified roles.

Examples:

        var proID = "PRO0548992486182550";
        var args = new java.util.HashMap();

        //get the value of the 'txtA' component on the form, and put it into the hashmap
        args.put("txtA",Form.getValue("txtA"));

        //get the value of the 'Table' component on the form, and put it into the hashmap
        var table = Form.getComponent("Table");
        args.put("TableRowList",table.getRowList());

        //invoke the 'createProcess' method providing the prepared data -- 'txtA' and 'Table' values
        var rootTaskID = Client.createProcess(proID,args);

        //add a monitor relation from the current task to the newly created task --
        // and the new task will be shown in the task monitering page.
        var MyTask = Form.getCurrentTask();
        MyTask.addMonitorRelation(rootTaskID);
        Client.updateTask(MyTask);
        

Specified by:
createProcessByRandom in interface ClientAPI
Parameters:
proID - the process id of the process intended to be created
args - a HashMap containing optional data provided to the new process (example: [Key:Value] = [retValue:Boolean(true/false)])
Returns:
the created root task's id

createScheduleEvent

public ScheduleEvent createScheduleEvent()
Description copied from interface: ClientAPI
Create new ScheduleEvent

Examples:

        var event = Client.createScheduleEvent();
        

Specified by:
createScheduleEvent in interface ClientAPI
Returns:
new ScheduleEvent

createSessionConnection

public SessionConnection createSessionConnection(int sequence)
Description copied from interface: ClientAPI
Create a SessionConnection object with database configuration, by the specific sequence.

Examples:

        var conn = Client.createSessionConnection(1);
        var prjList = conn.loadValue("SELECT * FROM Project");
  for(var i=0;i<prjList.size();i++){
                var prj = prjList.get(i);
                java.lang.System.out.println(prj);
        }

  var result = conn.updateValue("UPDATE Project SET Name = 'ProjectName' WHERE Name = 'Project Name'");
  java.lang.System.out.println("Is the updated result(true/false) complete?" + result);
        conn.commit();

        conn.close();
        

Specified by:
createSessionConnection in interface ClientAPI
Parameters:
sequence - the sequence which the data is store in configuration, from 1
Returns:
the SessionConnection object which have connected to database
See Also:
SessionConnection

createSessionConnection

public SessionConnection createSessionConnection(java.lang.String name)
Description copied from interface: ClientAPI
Create a SessionConnection object with database configuration, by the specific name.

Examples:

        var conn = Client.createSessionConnection("MS-SQL1");
        var prjList = conn.loadValue("SELECT * FROM Project");
  for(var i=0;i<prjList.size();i++){
                var prj = prjList.get(i);
                java.lang.System.out.println(prj);
        }

  var result = conn.updateValue("UPDATE Project SET Name = 'ProjectName' WHERE Name = 'Project Name'");
  java.lang.System.out.println("Is the updated result(true/false) complete?" + result);
        conn.commit();

        conn.close();
        

Specified by:
createSessionConnection in interface ClientAPI
Parameters:
name - the name to recognize the db configuration
Returns:
the SessionConnection object which have connected to database
See Also:
SessionConnection

delete

public boolean delete(java.lang.String sqlcmd)
Description copied from interface: ClientAPI
The method is used to delete value in database (the RTRepository).

Examples:

        var sql = "delete from MyTable where Name=\"Pen\"";
        var flag = Client.delete(sql);
        //returns true if delete is success; otherwise false
        

Specified by:
delete in interface ClientAPI
Parameters:
sqlcmd - the delete SQL string
Returns:
true if delete is success; otherwise false

delete

public boolean delete(java.lang.String sqlcmd,
                      java.util.Vector record,
                      java.util.Vector columnTypeList)
Description copied from interface: ClientAPI
The method is used to delete value in database (the RTRepository).

Examples:

        var sql = "delete from MyTable where Name=?";
        var record = new Packages.java.util.Vector();
        record.add("\"Pen\"");
        var columnTypeList = new Packages.java.util.Vector();
        columnTypeList.add(java.sql.Types.LONGVARCHAR);
        var flag = Client.delete(sql,record,columnTypeList);
        //returns true if delete is success; otherwise false
        

Specified by:
delete in interface ClientAPI
Parameters:
sqlcmd - the delete SQL string
record - the given records
columnTypeList - the given column type list.
Returns:
true if delete is success; otherwise false

deleteCompany

public boolean deleteCompany(Company company)
Description copied from interface: ClientAPI
Delete a Company in organization.

Examples:

        Client.deleteCompany(company);
        

Specified by:
deleteCompany in interface ClientAPI
Parameters:
company - Company instance
Returns:
true if succeeded
See Also:
Company

deleteDepartment

public boolean deleteDepartment(Department dep)
Description copied from interface: ClientAPI
Delete a Department in organization.

Examples:

        Client.deleteDepartment(dep);
        

Specified by:
deleteDepartment in interface ClientAPI
Parameters:
dep - Department instance
Returns:
true if succeeded
See Also:
Department

deleteGlobals

public boolean deleteGlobals(java.lang.String rootTaskID)
Description copied from interface: ClientAPI
Delete globals.

Examples:

        var task = Form.getCurrentTask();
        var rootTaskID=task.getRootID();
        var Result=Client.deleteGlobals(rootTaskID);
        //returns true if it deletes successfully; false otherwise
        

Specified by:
deleteGlobals in interface ClientAPI
Parameters:
rootTaskID - the given root task id
Returns:
true if it deletes successfully; false otherwise

deleteMemberRecord

public boolean deleteMemberRecord(MemberRecord mbr)
Description copied from interface: ClientAPI
Delete a MemberRecord in organization.

Examples:

        Client.deleteMemberRecord(member);
        

Specified by:
deleteMemberRecord in interface ClientAPI
Parameters:
mbr - MemberRecord instance
Returns:
true if succeeded
See Also:
MemberRecord

deletePASEMessage

public boolean deletePASEMessage(PASEMessage msg)
Description copied from interface: ClientAPI
Delete message from database.

Examples:

        var MessageList = Client.getPASEMessageOfMember("MEM0000992492169920");
        if(MessageList != null) {
                for(var i=0;i<MessageList.size();i++){
                        var msg=MessageList.get(i);
                        var Result = Client.deletePASEMessage(msg);
                        //returns true if it's successful; false otherwise
                }
        }
        

Specified by:
deletePASEMessage in interface ClientAPI
Parameters:
msg - the given message. msg.SendID, msg.RecID, msg.SendTime are used as key to delete the message.
Returns:
true if the delete is successful; false otherwise.
See Also:
PASEMessage

deleteRole

public boolean deleteRole(Role role)
Description copied from interface: ClientAPI
Delete a Role in organization.

Examples:

        Client.deleteRole(role);
        

Specified by:
deleteRole in interface ClientAPI
Returns:
true if succeeded
See Also:
Role

deleteSessionConnectionURL

public java.util.HashMap deleteSessionConnectionURL(java.lang.String name)
Description copied from interface: ClientAPI
Delete a db URL from db configuration. It may influence other configuration's sequence number.

Examples:

        Client.deleteSessionConnectionURL("MS-SQL1");
        

Specified by:
deleteSessionConnectionURL in interface ClientAPI
Parameters:
name - the name to recognize the db configuration
Returns:
the HashMap object which shows the deleted configuration

deleteTaskAttachedFile

public boolean deleteTaskAttachedFile(java.lang.String fileID)
Description copied from interface: ClientAPI
Get file content of the specified task attached file.

Examples:

        var fileInfo  = new TaskAttachedFileInfo();
        var fileID = fileInfo.getFileID();
        var result = Client.deleteTaskAttachedFile(fileID);
        

Specified by:
deleteTaskAttachedFile in interface ClientAPI
Parameters:
fileID - the given String fileID
Returns:
if deletion is successful

disconnect

public boolean disconnect()

doUIAction

public boolean doUIAction(java.lang.String action,
                          java.util.Hashtable globalVar)
Description copied from interface: ClientAPI
Note: JSP WebForm does not implement this method.

Specified by:
doUIAction in interface ClientAPI

forceCompleteATask

public boolean forceCompleteATask(Task parentTask)
Description copied from interface: ClientAPI
Completea an task, which task type is "Add Announce Sign".

Examples:

        var ret = Client.forceCompleteATask(Form.getCurrentTask());
        

Specified by:
forceCompleteATask in interface ClientAPI
Parameters:
parentTask - the given Parent Task
Returns:
true if successful.
See Also:
Task

forceReassignTask

public boolean forceReassignTask(java.lang.String p_TaskID,
                                 java.lang.String p_MemID)
Description copied from interface: ClientAPI
Force to reassign the task.

Examples:

  var taskID = "Tsk000000226229";
  var memID = "MEM0000000334532";
  var Result = Client.forceReassignTask(p_TaskID, p_MemID);
      returns true if it sets successfully ;false otherwise
  

Specified by:
forceReassignTask in interface ClientAPI
Parameters:
p_TaskID - the given TaskID
p_MemID - the given MemberRecordID
Returns:
true if succeeded

generateID

public java.lang.String generateID()
Description copied from interface: ClientAPI
Note: JSP WebForm does not implement this method.

Specified by:
generateID in interface ClientAPI

getAddSignTaskList

public java.util.Vector getAddSignTaskList(java.lang.String signTaskId)
Description copied from interface: ClientAPI
get AddCSResultData list of the same singTaskId

Specified by:
getAddSignTaskList in interface ClientAPI
Parameters:
signTaskId - signTaskId;
Returns:
Vector a AddCSResultData list

getAllArtifact

public java.util.Vector getAllArtifact()
Description copied from interface: ClientAPI
Get all artifacts

Examples:

        var allArtList = Client.getAllArtifact();
        for(var i = 0;i < allArtList.size();i++) {
                var artifact = allArtList.get(i);
                //returns Artifact object
        }
        

Specified by:
getAllArtifact in interface ClientAPI
Returns:
all artifacts.(each element in Vector are instance of Artifact)

getAllCSSignResult

public java.util.Vector getAllCSSignResult(java.util.Vector parseTaskList)
Specified by:
getAllCSSignResult in interface ClientAPI

getAllDepartmentByName

public java.util.Vector getAllDepartmentByName(java.lang.String mName)
Description copied from interface: ClientAPI
Get all departments with the same name.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var mName = mdr.getDepartmentName();
        var DepartmentList = Client.getAllDepartmentByName(mName);
        if(DepartmentList != null) {
                for(var i=0;i<DepartmentList.size();i++){
                        var department = DepartmentList.get(i);
                        //returns a Department object
                }
        }
        

Specified by:
getAllDepartmentByName in interface ClientAPI
Parameters:
mName - the given department name
Returns:
all departments that match the name (each element in Vector are instance of Department)
See Also:
Department

getAllDepIDOfCompany

public java.util.Vector getAllDepIDOfCompany()
Description copied from interface: ClientAPI
Get all departments' IDs in the company.

Examples:

        var departmentIDList = Client.getAllDepIDOfCompany();
        for(var i=0;i<departmentIDList.size();i++){
                var depID = departmentIDList.get(i);
        }
        

Specified by:
getAllDepIDOfCompany in interface ClientAPI
Returns:
all departments' id (each element in Vector are String)
See Also:
Department

getAllDepNameOfCompany

public java.util.Vector getAllDepNameOfCompany()
Description copied from interface: ClientAPI
Get all departments' name in the company.

Examples:

        var DepartmentNameList = Client.getAllDepNameOfCompany();
        for(var i=0;i<DepartmentNameList.size();i++){
                var Result = DepartmentNameList.get(i)
                //returns a department name is like "MIS Department"
        }
        

Specified by:
getAllDepNameOfCompany in interface ClientAPI
Returns:
all departments' name (each element in Vector are String)
See Also:
Department

getAllIapSignResult

public java.util.Vector getAllIapSignResult(java.lang.String iapTaskID)
Specified by:
getAllIapSignResult in interface ClientAPI

getAllManager

public java.util.List getAllManager(MemberRecord mbr,
                                    boolean mainRoleOnly)
Description copied from interface: ClientAPI
Get All mamager with the specified MemberRecord

Specified by:
getAllManager in interface ClientAPI
Parameters:
mbr - the given MemberRecord
mainRoleOnly - whether only search manager of main role of member
Returns:
all manager members (element in List is the MemberRecord instance)

getAllManagerByID

public java.util.List getAllManagerByID(java.lang.String memId)
Description copied from interface: ClientAPI
Get All mamager with the specified member id

Specified by:
getAllManagerByID in interface ClientAPI
Parameters:
memId - the given member id
Returns:
all manager members (element in List is the MemberRecord instance)

getAllManagerByLoginID

public java.util.List getAllManagerByLoginID(java.lang.String loginId)
Description copied from interface: ClientAPI
Get All mamager with the specified member's login id

Specified by:
getAllManagerByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
Returns:
all manager members (element in List is the MemberRecord instance)

getAllManagerByNo

public java.util.List getAllManagerByNo(java.lang.String memNo)
Description copied from interface: ClientAPI
Get All mamager with the specified member No.

Specified by:
getAllManagerByNo in interface ClientAPI
Parameters:
memNo - the given member No.
Returns:
all manager members (element in List is the MemberRecord instance)

getAllMember

public java.util.Vector getAllMember()
Description copied from interface: ClientAPI
Return all member of system

Specified by:
getAllMember in interface ClientAPI
See Also:
MemberRecord

getAllMemberByCName

public java.util.Vector getAllMemberByCName(java.lang.String mName)
Description copied from interface: ClientAPI
Get all members with the same name.

Examples:

        var mrd = Client.getCurrentMember();
        var mName = mrd.getName();
        var MemberList = Client.getAllMemberByCName(mName);
        if(MemberList != null) {
                for(var i=0;i<MemberList.size();i++){
                        var memberRecord = MemberList.get(i);
                        //returns a MemberRecord object
                }
        }
        

Specified by:
getAllMemberByCName in interface ClientAPI
Parameters:
mName - the given member name
Returns:
all MemberRecord objects (each element in Vector are instance of MemberRecord)
See Also:
MemberRecord

getAllProcess

public java.util.Vector getAllProcess()
Description copied from interface: ClientAPI
Note: JSP WebForm does not implement this method.

Specified by:
getAllProcess in interface ClientAPI
See Also:
getPASEProcessOfMember(String)

getAllProjectRoleByName

public java.util.Vector getAllProjectRoleByName(java.lang.String mName)
Description copied from interface: ClientAPI
Get All Project Role Objects by the same Name.

Examples:

        var PrjRoleList = Client.getAllProjectRoleByName(mName);
        if(PrjRoleList != null) {
                for(var i=0;i<PrjRoleList.size();i++) {
                        var prjrole = PrjRoleList.get(i);
                        //returns a ProjectRole object
                }
        }
        

Specified by:
getAllProjectRoleByName in interface ClientAPI
Parameters:
mName - the given ProjectRoleName
Returns:
all roless (each element in Vector are instance of ProjectRole)
See Also:
ProjectRole

getAllRoleByName

public java.util.Vector getAllRoleByName(java.lang.String mName)
Description copied from interface: ClientAPI
Get all roles with the same name.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var mName = mdr.getRoleName();
        var RoleList = Client.getAllRoleByName(mName);
        if(RoleList != null) {
                for(var i=0;i<RoleList.size();i++){
                        var role = RoleList.get(i);
                        //returns a Role object
                }
        }
        

Specified by:
getAllRoleByName in interface ClientAPI
Parameters:
mName - the given role name
Returns:
all Role objects (each element in Vector are instance of Role)
See Also:
Role

getAllRoleIDOfCompany

public java.util.Vector getAllRoleIDOfCompany()
Description copied from interface: ClientAPI
Get all role id in the company.

Examples:

        var roleIDList = Client.getAllRoleIDOfCompany();
        if(roleIDList != null) {
                for(var i=0;i<roleIDList.size();i++){
                        var roleID = roleIDList.get(i);
                }
        }
        

Specified by:
getAllRoleIDOfCompany in interface ClientAPI
Returns:
all role IDs (each element in Vector are String)
See Also:
Role

getAllRoleNameOfCompany

public java.util.Vector getAllRoleNameOfCompany()
Description copied from interface: ClientAPI
Get all role name in the company.

Examples:

        var roleNameList = Client.getAllRoleNameOfCompany();
        if(roleNameList != null) {
                for(var i=0;i<roleNameList.size();i++){
                        var roleName = roleNameList.get(i);
                        //returns a role name is like "general manager"
                }
        }
        

Specified by:
getAllRoleNameOfCompany in interface ClientAPI
Returns:
all role names (each element in Vector are String)
See Also:
Role

getAllUnitType

public java.util.Vector getAllUnitType()
Description copied from interface: ClientAPI
Get All Unit Types

Specified by:
getAllUnitType in interface ClientAPI
Returns:
all unit types in the organization(element in Vector is the UnitType

getAllUnitType

public java.util.Vector getAllUnitType(int levelNumber,
                                       int relation,
                                       java.lang.String orderBy)
Description copied from interface: ClientAPI
Get All UnitTypes with the specified level number, relation and orderBy

Specified by:
getAllUnitType in interface ClientAPI
Parameters:
levelNumber - the given level number
relation - the given relation of levelNumber, UnitType.GT indicates greater than, UnitType.EQ indicates equal, UnitType.LT indicates less than.
orderBy - the given unit type order, UnitType.DESC or UnitType.ASC
Returns:
all unit types that conform these conditions (element in Vector is the UnitType
See Also:
UnitType

getApplication

public java.lang.String getApplication(java.lang.String type)
Description copied from interface: ClientAPI
Get the registered file type mapping.

Examples:

        var type = "html";
        var Result = Client.getApplication(type);
        //returns registered file type mapping is like "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
        

Specified by:
getApplication in interface ClientAPI
Parameters:
type - the given secondary filename
Returns:
true if it removes successfully; false otherwise

getArtifact

public abstract Artifact getArtifact(java.lang.String artID)
Description copied from interface: ClientAPI
Get artifact by the specified artifact id.

Examples:

        var aID  = "ART0101993090926140";
        var Artifact = Client.getArtifact(aID);
        //returns a Artifact object
        

Specified by:
getArtifact in interface ClientAPI
Parameters:
artID - the given artifact id
Returns:
the Artifact object
See Also:
Artifact

getArtifactForm

public java.util.Vector getArtifactForm(java.lang.String aID)
Description copied from interface: ClientAPI
Get artifact forms of the specified artifact.

Examples:

        var aID = "ART0101993090926140";
        var ArtFormList = Client.getArtifactForm(aID);
        for (var i=0;i<ArtFormList.size();i++) {
                var ArtFormItem=ArtFormList.get(i);
                //returns a ArtFormItem object
        }
        

Specified by:
getArtifactForm in interface ClientAPI
Parameters:
aID - the given artifact id
Returns:
the correspondence artifact forms(each element in Vector are instance of ArtFormItem)
See Also:
ArtFormItem

getArtifactInstance

public java.util.Vector getArtifactInstance(java.lang.String aID)
Specified by:
getArtifactInstance in interface ClientAPI

getArtifactOfCompany

public java.util.Vector getArtifactOfCompany()
Description copied from interface: ClientAPI
Get all artifacts in the company.

Examples:

        var ArtifactList = Client.getArtifactOfCompany();
        if(ArtifactList != null) {
                for(var i=0;i<ArtifactList.size();i++){
                        var Artifact =ArtifactList.get(i);
                        //returns a Artifact object
                }
        }
        

Specified by:
getArtifactOfCompany in interface ClientAPI
Returns:
all artifacts (each element in Vector are instance of Artifact)
See Also:
Artifact

getArtifactOfProject

public java.util.Vector getArtifactOfProject(java.lang.String prjID)
Description copied from interface: ClientAPI
Get all artifacts which will be used by the specified project.

Examples:

        var prjID  = "PRJ0023992486182440";
        var ArtifactList = Client.getArtifactOfProject(prjID);
        if(ArtifactList != null) {
                for(var i=0;i<ArtifactList.size();i++){
                        var Artifact =ArtifactList.get(i);
                        //returns a Artifact Object
                }
        }
        

Specified by:
getArtifactOfProject in interface ClientAPI
Parameters:
prjID - the given project id
Returns:
the correspondence artifacts(each element in Vector are instance of Artifact)
See Also:
Artifact

getArtInsDefaultMap

public java.util.HashMap getArtInsDefaultMap(java.lang.String propertys,
                                             java.lang.String artState,
                                             java.lang.String dvType,
                                             Task task,
                                             java.lang.String artID,
                                             java.lang.String[] priorityLocaleStr)
Description copied from interface: ClientAPI
Returns the artifact instance default value map. key: the atrifact item name value: the default value at the given artifact state and execution timing.

Specified by:
getArtInsDefaultMap in interface ClientAPI

getArtInstance

public PASEartInstance getArtInstance(java.lang.String iID)
Description copied from interface: ClientAPI
Get artifact instance by the specified instance id.

Examples:

        var task = Form.getCurrentTask();
        var iID  = task.getInstanceID();
        var PASEartInstance = Client.getArtInstance(iID);
        //returns PASEartInstance object
        

Here are some more examples of how PASEartInstance can be used:

        var ArtifactName = PASEartInstance.getName();
        //returns artifact name is like "ApplyForm"

        var ArtifactID   = PASEartInstance.getArtifactID();
        //returns artifact id is like "ART0099992486182440"
        

Specified by:
getArtInstance in interface ClientAPI
Parameters:
iID - the given artifact instance id
Returns:
the PASEartInstance object
See Also:
PASEartInstance

getArtInstance

public PASEartInstance getArtInstance(java.lang.String iID,
                                      java.lang.String tID)
Description copied from interface: ClientAPI
Get artifact instance with the specified instance id and task id.

Examples:

        var task = Form.getCurrentTask();
        var iID  = task.getInstanceID();
        var tID  = task.getID();
        var PASEartInstance = Client.getArtInstance(iID,tID);
        //returns PASEartInstance object
        

Here are some more examples of how PASEartInstance can be used:

        var ArtifactName = PASEartInstance.getName();
        //returns artifact name is like "ApplyForm"

        var ArtifactID   = PASEartInstance.getArtifactID();
        //returns artifact id is like "ART0099992486182440"
        

Specified by:
getArtInstance in interface ClientAPI
Parameters:
iID - the given artifact instance id
tID - the given task id
Returns:
the PASEartInstance object
See Also:
PASEartInstance

getArtTskID

public java.lang.String getArtTskID(java.lang.String iID)
Description copied from interface: ClientAPI
Get the latest associated TaskID with the Artifact Instance.

Examples:

        var latestTskID = Client.getArtTskID(artInsID);
        

Specified by:
getArtTskID in interface ClientAPI
Parameters:
iID - the given artifact instance id
Returns:
the latest TaskID

getATaskNote

public java.util.HashMap getATaskNote(java.lang.String tID)
Description copied from interface: ClientAPI
Get all ATask information for the specified root task. The value of key "data" is not null when the value of key "retValue" is Boolean.TRUE.

Examples:

        var note = Client.getATaskNote("TskXXXXXXX");
        if(note.get("retValue").booleanValue()) {
                java.lang.System.out.println("data == " + note.get("data"));
        } else {
                java.lang.System.out.println("This task has no result of add announce sign.");
        }
        

Specified by:
getATaskNote in interface ClientAPI
Parameters:
tID - the given Task ID
Returns:
the result ( [Key:Value] = [data:AllATaskNote(String)] ; [retValue:Boolean(true/false)])

getAttachFilePath

public java.lang.String getAttachFilePath(AttachFileInfo fileInfo)
Description copied from interface: ClientAPI
get relative path of AttachFileInfo Object uploaded to Server Side

Examples:

 var m_attached = Form.getComponent("AttachedFile0");
 var m_filelist = m_attached.getProperty("FileList");
 for(var i = 0, n = m_filelist.size(); i < n; ++i) {
   java.lang.System.out.println("FilePath : " + Client.getAttachFilePath(m_filelist.get(i)));
 }
 

Specified by:
getAttachFilePath in interface ClientAPI
Returns:
the relative path of AttachFileInfo Object uploaded to Server Side

getAttachFilePath

public java.lang.String getAttachFilePath(java.lang.String fid)
Description copied from interface: ClientAPI
get relative path of AttachFileInfo Object uploaded to Server Side

Examples:

 var m_attached = Form.getComponent("AttachedFile0");
 var m_filelist = m_attached.getProperty("FileList");
 var fid;
 for(var i = 0, n = m_filelist.size(); i < n; ++i) {
   fid = m_filelist.get(i).getFileID();
   java.lang.System.out.println("FilePath : " + Client.getAttachFilePath(fid));
 }
 

Specified by:
getAttachFilePath in interface ClientAPI
Parameters:
fid - the given AttachFileInfo's FileID
Returns:
the relative path of AttachFileInfo Object uploaded to Server Side

getClientMainFrame

public java.awt.Frame getClientMainFrame()
Description copied from interface: ClientAPI
To getting the agenda main frame. Note: JSP WebForm does not implement this method.

Examples:

        var fileChooser =  new Packages.javax.swing.JFileChooser();
        var returnVal = fileChooser.showSaveDialog(Form.getMainFrame());
        if (returnVal == Packages.javax.swing.JFileChooser.APPROVE_OPTION) {
                var file = fileChooser.getSelectedFile();
                filePath = file.getPath();
                ....
        }
        

Specified by:
getClientMainFrame in interface ClientAPI
Returns:
the agenda main frame

getClientMode

public abstract java.lang.String getClientMode()
Description copied from interface: ClientAPI
Return the current .

Specified by:
getClientMode in interface ClientAPI
Returns:
the result "JavaMode", "WebMode", "JspMode", "AdmMode"

getCompany

public Company getCompany()
Description copied from interface: ClientAPI
Get company.

Examples:

        var Company = Client.getCompany();
        //returns a Company object
        

Specified by:
getCompany in interface ClientAPI
Returns:
the Company object
See Also:
Company

getCSSignInfo

public CSSignInfo getCSSignInfo(Task task)
Specified by:
getCSSignInfo in interface ClientAPI

getCSTaskNote

public java.util.Map getCSTaskNote(java.lang.String taskId)
Specified by:
getCSTaskNote in interface ClientAPI

getCurrentArtInstance

public java.util.Vector getCurrentArtInstance()
Specified by:
getCurrentArtInstance in interface ClientAPI

getCurrentMember

public abstract MemberRecord getCurrentMember()
Description copied from interface: ClientAPI
Get current member.

Examples:

        var memberRecord = Client.getCurrentMember();
        //returns a MemberRecord object
        

Specified by:
getCurrentMember in interface ClientAPI
Returns:
the MemberRecord object which includes the data of current member

getDbConnectionCurrentState

public java.lang.String getDbConnectionCurrentState()
Description copied from interface: ClientAPI
Get the information about the system database connection : Max. connection size, Min. connection size, Current used connection size.

Specified by:
getDbConnectionCurrentState in interface ClientAPI
Returns:
String the information string.

getDBProcess

public DBProcess getDBProcess(java.lang.String pID)
Description copied from interface: ClientAPI
Get DBProcess by process id

Examples:

        var pID = "PRO0549992486182610";
        var dbProcess = Client.getDBProcess(pID);
        //returns the DBProcess object
        

Specified by:
getDBProcess in interface ClientAPI
Parameters:
pID - the process id
Returns:
the DBProcess object
See Also:
DBProcess

getDepartment

public Department getDepartment(java.lang.String dID)
Description copied from interface: ClientAPI
Get department by the specified department id.

Examples:

        var task = Form.getCurrentTask();
        var dID  = task.getDepartmentID();
        var Department = Client.getDepartment(dID);
        //returns a Department object
        

Specified by:
getDepartment in interface ClientAPI
Parameters:
dID - the given department id
Returns:
the Department object
See Also:
Department

getDepartmentHead

public MemberRecord getDepartmentHead(MemberRecord mbr,
                                      boolean mainRoleOnly)
Description copied from interface: ClientAPI
Get the manager of first unit department with the specified MemberRecord

Specified by:
getDepartmentHead in interface ClientAPI
Parameters:
mbr - the given MemberRecord
mainRoleOnly - whether only search manager of main role of member
Returns:
MemberRecord of this manager

getDepartmentHeadByID

public MemberRecord getDepartmentHeadByID(java.lang.String memId)
Description copied from interface: ClientAPI
Get the manager of first unit department with the specified member id

Specified by:
getDepartmentHeadByID in interface ClientAPI
Parameters:
memId - the given member id
Returns:
MemberRecord of this manager

getDepartmentHeadByLoginID

public MemberRecord getDepartmentHeadByLoginID(java.lang.String loginId)
Description copied from interface: ClientAPI
Get the manager of first unit department with the specified member's login id

Specified by:
getDepartmentHeadByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
Returns:
MemberRecord of this manager

getDepartmentHeadByNo

public MemberRecord getDepartmentHeadByNo(java.lang.String memNo)
Description copied from interface: ClientAPI
Get the manager of first unit department with the specified member No.

Specified by:
getDepartmentHeadByNo in interface ClientAPI
Parameters:
memNo - the given member No.
Returns:
MemberRecord of this manager

getDeputyMemID

public java.lang.String getDeputyMemID()
Description copied from interface: ClientAPI
Get deputy member id.

Examples:

        var Result = Client.getDeputyMemID();
        //returns the deputy member id is like "MEM0002972876172780"
        

Specified by:
getDeputyMemID in interface ClientAPI
Returns:
the deputy member id

getDeputyName

public java.lang.String getDeputyName()
Description copied from interface: ClientAPI
Get deputy name.

Examples:

        var Result = Client.getDeputyName();
        //returns the deputy name is like "JackLin"
        

Specified by:
getDeputyName in interface ClientAPI
Returns:
the deputy name

getEmailTemplate

public EmailTemplate getEmailTemplate(java.lang.String etID)
Description copied from interface: ClientAPI
getEmailTemplate by PROID or ETID

Examples:

      var etID = "ETXXXXXXXXXXXXX";
      var emailTemp = Client.getEmailTemplate(etID);
      var subject = emailTemp.getSubject();
      var body = emailTemp.getBody();
      var sender = emailTemp.getSender();
      var receiver = emailTemp.getReceiver();
        

Specified by:
getEmailTemplate in interface ClientAPI
Parameters:
etID - can be etID or PROID

getFirstLevelUnitType

public UnitType getFirstLevelUnitType()
Description copied from interface: ClientAPI
Get first unit's unit types

Specified by:
getFirstLevelUnitType in interface ClientAPI
Returns:
the first unit's unit type

getFlowServerIP

public abstract java.lang.String getFlowServerIP()
Description copied from interface: ClientAPI
Get IP address of server.

Examples:

        var Result = Client.getFlowServerIP();
        //returns IP address of server is like "192.168.8.60"
        

Specified by:
getFlowServerIP in interface ClientAPI
Returns:
the IP address of server

getFlowServerPort

public abstract java.lang.String getFlowServerPort()
Description copied from interface: ClientAPI
Get RMI port of server.

Examples:

        var Result = Client.getFlowServerPort();
        //returns RMI port of server is like "1099"
        

Specified by:
getFlowServerPort in interface ClientAPI
Returns:
the RMI port of server

getFormAPI

public FormAPI getFormAPI(java.awt.Component cmp)
Description copied from interface: ClientAPI
Get FormAPI of the specified component.

Specified by:
getFormAPI in interface ClientAPI
Parameters:
cmp - the given Component
Returns:
the FormAPI
See Also:
FormAPI

getFreqApListOfMember

public java.util.Vector getFreqApListOfMember(java.lang.String mID)
Description copied from interface: ClientAPI
Get the PASEFreqAp processes of the specified member.

Examples:

        var mID = "MEM0002993177798390";
        var PASEFreqApList = Client.getFreqApListOfMember(mID);
        if(PASEFreqApList != null) {
                for(var i=0;i<PASEFreqApList.size();i++){
                        var PASEFreqAp =PASEFreqApList.get(i);
                        //returns a PASEFreqAp object
                }
        }
        

Specified by:
getFreqApListOfMember in interface ClientAPI
Parameters:
mID - the given member id
Returns:
the correspondence PASEFreqAp processes(each element in Vector are instance of PASEFreqAp)
See Also:
PASEFreqAp

getGlobals

public java.util.HashMap getGlobals(java.lang.String rootTaskID)
Description copied from interface: ClientAPI
Get globals data from previous setGlobals function.

Examples:

        var task = Form.getCurrentTask();
        var rootTaskID = task.getRootID();
        var ht=Client.getGlobals(rootTaskID);
        var value = ht.get("ItemName");
        //returns key value is like "Pen"
        

Specified by:
getGlobals in interface ClientAPI
Parameters:
rootTaskID - the given root task id
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])

getGroupSignIDOfTask

public java.lang.String getGroupSignIDOfTask(java.lang.String taskID)
Description copied from interface: ClientAPI
To get group sign id of the specified task id. You can use ths group sign id to get the task ids of the same group sign id. Example:
  var taskID = From.getCurrentTask().getID();
  var groupSignID = Client.getGroupSignIDOfTask(taskID);
 

Specified by:
getGroupSignIDOfTask in interface ClientAPI
Returns:
String group sign id, ex: GPS000000000001

getGroupSignTaskIDList

public java.util.List getGroupSignTaskIDList(java.lang.String groupSignID)
Description copied from interface: ClientAPI
To get task id list of the specified group sign id. These task ids are completed at the same time by Group Sign. Example:
  var taskID = From.getCurrentTask().getID();
  var groupSignID = Client.getGroupSignIDOfTask(taskID);
  var taskIDList = Client.getGroupSignTaskIDList(groupSignID)
 

Specified by:
getGroupSignTaskIDList in interface ClientAPI
Returns:
List taskIDList. Each element is a String task id.

getGroupSignTaskMap

public java.util.HashMap getGroupSignTaskMap(java.lang.String groupSignID)
Description copied from interface: ClientAPI
To get a HashMap of the specified group sign id. Each element(key, value) in HashMap is (String taskID, LongcompleteTime). These tasks are completed at the same time by Group Sign.
  var taskID = From.getCurrentTask().getID();
  var groupSignID = Client.getGroupSignIDOfTask(taskID);
  var hm = new java.util.HashMap();
  hm = Client.getGroupSignTaskMap(groupSignID);
 

Specified by:
getGroupSignTaskMap in interface ClientAPI
Returns:
HashMap groupSignTaskMap. Each element(key, value) in HashMap is (String taskID, LongcompleteTime).

getInvolvedExecutors

public java.util.Vector getInvolvedExecutors(java.lang.String rootTaskID)
Description copied from interface: ClientAPI
Return ID list of executors who involved in the root process

Examples:

        var v = Client.getInvolvedExecutors("Tsk000000835835");
        

Specified by:
getInvolvedExecutors in interface ClientAPI
Parameters:
rootTaskID - the root task id.

getInvolvedMembers

public java.util.Vector getInvolvedMembers(java.lang.String rootTaskID)
Description copied from interface: ClientAPI
Return ID list of members who involved in the root process

Examples:

        var v = Client.getInvolvedMembers("Tsk000000835835");
        

Specified by:
getInvolvedMembers in interface ClientAPI
Parameters:
rootTaskID - the root task id.

getLocalObject

public java.lang.Object getLocalObject(java.lang.String id)
Description copied from interface: ClientAPI
Get a local object by a special id.

Examples:

        var myTaskList = Client.getTaskOfMember("MEM0000992492169920",Constant.TASK_STATE_ALL);
        Client.setLocalObject("myTaskList1",myTaskList);
        var list = Client.getLocalObject("myTaskList1");
        if(list != null) {
                for(var i=0;i<list.size();i++){
                        var data=list.get(i);
                        //returns element of a Vector object is like "[Tsk000000213214]Process1"
                }
        }
        

Specified by:
getLocalObject in interface ClientAPI
Parameters:
id - the id of local object
Returns:
the local object

getLocalObjectMap

public java.util.HashMap getLocalObjectMap()
Description copied from interface: ClientAPI
Get a local object map which contains all local object.

Examples:

        var localMap = Client.getLocalObjectMap();
        java.lang.System.out.println(localMap.toString());
        

Specified by:
getLocalObjectMap in interface ClientAPI
Returns:
the HashMap which contains all local object ( key : value = local object's id : local object )

getManager

public java.lang.String[] getManager(java.lang.String id)
Description copied from interface: ClientAPI
Get manager id by member id, role id, or department id.

Examples:

 var mID = "MEM00041091074401237";
 var rID = "ROL00021091073923770";
 var dID = "DEP00051091073824187";
 var strAryOfMemId = Server.getManager(mID);
 var strAryOfRolId = Server.getManager(rID);
 var strAryOfDepId = Server.getManager(dID);
 
 java.lang.System.out.println("depID=" + strAryOfMemId[0]);
 java.lang.System.out.println("rolID=" + strAryOfMemId[1]);
 java.lang.System.out.println("memID=" + strAryOfMemId[2]);
 
Note:
java.lang.System.out.println("depID=" + strAryOfMemId[2]);
will print the the depId of upward level department's manager ID.

Specified by:
getManager in interface ClientAPI
Parameters:
id - the given member id, role id, or department id
Returns:
the String Array

getManagerRole

public Role getManagerRole(java.lang.String id)
Description copied from interface: ClientAPI
Get manager role by the specified member, role or department ID. Note: This method returns the major role of the specific member if this specific member in the company is assigned as manager of a department.

Examples:

        var task = Form.getCurrentTask();
        var mID  = task.getMemberID();
        var rID  = task.getRoleID();
        var dID  = task.getDepartmentID();
        var Result_company = Client.getManagerRole("company");
        //returns a Role object
        var Result_mID     = Client.getManagerRole(mID);
        //returns a Role object
        var Result_rID     = Client.getManagerRole(rID);
        //returns a Role object
        var Result_dID     = Client.getManagerRole(dID);
        //returns a Role object
        

Specified by:
getManagerRole in interface ClientAPI
Parameters:
id - the given member id, role id, department id, or "company"
Returns:
the Role object which includes the data of manager
See Also:
MemberRecord, Role, Department

getManagersOfDRM

public java.util.Vector getManagersOfDRM(java.lang.String id)
Description copied from interface: ClientAPI
Get all manager id by member id, role id, or department id.

Examples:

  var mID  = "MEM00041091074401237";
  var rID  = "ROL00021091073923770";
  var dID  = "DEP00051091073824187";
  var Result_mID = Server.getManagersOfDRM(mID);
      //returns a Vector Object
  var Result_rID = Server.getManagersOfDRM(rID);
      //returns a Vector Object
  var Result_dID = Server.getManagersOfDRM(dID);
      //returns a Vector Object
  if(Reslut_mID != null){
        for(var i=0; i

Specified by:
getManagersOfDRM in interface ClientAPI
Parameters:
id - the given member id, role id, or department id
Returns:
the Vector object (each element in Vector are array of String)

getMember

public MemberRecord getMember(java.lang.String id)
Description copied from interface: ClientAPI
Get member by id, login id, or user name. The method is used while the content of parameter has not been known. Otherwise, methods getMemberByID(), getMemberByName(), getMemberByCName() is more applied.

Examples:

        var task = Form.getCurrentTask();
        var mID  = task.getMemberID();
        var mLoginID = "square";
        var mName= "JackLin";
        var MemberBymID = Client.getMember(mID);
        //returns a MemberRecord object
        var MemberBymLoginID = Client.getMember(mLoginID);
        //returns a MemberRecord object
        var MemberBycName = Client.getMember(mName);
        //returns a MemberRecord object
        

Specified by:
getMember in interface ClientAPI
Returns:
the MemberRecord object which includes the data of member
See Also:
MemberRecord, getMemberByID(String), getMemberByName(String), getMemberByCName(String)

getMemberAccess

public AccessMember getMemberAccess()
Description copied from interface: ClientAPI
Get current member function right

Examples:

        var accessMember = Client.getMemberAccess();
        //returns the AccessMember object
        

Specified by:
getMemberAccess in interface ClientAPI
Returns:
the AccessMember object
See Also:
AccessMember

getMemberArtifactAccess

public java.util.Vector getMemberArtifactAccess()
Description copied from interface: ClientAPI
Get current member domination for artifact access

Examples:

        var accessArtList = Client.getMemberArtifactAccess();
        for(var i = 0;i < accessArtList.size();i++) {
                var accessArt = accessArtList.get(i);
                //returns the AccessArtifact object
        }
        

Specified by:
getMemberArtifactAccess in interface ClientAPI
Returns:
the artifacts that can be accessed by current member(each element in Vector are instance of AccessArtifact)
See Also:
AccessArtifact

getMemberByCName

public MemberRecord getMemberByCName(java.lang.String mName)
Description copied from interface: ClientAPI
Get member by the specified user name.

Examples:

        var mName  = "JackLin";
        var MemberRecord = Client.getMemberByCName(mName);
        //returns a MemberRecord object
        

Specified by:
getMemberByCName in interface ClientAPI
Returns:
the MemberRecord object which includes the data of member
See Also:
MemberRecord

getMemberByID

public MemberRecord getMemberByID(java.lang.String mID)
Description copied from interface: ClientAPI
Get member by the specified member id.

Examples:

        var task = Form.getCurrentTask();
        var mID  = task.getMemberID();
        var MemberRecord = Client.getMemberByID(mID);
        //returns a MemberRecord object
        

Specified by:
getMemberByID in interface ClientAPI
Parameters:
mID - the given member id
Returns:
the MemberRecord object which includes the data of member
See Also:
MemberRecord

getMemberByName

public MemberRecord getMemberByName(java.lang.String mLoginID)
Description copied from interface: ClientAPI
Get member by the specified login id.

Examples:

        var mLoginID = "square";
        var MemberRecord = Client.getMemberByName(mLoginID);
        //returns a MemberRecord object
        

Specified by:
getMemberByName in interface ClientAPI
Returns:
the MemberRecord object which includes the data of member
See Also:
MemberRecord

getMemberInfoByTree

public abstract java.lang.String[] getMemberInfoByTree(int left,
                                                       int top,
                                                       int width,
                                                       int height)
Description copied from interface: ClientAPI
Show the dialog of organization tree and return member info. String[0] to String[5] for (0)deppartment id,

(1)role id,

(2)member id,

(3)department name,

(4)role name,

(5)member name

Note: JSP WebForm does not implement this method.

Examples:

            var s = Client.getMemberInfoByTree(0,0,120,120);
                java.lang.System.out.println("Department ID" + s[0]);
                java.lang.System.out.println("Role ID" + s[1]);
                java.lang.System.out.println("Member ID" + s[2]);
                java.lang.System.out.println("Department name" + s[3]);
                java.lang.System.out.println("Role name" + s[4]);
                java.lang.System.out.println("Member name" + s[5]);
        

Specified by:
getMemberInfoByTree in interface ClientAPI
Parameters:
left - the left position of the dialog
top - the top position of the dialog
width - the width of the dialog
height - the height of the dialog
Returns:
the String array which includes current member info

getMemberOnLineAccess

public AccessOnLineUser getMemberOnLineAccess()
Description copied from interface: ClientAPI
Get current member domination for on-line user access

Examples:

        var accessOnLineUser = Client.getMemberOnLineAccess();
        //returns the AccessOnLineUser object
        

Specified by:
getMemberOnLineAccess in interface ClientAPI
Returns:
the AccessOnLineUser object
See Also:
AccessOnLineUser

getMemberTask

public java.util.Vector getMemberTask(java.lang.String mID)
Specified by:
getMemberTask in interface ClientAPI
See Also:
getTaskOfMember(String)

getMemberTaskAccess

public java.util.Vector getMemberTaskAccess()
Description copied from interface: ClientAPI
Get current member domination for task access

Examples:

        var accessTaskList = Client.getMemberTaskAccess();
        for(var i = 0;i < accessTaskList.size();i++) {
                var accessTask = accessTaskList.get(i);
                //returns the AccessTask object
        }
        

Specified by:
getMemberTaskAccess in interface ClientAPI
Returns:
the tasks that can be accessed by current member(each element in Vector are instance of AccessTask)
See Also:
AccessTask

getMemID

public java.lang.String getMemID(java.lang.String loginID)
Description copied from interface: ClientAPI
Get member id by the specified login id

Examples:

        var memID = Client.getMemID("Jacky");
        

Specified by:
getMemID in interface ClientAPI
Parameters:
loginID - the given login id
Returns:
the member id

getNewArtInsID

public java.lang.String getNewArtInsID()
Description copied from interface: ClientAPI
Create a new artifact instance id

Examples:

        var newArtID = Client.getNewArtInsID();
        

Specified by:
getNewArtInsID in interface ClientAPI
Returns:
a new artifact instance id

getNewFileID

public java.lang.String getNewFileID()
Description copied from interface: ClientAPI
Create a new attached file id

Examples:

        var newfileID = Client.getNewFileID();
        

Specified by:
getNewFileID in interface ClientAPI
Returns:
a new attached file id

getNextManager

public MemberRecord getNextManager(MemberRecord mbr)
Description copied from interface: ClientAPI
Get Next manger with the specified MemberRecord

Specified by:
getNextManager in interface ClientAPI
Parameters:
mbr - the given MemberRecord
Returns:
MemberRecord of this manager

getNextManager

public MemberRecord getNextManager(MemberRecord mbr,
                                   int levelNumber)
Description copied from interface: ClientAPI
Get Next manger with the specified MemberRecord and level of unit type

Specified by:
getNextManager in interface ClientAPI
Parameters:
mbr - the given MemberRecord
levelNumber - the given unit type's level
Returns:
MemberRecord of this manager

getNextManagerByID

public MemberRecord getNextManagerByID(java.lang.String memId)
Description copied from interface: ClientAPI
Get Next manger with the specified member id

Specified by:
getNextManagerByID in interface ClientAPI
Parameters:
memId - the given member id
Returns:
MemberRecord of this manager

getNextManagerByID

public MemberRecord getNextManagerByID(java.lang.String memId,
                                       int levelNumber)
Description copied from interface: ClientAPI
Get Next manger with the specified member id and level of unit type

Specified by:
getNextManagerByID in interface ClientAPI
Parameters:
memId - the given member id
levelNumber - the given unit type's level
Returns:
MemberRecord of this manager

getNextManagerByLoginID

public MemberRecord getNextManagerByLoginID(java.lang.String loginId)
Description copied from interface: ClientAPI
Get Next manger with the specified member's login id

Specified by:
getNextManagerByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
Returns:
MemberRecord of this manager

getNextManagerByLoginID

public MemberRecord getNextManagerByLoginID(java.lang.String loginId,
                                            int levelNumber)
Description copied from interface: ClientAPI
Get Next manger with the specified member's login id and level of unit type

Specified by:
getNextManagerByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
levelNumber - the given unit type's level
Returns:
MemberRecord of this manager

getNextManagerByNo

public MemberRecord getNextManagerByNo(java.lang.String memNo)
Description copied from interface: ClientAPI
Get Next manger with the specified member No.

Specified by:
getNextManagerByNo in interface ClientAPI
Parameters:
memNo - the given member No.
Returns:
MemberRecord of this manager

getNextManagerByNo

public MemberRecord getNextManagerByNo(java.lang.String memNo,
                                       int levelNumber)
Description copied from interface: ClientAPI
Get Next manger with the specified member No. and level of unit type

Specified by:
getNextManagerByNo in interface ClientAPI
Parameters:
memNo - the given member No.
levelNumber - the given unit type's level
Returns:
MemberRecord of this manager

getOneDepartmentByName

public Department getOneDepartmentByName(java.lang.String mName)
Description copied from interface: ClientAPI
Get department by the specified department Name.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var mName = mdr.getDepartmentName();
        var DepartmentList = Client.getOneDepartmentByName(mName);
        //returns a Department object
        

Specified by:
getOneDepartmentByName in interface ClientAPI
Parameters:
mName - the given department name
Returns:
the Department object
See Also:
Department

getOneRoleByName

public Role getOneRoleByName(java.lang.String mName)
Description copied from interface: ClientAPI
Get one role by the specified role name.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var mName = mdr.getRoleName();
        var role = Client.getOneRoleByName(mName);
        //returns a Role object
        

Specified by:
getOneRoleByName in interface ClientAPI
Parameters:
mName - the given role name
Returns:
the Role object
See Also:
Role

getOnLineUnderUser

public java.util.Vector getOnLineUnderUser()
Description copied from interface: ClientAPI
Get on-line member list of current member's undermen

Examples:

        var onlineUnderUserList = Client.getOnLineUnderUser();
        for(var i = 0;i < onlineUnderUserList.size();i++) {
                var member = onlineUnderUserList.get(i);
                //returns MemberRecord object
        }
        

Specified by:
getOnLineUnderUser in interface ClientAPI
Returns:
all on-line members which are current member's undermen. (each element in Vector are instance of MemberRecord)
See Also:
MemberRecord

getOnLineUser

public java.util.Vector getOnLineUser()
Description copied from interface: ClientAPI
Get all on-line member list

Examples:

        var onlineUserList = Client.getOnLineUser();
        for(var i = 0;i < onlineUserList.size();i++) {
                var member = onlineUserList.get(i);
                //returns MemberRecord object
        }
        

Specified by:
getOnLineUser in interface ClientAPI
Returns:
all on-line members (each element in Vector are instance of MemberRecord)
See Also:
MemberRecord

getParentIDListOfMember

public java.util.Vector getParentIDListOfMember(java.lang.String memID,
                                                boolean bMainRoleOnly)
Description copied from interface: ClientAPI
Get All parent CompanyID, RolID, DepID, MemID of Member.

Examples:

        var mID = "MEM000003495111";
        var parentIDList = Client.getParentIDListOfMember(mID, true);
        

Specified by:
getParentIDListOfMember in interface ClientAPI
Parameters:
memID - the given MemberID
bMainRoleOnly - if "true", only the MainRole will be retrived. "false" for all role will be retrived.
Returns:
all parent ID (each element in Vector are CompanyID, RoleID, DepID or MemID)

getPASEOrgModel

public PASEOrgModel getPASEOrgModel()
Description copied from interface: ClientAPI
Get the PASEOrgModel.

Examples:

        var paseOrgModel = Client.getPASEOrgModel();
        //returns the PASEOrgModel object
        

Specified by:
getPASEOrgModel in interface ClientAPI
Returns:
the PASEOrgModel object
See Also:
PASEOrgModel

getPASEProcessOfMember

public java.util.Vector getPASEProcessOfMember(java.lang.String mID)
Description copied from interface: ClientAPI
Get the root processes of the specified member.

Examples:

        var mID = "MEM0002993177798390";
        var PASEProcessList = Client.getPASEProcessOfMember(mID);
        if(PASEProcessList != null) {
                for(var i=0;i<PASEProcessList.size();i++){
                        var PASEProcess =PASEProcessList.get(i);
                        //returns a PASEProcess object
                }
        }
        

Specified by:
getPASEProcessOfMember in interface ClientAPI
Parameters:
mID - the given member id
Returns:
the correspondence root processes(each element in Vector are instance of PASEProcess)
See Also:
PASEProcess

getPDiagramDetail

public java.util.Vector getPDiagramDetail(java.lang.String rootTID)
Description copied from interface: ClientAPI
Get the detail of process diagram.

Examples:

        var currTask= Form.getCurrentTask();
        var rootTID     = currTask.getRootID();
        var Result      = Client.getPDiagramDetail(rootTID);
        for(var i=0;i<Result.size();j++) {
                var taskInfo = Result.get(i);
                //returns TaskInfo object
        }
        

Here are some more examples of how TaskInfo can be used:


        function getFormatedTime( lTime ){
                var date = new Packages.java.util.Date(lTime);
                var simpledateformat = new Packages.java.text.SimpleDateFormat("yyyy/MM/dd HH:mm");
                return simpledateformat.format(date);
        }

        var taskName = taskInfo.getTaskName();
        //returns task name is like "Process1"

        var RealExecutorName = taskInfo.getRealExecutorName();
        //returns real executor name is like "JackLin"

        var RealExecutorID = taskInfo.getRealExecutorID();
        //returns real executor member id is like "MEM0000992492169920"

        var DefaultExecutorName = taskInfo.getDefaultExecutorName();
        //returns default executor name is like "Jean"

        var DefaultExecutorID = taskInfo.getDefaultExecutorID();
        //returns default executor member id is like "MEM0000212392162210"

        var ArtiName = taskInfo.getArtiName();
        //returns artifact name is like "Artifact1"

        var ArtiKeyWord = taskInfo.getArtiKW();
        //returns artifact keyword by user input

        var ArriTime = taskInfo.getArriTime();
        //returns task arrivate time is like 993524946300

        var ArriTimeStr = getFormatedTime(ArriTime);
        //returns the time formate of arrivate time is like "2001/06/26 11:09"

        var DuraTime = taskInfo.getDuraTime();
        //returns duration time is like -993524946300

        var DuraTimeStr = getFormatedTime(DuraTime);
        //returns the time formate of duration time is like "1938/07/09 04:50"

        var TaskID = taskInfo.getTaskID();
        //returns task id is like "Tsk000000258259"

        var ArtiID = taskInfo.getArtiID();
        //returns artifact instance id is like "Ans000000248248"

        var TaskState = taskInfo.getTaskState();
        //returns task state is like "running"

        var Task = taskInfo.getTask();
        //returns Task object
        

Specified by:
getPDiagramDetail in interface ClientAPI
Returns:
the detail information in process diagram
See Also:
PDiagramManager, PDiagramManager.getPDiagramDetail

getPDiagramState

public java.util.HashMap getPDiagramState(java.lang.String rootTID)
Description copied from interface: ClientAPI
Get the states of process diagram.

Examples:

        var task    = Form.getCurrentTask();
        var rootTID = task.getRootID();
        var Result  =  Client.getPDiagramState(rootTID);
        for(var i = Result.entrySet().iterator();i.hasNext(); ){
                var entry = i.next();
                //returns "PRO0549992486182610Root_POPUP_DELIBLE=running"
        };
        

Specified by:
getPDiagramState in interface ClientAPI
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])
See Also:
PDiagramManager, PDiagramManager.getPDiagramState

getProcess

public PASEProcess getProcess(java.lang.String pID)
Description copied from interface: ClientAPI
This function has been deprecated.

Specified by:
getProcess in interface ClientAPI

getProcessDiagram

public java.util.HashMap getProcessDiagram(java.lang.String rootPID,
                                           java.lang.String rootTaskID)
Description copied from interface: ClientAPI
Get a process diagram.

Examples:

        var currtask   = Form.getCurrentTask();
        var rootTaskID = currtask.getRootID();
        var task       = Client.getTask(rootTaskID);
        var rootPID    = task.getProcessID();
        var Result     = Client.getProcessDiagram(rootPID,rootTaskID);
      //return a HashMap object which includes the data of process diagram
        for(var i = Result.entrySet().iterator();i.hasNext(); ){
                var entry = i.next();
        };
        

Specified by:
getProcessDiagram in interface ClientAPI
Parameters:
rootPID - the given process id
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])
See Also:
PDiagramManager, PDiagramManager.getProcessDiagram

getProcessTask

public java.util.Vector getProcessTask(java.lang.String pID)
Specified by:
getProcessTask in interface ClientAPI

getProject

public Project getProject(java.lang.String prjID)
Description copied from interface: ClientAPI
Get project by the specified project id.

Examples:

        var task  = Form.getCurrentTask();
        var prjID = task.getProjectID();
        var Project = Client.getProject(prjID);
        //returns a Project object
        

Specified by:
getProject in interface ClientAPI
Parameters:
prjID - the given project id
Returns:
the Project object
See Also:
Project

getProjectOfCompany

public java.util.Vector getProjectOfCompany()
Description copied from interface: ClientAPI
Get all projects in the company.

Examples:

        var ProjectList = Client.getProjectOfCompany();
        if(ProjectList != null) {
                for(var i=0;i<ProjectList.size();i++){
                        var Project =ProjectList.get(i);
                        //returns a Project object
                }
        }
        

Specified by:
getProjectOfCompany in interface ClientAPI
Returns:
all projects (each element in Vector are instance of Project)
See Also:
Project

getProjectOfDepartment

public java.util.Vector getProjectOfDepartment(java.lang.String dID)
Description copied from interface: ClientAPI
Get the projects in the specified department.

Examples:

        var dID = "DEP0000972876387719";
        var ProjectList = Client.getProjectOfDepartment(dID);
        if(ProjectList != null) {
                for(var i=0;i<ProjectList.size();i++){
                        var Project =ProjectList.get(i);
                        //returns a Project object
                }
        }
        

Specified by:
getProjectOfDepartment in interface ClientAPI
Parameters:
dID - the given department id
Returns:
all projects (each element in Vector are instance of Project)
See Also:
Project

getProjectOfManager

public java.util.Vector getProjectOfManager(java.lang.String managerID)
Description copied from interface: ClientAPI
Get the projects which project manager is the same with the specified project manager.

Examples:

        var managerID = "MEM953256027740";
        var ProjectList = Client.getProjectOfManager(managerID);
        if(ProjectList != null) {
                for(var i=0;i<ProjectList.size();i++){
                        var Project =ProjectList.get(i);
                        //returns a Project object
                }
        }
        

Specified by:
getProjectOfManager in interface ClientAPI
Parameters:
managerID - the given member id
Returns:
all projects (each element in Vector are instance of Project)
See Also:
Project

getProjectRole

public ProjectRole getProjectRole(java.lang.String rID)
Description copied from interface: ClientAPI
Get project role by the specified role id.

Examples:

        var task = Form.getCurrentTask();
        var rID  = task.getRoleID();
        var ProjectRole = Client.getProjectRole(rID);
        //returns a ProjectRole object
        

Specified by:
getProjectRole in interface ClientAPI
Parameters:
rID - the given project role id
Returns:
the ProjectRole object
See Also:
ProjectRole

getReportService

public ReportService getReportService()
Description copied from interface: ClientAPI
get ReportService

Specified by:
getReportService in interface ClientAPI
Returns:
ReportService

getRole

public Role getRole(java.lang.String rID)
Description copied from interface: ClientAPI
Get role by the specified role id.

Examples:

        var task = Form.getCurrentTask();
        var rID  = task.getRoleID();
        var role = Client.getRole(rID);
        //returns a Role object
        

Specified by:
getRole in interface ClientAPI
Returns:
the Role object
See Also:
Role

getRootDBProcessOfProject

public java.util.Vector getRootDBProcessOfProject(java.lang.String prjID)
Description copied from interface: ClientAPI
Get the list of the root DBProcess by the specified project id.

Examples:

        var task  = Form.getCurrentTask();
        var prjID = task.getProjectID();
        var rootDBProcessList = Client.getRootDBProcessOfProject(prjID);
        for(var i = 0;i < rootDBProcessList.size();i++) {
                var rootDBProcess = rootDBProcessList.get(i);
                //returns the DBProcess object
        }
        

Specified by:
getRootDBProcessOfProject in interface ClientAPI
Parameters:
prjID - the given project id
Returns:
the list of root DBProcess(each element in Vector are instance of DBProcess)
See Also:
DBProcess

getRootTaskOfMember

public java.util.Vector getRootTaskOfMember(java.lang.String mID)
Description copied from interface: ClientAPI
Get root tasks which managed by the specified member.

Examples:

        var mID  = "MEM953256027740";
        var TaskList = Client.getRootTaskOfMember(mID);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getRootTaskOfMember in interface ClientAPI
Parameters:
mID - the given member id
Returns:
all correspondence root tasks (each element in Vector are instance of Task)
See Also:
Task

getRootTaskOfMember

public java.util.Vector getRootTaskOfMember(java.lang.String mID,
                                            int state)
Description copied from interface: ClientAPI
Get root tasks which managed by the specified member.

Examples:

        var mID   = "MEM953256027740";
        var state = Constant.TASK_STATE_RUNNING;
        var TaskList = Client.getRootTaskOfMember(mID,state);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getRootTaskOfMember in interface ClientAPI
Parameters:
mID - the given member id
state - the given task state, see attributes TASK_STATE_XXX in pe.pase.Task
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getRootTaskOfProcess

public java.util.Vector getRootTaskOfProcess(java.lang.String pID)
Description copied from interface: ClientAPI
Retrieving the root Tasks of the given DBProcess id.

Specified by:
getRootTaskOfProcess in interface ClientAPI
Returns:
all correspondence tasks (each element in Vector is a instance of Task)
See Also:
Task, {@link #getTaskOfProcess(String)}

getRootTaskOfProcess

public java.util.Vector getRootTaskOfProcess(java.lang.String pID,
                                             int state)
Description copied from interface: ClientAPI
Retrieving the root Tasks of the given DBProcess id and task state.

Specified by:
getRootTaskOfProcess in interface ClientAPI
Parameters:
pID - process id
state - task state
Returns:
all correspondence tasks (each element in Vector is a instance of Task)
See Also:
Task, {@link #getTaskOfProcess(String, int)}

getScheduleEvent

public ScheduleEvent getScheduleEvent(java.lang.String id)
Description copied from interface: ClientAPI
Get schedule event

Examples:

        var event = Client.getScheduleEvent(eventID);
        

Specified by:
getScheduleEvent in interface ClientAPI
Parameters:
id - event id of ScheduleEvent
Returns:
event of specified id

getServerStatus

public java.util.HashMap getServerStatus()

getServerTime

public long getServerTime()
Description copied from interface: ClientAPI
Get the server time in milliseconds

Examples:

        var time = Client.getServerTime();
        var date = new java.util.Date(time);
        

Specified by:
getServerTime in interface ClientAPI
Returns:
the server time in milliseconds

getService

public java.lang.Object getService(java.lang.String serviceName)
Description copied from interface: ClientAPI
Get Remote Service by the given service name

Specified by:
getService in interface ClientAPI
See Also:
RemoteServiceProvider.DBSERVICE, RemoteServiceProvider.FILESERVICE, RemoteServiceProvider.FLOWSERVICE, RemoteServiceProvider.ORGSERVICE, RemoteServiceProvider.PDESERVICE, RemoteServiceProvider.SECURITYSERVICE, RemoteServiceProvider.UTILITYSERVICE, RemoteServiceProvider.REPORTSERVICE, RemoteServiceProvider.COMPRESSSERVICE

getSessionConnectionURL

public java.util.HashMap getSessionConnectionURL(int sequence)
Description copied from interface: ClientAPI
Get the db configuration info with the specific sequence number

Examples:

        var config = Client.getSessionConnectionURL(1);
        java.lang.System.out.println(config);
        

Specified by:
getSessionConnectionURL in interface ClientAPI
Returns:
the HashMap object shows the SessionConnection configuration

getSessionConnectionURL

public java.util.HashMap getSessionConnectionURL(java.lang.String name)
Description copied from interface: ClientAPI
Get a db configuration by given name.

Examples:

        var config = Client.getSessionConnectionURL("MS-SQL1");
        java.lang.System.out.println(config);
        

Specified by:
getSessionConnectionURL in interface ClientAPI
Parameters:
name - the name to recognize the db configuration, from 1
Returns:
the HashMap object shows the SessionConnection configuration

getSessionConnectionURLList

public java.util.Vector getSessionConnectionURLList()
Description copied from interface: ClientAPI
Get all db configurations.

Examples:

        var list = Client.getSessionConnectionURLList();
  for (var i=0; i<list.size(); i++) {
                var config = list.get(i);
                java.lang.System.out.println(config);
        }
        

Specified by:
getSessionConnectionURLList in interface ClientAPI
Returns:
all SessionConnection configurations(each element in Vector are instance of HashMap)

getSignatureImage

public java.lang.String getSignatureImage(java.lang.String mID)
Description copied from interface: ClientAPI
Get the signature image by the specified member id.

Examples:

        var currentMember = Client.getCurrentMember();
        var memID = currentMember.getID();
        var signature = Client.getSignatureImage(memID);
        

Specified by:
getSignatureImage in interface ClientAPI
Parameters:
mID - the given member id
Returns:
the signature

getSubDepIDOfDR

public java.util.Vector getSubDepIDOfDR(java.lang.String id,
                                        boolean exp)
Description copied from interface: ClientAPI
Get sub-department's id by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var id = mdr.getDepartmentID();
        var exp = true;
        var depIDList = Client.getSubDepIDOfDR(id,exp);
        if(depIDList != null) {
                for(var i=0;i<depIDList.size();i++){
                        var depID = depIDList.get(i);
                }
        }
        

Specified by:
getSubDepIDOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's department name ;false otherwise.
Returns:
dpartment id (each element in Vector are String)
See Also:
Department

getSubDepNameOfDR

public java.util.Vector getSubDepNameOfDR(java.lang.String id,
                                          boolean exp)
Description copied from interface: ClientAPI
Get sub-department's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var id = mdr.getDepartmentID();
        var exp = true;
        var depNameList = Client.getSubDepNameOfDR(id,exp);
        if(depNameList != null) {
                for(var i=0;i<depNameList.size();i++){
                        var depName = depNameList.get(i);
                        //returns a department name is like "MIS Department"
                }
        }
        

Specified by:
getSubDepNameOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's department name ;false otherwise.
Returns:
dpartment name (each element in Vector are String)
See Also:
Department

getSubMemberCNameOfDR

public java.util.Vector getSubMemberCNameOfDR(java.lang.String id,
                                              boolean exp)
Description copied from interface: ClientAPI
Get sub-member's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var id = mrd.getMainRoleID();
        var exp = true;
        var memberNameList = Client.getSubMemberCNameOfDR(id,exp);
        if(memberNameList != null) {
                for(var i=0;i<memberNameList.size();i++){
                        var memberName = memberNameList.get(i);
                        //returns a member name is like "JackLin"
                }
        }
        

Specified by:
getSubMemberCNameOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's member Name ;false otherwise.
Returns:
member Name (each element in Vector are String)
See Also:
MemberRecord

getSubMemberIDOfDR

public java.util.Vector getSubMemberIDOfDR(java.lang.String id,
                                           boolean exp)
Description copied from interface: ClientAPI
Get sub-member's ID by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var id = mrd.getMainRoleID();
        var exp = true;
        var memberIDList = Client.getSubMemberIDOfDR(id,exp);
        if(memberIDList != null) {
                for(var i=0;i<memberIDList.size();i++){
                        var memberName = memberIDList.get(i);
                }
        }
        

Specified by:
getSubMemberIDOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's member Name ;false otherwise.
Returns:
member ID (each element in Vector are String)
See Also:
MemberRecord

getSubRoleIDOfDR

public java.util.Vector getSubRoleIDOfDR(java.lang.String id,
                                         boolean exp)
Description copied from interface: ClientAPI
Get sub-role's id by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var id = mdr.getDepartmentID();
        var exp = true;
        var roleIDList = Client.getSubRoleIDOfDR(id,exp);
        if(roleIDList != null) {
                for(var i=0;i<roleIDList.size();i++){
                        var roleID = roleIDList.get(i);
                }
        }
        

Specified by:
getSubRoleIDOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's role name ;false otherwise.
Returns:
role id (each element in Vector are String)
See Also:
Role

getSubRoleNameOfDR

public java.util.Vector getSubRoleNameOfDR(java.lang.String id,
                                           boolean exp)
Description copied from interface: ClientAPI
Get sub-role's name by the specified department id or role id, and that search directly down the organizer according to the 'exp' argument.

Examples:

        var mrd = Client.getCurrentMember();
        var mdr = mrd.getMemberDR(mrd.getMainRoleID());
        var id = mdr.getDepartmentID();
        var exp = true;
        var roleNameList = Client.getSubRoleNameOfDR(id,exp);
        if(roleNameList != null) {
                for(var i=0;i<roleNameList.size();i++){
                        var roleName = roleNameList.get(i);
                        //returns a role name is like "accountant"
                }
        }
        

Specified by:
getSubRoleNameOfDR in interface ClientAPI
Parameters:
id - the given department id or role id
exp - the given true if it will expand all sub-node and get it's role name ;false otherwise.
Returns:
role name (each element in Vector are String)
See Also:
Role

getSubTaskList

public java.util.Vector getSubTaskList(java.lang.String parentID)
Description copied from interface: ClientAPI
Get subtasks of the specified task.

Examples:

        var parentID = "Tsk000000254284";
        var TaskList = Client.getSubTaskList(parentID);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getSubTaskList in interface ClientAPI
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTask

public Task getTask(java.lang.String tID)
Description copied from interface: ClientAPI
Get task by the specified task id.

Examples:

        var taskID  = "Tsk000000226229";
        var Task    = Client.getTask(taskID);
        //returns a Task object
        

Specified by:
getTask in interface ClientAPI
Parameters:
tID - the given task id
Returns:
the Task object
See Also:
Task

getTaskAttachedFileContent

public java.lang.String getTaskAttachedFileContent(java.lang.String fileID)
Description copied from interface: ClientAPI
Get file content of the specified task attached file.

Examples:

        var fileID  = "File000000254284";
        var fileContent = Client.getTaskAttachedFileContent(fileID);
        

Specified by:
getTaskAttachedFileContent in interface ClientAPI
Parameters:
fileID - the given String fileID
Returns:
file content of specified file id
See Also:
Task

getTaskOfMember

public java.util.Vector getTaskOfMember(java.lang.String mID)
Description copied from interface: ClientAPI
Get tasks which managed by the specified member.

Examples:

        var mID = "MEM953256027740";
        var TaskList = Client.getTaskOfMember(mID);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getTaskOfMember in interface ClientAPI
Parameters:
mID - the given member id
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTaskOfMember

public java.util.Vector getTaskOfMember(java.lang.String mID,
                                        int state)
Description copied from interface: ClientAPI
Get tasks which managed by the specified member.

Examples:

        var mID   = "MEM953256027740";
        var state = Constant.TASK_STATE_RUNNING;
        var TaskList = Client.getTaskOfMember(mID,state);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getTaskOfMember in interface ClientAPI
Parameters:
mID - the given member id
state - the given task state, see attributes TASK_STATE_XXX in pe.pase.Task
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTaskOfProcess

public java.util.Vector getTaskOfProcess(java.lang.String pID)
Description copied from interface: ClientAPI
Get tasks in the specified process.

Examples:

        var proID = "PRO0549992486182610";
        var TaskList = Client.getTaskOfProcess(proID);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getTaskOfProcess in interface ClientAPI
Parameters:
pID - the given process id
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTaskOfProcess

public java.util.Vector getTaskOfProcess(java.lang.String pID,
                                         int state)
Description copied from interface: ClientAPI
Get tasks in the specified process.

Examples:

        var T_STATE_READY = 1;
        var T_STATE_RUNNING = 2;
        var T_STATE_COMPLETE = 4;
        var T_STATE_SUSPENDED = 8;
        var T_STATE_DEAD = 16;
        var T_STATE_QUEUE = 32;
        var T_STATE_SERVER_WAITING = 64;
        var T_STATE_CLIENT_WAITING = 128;
        var T_STATE_LOCK = 256;
        var T_STATE_ALL = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256;

        var proID = "PRO0549992486182610";
        var TaskList = Client.getTaskOfProcess(proID,T_STATE_READY);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getTaskOfProcess in interface ClientAPI
Parameters:
pID - the given process id
state - the given task state
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTaskOfRootTask

public java.util.Vector getTaskOfRootTask(java.lang.String rootTID)
Description copied from interface: ClientAPI
Get tasks of the specified root task.

Examples:

        var rootTID  = "Tsk000000254284";
        var TaskList = Client.getTaskOfRootTask(rootTID);
        for (var i=0;i<TaskList.size();i++) {
                var Task=TaskList.get(i);
                //returns a Task object
        }
        

Specified by:
getTaskOfRootTask in interface ClientAPI
Parameters:
rootTID - the given task id
Returns:
all correspondence tasks (each element in Vector are instance of Task)
See Also:
Task

getTranslateArtInsList

public java.util.Vector getTranslateArtInsList(java.lang.String artID)
Description copied from interface: ClientAPI
Artifact translate.

Examples:

        var ArtInsList=Client.getTranslateArtInsList("ART0099992486182440");
        if(ArtInsList != null) {
                for(var i=0;i

Specified by:
getTranslateArtInsList in interface ClientAPI
Parameters:
artID - the given artifact id
Returns:
the TranslateArtIns list.(each element in Vector are instance of TranslateArtIns)
See Also:
TranslateArtIns

getTypeMap

public java.util.Iterator getTypeMap()
Description copied from interface: ClientAPI
Get the mapping of application and type

Specified by:
getTypeMap in interface ClientAPI
Returns:
the Iterator object

getUncompletePATaskNo

public int getUncompletePATaskNo(Task parentTask)
Description copied from interface: ClientAPI
Calculate the tasks count which tasks are "Add Parallel Announce" and are complete under the specified task.

Examples:

        var count = Client.getUncompletePATaskNo(Form.getCurrentTask());
        

Specified by:
getUncompletePATaskNo in interface ClientAPI
Parameters:
parentTask - the given Parent Task
Returns:
the tasks count.
See Also:
Task

getUnitType

public UnitType getUnitType(java.lang.String uid)
Description copied from interface: ClientAPI
Get the Unit Type with the specified unit id

Specified by:
getUnitType in interface ClientAPI
Parameters:
uid - the given unit type id
Returns:
the UnitType
See Also:
UnitType

getUnitTypeByLoginID

public UnitType getUnitTypeByLoginID(java.lang.String loginId)
Description copied from interface: ClientAPI
Get the Unit Type with the specified member's login id

Specified by:
getUnitTypeByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
Returns:
Unit Type of the department belong to member

getUnitTypeByMember

public UnitType getUnitTypeByMember(MemberRecord mbr)
Description copied from interface: ClientAPI
Get the Unit Type with the specified MemberRecord

Specified by:
getUnitTypeByMember in interface ClientAPI
Parameters:
mbr - the given MemberRecord
Returns:
Unit Type of the department belong to member

getUnitTypeByMemID

public UnitType getUnitTypeByMemID(java.lang.String memId)
Description copied from interface: ClientAPI
Get the Unit Type with the specified member id

Specified by:
getUnitTypeByMemID in interface ClientAPI
Parameters:
memId - the given member id
Returns:
Unit Type of the department belong to member

getUnitTypeByNo

public UnitType getUnitTypeByNo(java.lang.String memNo)
Description copied from interface: ClientAPI
Get the Unit Type with the specified member No.

Specified by:
getUnitTypeByNo in interface ClientAPI
Parameters:
memNo - the given member No.
Returns:
Unit Type of the department belong to member

goBackTo

public boolean goBackTo(java.lang.String fromTaskID,
                        java.lang.String toProID,
                        boolean artMode)
Description copied from interface: ClientAPI
For task schedule and flow control. Go back to previous process node.

Examples:

   Client.goBackTo("Tsk000000000001", "Pro000000000001", true);
        

Specified by:
goBackTo in interface ClientAPI
Parameters:
fromTaskID - a task id. If it equals to root task id, complete all task and reserve attatched file list of the toTask then go back.
toProID - the previous process id.
artMode - true for using the new data.
Returns:
true if succeeded; false otherwise.

goBackTo

public boolean goBackTo(java.lang.String fromTaskID,
                        Task toTask,
                        boolean artMode)
Description copied from interface: ClientAPI
For task schedule and flow control. Go back to previous process node.

Examples:

   Client.goBackTo("Tsk000000000001", toTask, true);
        

Specified by:
goBackTo in interface ClientAPI
Parameters:
fromTaskID - a task id. If it equals to root task id, complete all task and reserve attatched file list of the toTask then go back.
toTask - the previous Task.
artMode - true for using the new data.
Returns:
true if succeeded; false otherwise.

goBackTo

public boolean goBackTo(Task fromTask,
                        java.lang.String toProID,
                        boolean artMode)
Description copied from interface: ClientAPI
For task schedule and flow control. Go back to previous process node.

Examples:

   Client.goBackTo(fromTask, "Pro000000000001", true);
        

Specified by:
goBackTo in interface ClientAPI
Parameters:
fromTask - a task id. If it equals to root task id, complete all task and reserve attatched file list of the toTask then go back.
toProID - the previous process id.
artMode - true for the newest form data on the final task; false for the bypast form data on the specific task.
Returns:
true if succeeded; false otherwise.

goBackToWithDetailRet

public java.util.HashMap goBackToWithDetailRet(Task fromTask,
                                               java.lang.String toProID,
                                               boolean artMode)
Description copied from interface: ClientAPI
For task schedule and flow control, go back to previous process node

Examples:

        Client.goBackToWithDetailRet(fromTask, "ProXXXX", true);
        

Specified by:
goBackToWithDetailRet in interface ClientAPI
Parameters:
fromTask - the task id, if the task id equals root task id, complete all task and reserve attatched file list of the toTask then go back.
toProID - the previous process id
artMode - true for the newest form data on the final task; false for the bypast form data on the specific task
Returns:
the HashMap

initProcess

public java.util.HashMap initProcess(PASEProcess process)
Description copied from interface: ClientAPI
Initial the process.

Examples:

        var pID = "PRO0549992486182610";
        var paseProcess = new Packages.pe.pase.PASEProcess(pID);
        var hashmap = Client.initProcess(paseProcess);
        var rootTaskID = hashmap.get("rootTaskID");
        //returns root task id is like "Tsk000000263264"
        var retValue   = hashmap.get("retValue");
        //returns true if it gets successfully;false otherwise
        

Specified by:
initProcess in interface ClientAPI
Parameters:
process - the given PASEProcess
Returns:
the result ( [Key:Value] = [rootTaskID:rootTaskID] ; [retValue:Boolean(true/false)])
See Also:
PASEProcess

insert

public boolean insert(java.lang.String sqlcmd,
                      java.util.Vector record,
                      java.util.Vector columnTypeList)
Description copied from interface: ClientAPI
The method is used to insert value to database (the RTRepository).

Examples:

        var sql = "Insert MyTable (ItemID,Name,Price) values (?,?,?)";
        var record = new Packages.java.util.Vector();
        record.add(101);
        record.add("\"Pen\"");
        record.add(350);
        var columnTypeList = new Packages.java.util.Vector();
        columnTypeList.add(java.sql.Types.Integer);
        columnTypeList.add(java.sql.Types.LONGVARCHAR);
        columnTypeList.add(java.sql.Types.Integer);
        var flag = Client.insert(sql,record,columnTypeList);
        //returns true if insert is success; otherwise false
        

Specified by:
insert in interface ClientAPI
Parameters:
sqlcmd - the insert SQL string
record - the given records
columnTypeList - the given column type list.
Returns:
true if insert is success; otherwise false

insertDepartment

public boolean insertDepartment(Department dep)
Description copied from interface: ClientAPI
Insert a Department to organization.

Examples:

        Client.insertDepartment(dep);
        

Specified by:
insertDepartment in interface ClientAPI
Parameters:
dep - Department instance
Returns:
true if succeeded
See Also:
Department

insertMemberRecord

public boolean insertMemberRecord(MemberRecord mbr)
Description copied from interface: ClientAPI
Insert a MemberRecord to organization.

Examples:

        Client.insertMemberRecord(member);
        

Specified by:
insertMemberRecord in interface ClientAPI
Parameters:
mbr - MemberRecord instance
Returns:
true if succeeded
See Also:
MemberRecord

insertRole

public boolean insertRole(Role role)
Description copied from interface: ClientAPI
Insert a Role to organization.

Examples:

        Client.insertRole(role);
        

Specified by:
insertRole in interface ClientAPI
Parameters:
role - Role instance
Returns:
true if succeeded
See Also:
Role

insertScheduleEvent

public void insertScheduleEvent(ScheduleEvent evt)
Description copied from interface: ClientAPI
Insert ScheduleEvent into table

Examples:

        Client.insertScheduleEvent(event);
        

Specified by:
insertScheduleEvent in interface ClientAPI
Parameters:
evt - insert event into table

insertTaskAttachedFile

public boolean insertTaskAttachedFile(TaskAttachedFileInfo fileInfo)
Description copied from interface: ClientAPI
insert a task attached file.

Examples:

        var fileInfo  = new TaskAttachedFileInfo();
        var result = Client.insertTaskAttachedFile(fileInfo);
        

Specified by:
insertTaskAttachedFile in interface ClientAPI
Parameters:
fileInfo - the given TaskAttachedFileInfo object
Returns:
if insertion is successful

isATaskComplete

public boolean isATaskComplete(Task t)
Specified by:
isATaskComplete in interface ClientAPI

isCompanyManager

public boolean isCompanyManager(MemberRecord mbr)
Description copied from interface: ClientAPI
Is manager of the company with the specified MemberRecord

Specified by:
isCompanyManager in interface ClientAPI
Parameters:
mbr - the given MemberRecord
Returns:
true if the member is manager of company, otherwise false

isCompanyManagerByID

public boolean isCompanyManagerByID(java.lang.String memId)
Description copied from interface: ClientAPI
Is manager of the company with the specified member id

Specified by:
isCompanyManagerByID in interface ClientAPI
Returns:
true if the member is manager of company, otherwise false

isCompanyManagerByLoginID

public boolean isCompanyManagerByLoginID(java.lang.String loginId)
Description copied from interface: ClientAPI
Is manager of the company with the specified member's login id

Specified by:
isCompanyManagerByLoginID in interface ClientAPI
Parameters:
loginId - the given member's login id
Returns:
true if the member is manager of company, otherwise false

isCompanyManagerByNo

public boolean isCompanyManagerByNo(java.lang.String memNo)
Description copied from interface: ClientAPI
Is manager of the company with the specified member No.

Specified by:
isCompanyManagerByNo in interface ClientAPI
Parameters:
memNo - the given member No.
Returns:
true if the member is manager of company, otherwise false

isCSTaskComplete

public boolean isCSTaskComplete(Task t)
Specified by:
isCSTaskComplete in interface ClientAPI

isHalfHoliday

public boolean isHalfHoliday(java.lang.String date)
Description copied from interface: ClientAPI
Check specified date whether it's a half of holiday in system's default calendar.

Examples:

        var sDate = "2001/06/17";
        var Result = Client.isHalfHoliday(sDate);
        //returns true if it's a half of holiday; false otherwise
        

Specified by:
isHalfHoliday in interface ClientAPI
Parameters:
date - the given Date format string
Returns:
true if the date is a half of holiday; false otherwise.

isHalfHoliday

public boolean isHalfHoliday(java.lang.String date,
                             java.lang.String memID)
Description copied from interface: ClientAPI
Check specified date whether it's a half of holiday in member's calendar.

Examples:

  var sDate = "2001/06/17";
  var memID = "MEMxxx"
  var Result = Server.isHalfHoliday(sDate, memID);
  //returns true if it's a half of holiday; false otherwise
  

Specified by:
isHalfHoliday in interface ClientAPI
Parameters:
date - the given Date format string
memID - the given member id string
Returns:
true if the date is a half of holiday; false otherwise.

isHoliday

public boolean isHoliday(java.lang.String date)
Description copied from interface: ClientAPI
Check specified date whether it's a holiday in system's default calendar.

Examples:

        var sDate = "2001/06/17";
        var Result = Client.isHoliday(sDate);
        //returns true if it's a holiday; false otherwise
        

Specified by:
isHoliday in interface ClientAPI
Parameters:
date - the given Date format string
Returns:
true if the date is a holiday; false otherwise.

isHoliday

public boolean isHoliday(java.lang.String date,
                         java.lang.String memID)
Description copied from interface: ClientAPI
Check specified date whether it's a holiday in user's calendar.

Examples:

  var sDate = "2001/06/17";
  var memID = "MEMxxx";
  var Result = Server.isHoliday(sDate, memID);
  //returns true if it's a holiday; false otherwise
  

Specified by:
isHoliday in interface ClientAPI
Parameters:
date - the given Date format string
memID - the give member id string
Returns:
true if the date is a holiday; false otherwise.

isMemberInRoleList

public boolean isMemberInRoleList(java.lang.String mID,
                                  java.util.Vector roleIDList)
Description copied from interface: ClientAPI
Check whether the specified member is in the specified role list.

Examples:

        var task    = Form.getCurrentTask();
        var mID     = task.getMemberID();
        var mrd     = Client.getCurrentMember();
        var roleList= mrd.getRoleList();
        var result  = Client.isMemberInRoleList(mID,roleList);
        //always returns true
        

Specified by:
isMemberInRoleList in interface ClientAPI
Parameters:
mID - the given member id
roleIDList - the given list of role id
Returns:
always true

isRestSat

public boolean isRestSat(java.lang.String date)
Description copied from interface: ClientAPI
Check specified date whether it's a rest Saturday.

Examples:

        var sDate = "2001/06/17";
        var Result = Client.isRestSat(sDate);
        //returns true if it's rest Saturday; false otherwise
        

Specified by:
isRestSat in interface ClientAPI
Parameters:
date - the given Date format string
Returns:
true if the date is rest Saturday; false otherwise.

isServerConnecting

public boolean isServerConnecting()

isWorkday

public boolean isWorkday(java.lang.String date,
                         java.lang.String memID)
Description copied from interface: ClientAPI
Check specified date whether it's a work day in member's calendar.

Examples:

  var sDate = "2001/06/17";
  var memID = "MEMxxx"
  var Result = Server.isWorkday(sDate, memID);
  //returns true if it's a work day; false otherwise
  

Specified by:
isWorkday in interface ClientAPI
Parameters:
date - the given Date format string
memID - the given member id string
Returns:
true if the date is a work day; false otherwise.

lockTask

public void lockTask(java.lang.String tskID)
Description copied from interface: ClientAPI
For task schedule and flow control, set the task lock

Examples:

        Client.lockTask("TskXXXXXXX");
        

Specified by:
lockTask in interface ClientAPI
Parameters:
tskID - the task id

newDepartment

public Department newDepartment()
Description copied from interface: ClientAPI
Create a Department instance.

Examples:

        var dep = Client.newDepartment();
        

Specified by:
newDepartment in interface ClientAPI
Returns:
Department
See Also:
Department

newMemberRecord

public MemberRecord newMemberRecord()
Description copied from interface: ClientAPI
Create a MemberRecord instance.

Examples:

        var member = Client.newMemberRecord();
        

Specified by:
newMemberRecord in interface ClientAPI
Returns:
MemberRecord
See Also:
MemberRecord

newRole

public Role newRole()
Description copied from interface: ClientAPI
Create a Role instance.

Examples:

        var role = Client.newRole();
        

Specified by:
newRole in interface ClientAPI
Returns:
Role
See Also:
Role

notifyTask

public java.util.HashMap notifyTask(java.lang.String tskID)
Description copied from interface: ClientAPI
For task schedule and flow control, set the task notify

Examples:

        var result = Client.notifyTask("TskXXXXXXX");
        var booleanResult = result.get("retValue");
        //returns Boolean object
        if(!booleanResult.booleanValue()) {
                var reason = result.get("reason");
                //returns String
        }
        

Specified by:
notifyTask in interface ClientAPI
Parameters:
tskID - the task id
Returns:
the refult. ( [Key:Value] = [retValue:Boolean(true/false)]; [reason:String]).

parseAddASResultString

public java.util.Vector parseAddASResultString(java.lang.String result)
Description copied from interface: ClientAPI
Parse the countersign result string to CSResultData.

Examples:

        var task = Form.getCurrentTask();  //task is ATask
        if(task.isAnnounceReviewMode() || task.isSignCompleteMode() || task.isSignRejectMode()) {
                var result = task.getCSInstance().getNote();
                var resultObjList = Client.parseAddASResultString(result);
                for(var i = 0;i < resultObjList.size();i++) {
                        var resultData = resultObjList.get(i);
                        //resultData is CSResultData object
                }
        }
        

Specified by:
parseAddASResultString in interface ClientAPI
Parameters:
result - the given countersign result string
Returns:
all correspondence countersign result instances (each elemen in Vector are instance of CSResultData)
See Also:
CSResultData

parseCSResultString

public java.util.Vector parseCSResultString(java.lang.String result,
                                            java.util.List auditNameList)
Description copied from interface: ClientAPI
Parse the countersign result string to CSResultData

Examples:

        var task = Form.getCurrentTask();  //task is CSTask
        if(task.getTaskType().equals("csreview")) {
                var result = task.getCSInstance().getNote();
                var resultObjList = Client.parseCSResultString(result, task.getAuditList());
                for(var i = 0;i < resultObjList.size();i++) {
                        var resultData = resultObjList.get(i);
                        //resultData is CSResultData object
                }
        }
        

Specified by:
parseCSResultString in interface ClientAPI
Parameters:
result - the given countersign result string
auditNameList - the given auditing member list(each elemen in Vector are instance of String[3], String[0] for MemberID, String[1] for RoleID, String[2] for DepartmentID)
Returns:
all correspondence countersign result instances (each elemen in Vector are instance of CSResultData)
See Also:
CSResultData

printArtifactList

public void printArtifactList(java.util.Vector artInsIDList,
                              java.lang.String printMode,
                              java.lang.String pageMode,
                              java.lang.String viewState,
                              boolean bRunScript,
                              int top,
                              int down,
                              int left,
                              int right,
                              int orientation)
Description copied from interface: ClientAPI
This method is using for batch printing artifact instances. Note: JSP WebForm does not implement this method.

Examples:

        var v = new Packages.java.util.Vector();
        v.add("Ans000000658671");
        v.add("Ans000000658665");
        Client.printArtifactList(v,"PdfFile","FullPage", "", true, 0,0,0,0,0);
        

Specified by:
printArtifactList in interface ClientAPI
Parameters:
artInsIDList - the vector of artifact instance id
printMode - the String type of printing mode, should be "Java", "Pdf", "JpgFile" or "PdfFile"
pageMode - the String type of page mode, should be "FullPage", "CutPage" or "OriginalPage"
viewState - the state of artifact to display
bRunScript - true for running script on viewState
top - the top margin in millimeter
down - the bottom margin in millimeter
left - the left margin in millimeter
right - the right margin in millimeter
orientation - given 0 for horizontal, 1 for vertical

printArtifactList

public abstract void printArtifactList(java.util.Vector artInsIDList,
                                       java.lang.String printMode,
                                       java.lang.String pageMode,
                                       java.lang.String viewState,
                                       boolean bRunScript,
                                       int width,
                                       int height,
                                       int top,
                                       int down,
                                       int left,
                                       int right,
                                       int orientation,
                                       boolean popUpDlg)
Description copied from interface: ClientAPI
This method is using for batch printing artifact instances. Note: JSP WebForm does not implement this method.

Examples:

        var v = new Packages.java.util.Vector();
        v.add("Ans000000658671");
        v.add("Ans000000658665");
        Client.printArtifactList(v,"PdfFile","FullPage", "", true, 200, 200,0,0,0,0,0,false);
        

Specified by:
printArtifactList in interface ClientAPI
Parameters:
artInsIDList - the vector of artifact instance id
printMode - the String type of printing mode, should be "Java", "Pdf", "JpgFile" or "PdfFile"
pageMode - the String type of page mode, should be "FullPage", "CutPage" or "OriginalPage"
viewState - the state of artifact to display
bRunScript - true for running script on viewState
width - the width of drawing Window
height - the height of drawing Window
top - the top margin in millimeter
down - the bottom margin in millimeter
left - the left margin in millimeter
right - the right margin in millimeter
orientation - given 0 for horizontal, 1 for vertical
popUpDlg - pop-up the print setting dialog

query

public java.util.Vector query(java.lang.String sqlcmd,
                              java.util.Hashtable columnProperty)
Description copied from interface: ClientAPI
The method is used to query value from database (the RTRepository).

Examples:

        var sql = "select ID,UserName from Mem_GenInf ";
        var columnProperty = new Packages.java.util.Hashtable();
        var dataSet = Client.query(sql,columnProperty);
        var nameList = columnProperty.get("columnName");
        //returns Vector object, each element in Vector are instance of String
        var typeList = columnProperty.get("columnType");
        //returns Vector object, each element in Vector are instance of Integer
        var searchableList = columnProperty.get("columnSearchable");
        //returns Vector object, each element in Vector are instance of Boolean
        for(var i = 0;i < dataSet.size();i++) {
                var rowData = dataSet.get(i);
                //returns Hashtable object
        }
        

Specified by:
query in interface ClientAPI
Parameters:
sqlcmd - the query SQL string
columnProperty - the Hashtable instance which want to get the column property of database
Returns:
the row value. (each element in Vector are instance of Hashtable)
See Also:
query(String,Hashtable,int)

query

public java.util.Vector query(java.lang.String sqlcmd,
                              java.util.Hashtable columnProperty,
                              int top)
Description copied from interface: ClientAPI
The method is used to query value from database (the RTRepository).

Examples:

        var sql = "select ID,UserName from Mem_GenInf ";
        var columnProperty = new Packages.java.util.Hashtable();
        var dataSet = Client.query(sql,columnProperty, 5);
        var nameList = columnProperty.get("columnName");
        //returns Vector object, each element in Vector are instance of String
        var typeList = columnProperty.get("columnType");
        //returns Vector object, each element in Vector are instance of Integer
        var searchableList = columnProperty.get("columnSearchable");
        //returns Vector object, each element in Vector are instance of Boolean
        for(var i = 0;i < dataSet.size();i++) {
                var rowData = dataSet.get(i);
                //returns Hashtable object
        }
        

Specified by:
query in interface ClientAPI
Parameters:
sqlcmd - the query SQL string
columnProperty - the Hashtable instance which want to get the column property of database
top - the size of row data. Top is -1 means that want to get the all row datas.
Returns:
the row value. (each element in Vector are instance of Hashtable)

Hashtable [Key:Value] = [columnName:fieldValue]. The mapping of typeList and fieldValue type is:

        TINYINT - Short
        SMALLINT, INTEGER, BIGINT - Integer
        DECIMAL, NUMERIC - java.math.BigDecimal
        REAL - Float
        DOUBLE, FLOAT - Double
        DATE - Date
        TIMESTAMP - Timestamp
        BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, LONGVARCHAR - String
   

query

public java.util.Vector query(java.lang.String sqlcmd,
                              java.util.Vector columnNameList)
Description copied from interface: ClientAPI
The method is used to query value from database (the RTRepository).

Examples:

        var sql = "select ID,UserName from Mem_GenInf ";
        var columnNameList = new Packages.java.util.Vector();
        var dataSet = Client.query(sql,columnNameList);
        for(var i = 0;i < dataSet.size();i++) {
                var rowData = dataSet.get(i);
                //returns Hashtable object
                for(var j = 0;j < columnNameList.size();j++) {
                        var fieldValue = rowData.get(columnNameList.get(i));
                        //returns String
                }
        }
        

Specified by:
query in interface ClientAPI
Parameters:
sqlcmd - the query SQL string
columnNameList - the Vector instance which want to get the column name list of database
Returns:
the row value. (each element in Vector are instance of Hashtable)

Hashtable [Key:Value] = [columnName:fieldValue]. The type of fieldValue is always String.


registerType

public boolean registerType(java.lang.String type,
                            java.lang.String app)
Description copied from interface: ClientAPI
Register file type mapping.

Examples:

        var type = "html";
        var app  = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";
        var Result = Client.registerType(type,app);
        //returns true if it registers successfully; false otherwise
        

Specified by:
registerType in interface ClientAPI
Parameters:
type - the given secondary filename
app - the given execute file path and name
Returns:
true if it registers successfully; false otherwise

removeAFTVElementVO

public boolean removeAFTVElementVO(java.lang.String subject,
                                   java.lang.String item)
Description copied from interface: ClientAPI
remove AFTVElementVO from database

Examples:

 var artInsId = MyTask.getArtInstance().getID();
 var itemId = "ITEM0";
 var result = Client.removeAFTVElementVO(artInsId, itemId);
      returns true if it sets successfully ;false otherwise
 

Specified by:
removeAFTVElementVO in interface ClientAPI
Parameters:
subject - the given AFTVElementVO's subject
item - this give AFTVElementVO's item
Returns:
true if succeeded

removeLocalObject

public boolean removeLocalObject(java.lang.String id)
Description copied from interface: ClientAPI
Remove an local object.

Examples:

        var myTaskList = Client.getTaskOfMember("MEM0000992492169920",Constant.TASK_STATE_ALL);
        Client.setLocalObject("myTaskList1",myTaskList);
        var Result = Client.removeLocalObject("myTaskList1");
        //returns true if it's successful; false otherwise
        

Specified by:
removeLocalObject in interface ClientAPI
Parameters:
id - the id of the local object which want to be removed
Returns:
ture if removing this object successfully; otherwise, false

removeScheduleEvent

public void removeScheduleEvent(java.lang.String id)
Description copied from interface: ClientAPI
Remove ScheduleEvent by event id

Examples:

        Client.removeScheduleEvent(eventID);
        

Specified by:
removeScheduleEvent in interface ClientAPI
Parameters:
id - event id

removeType

public boolean removeType(java.lang.String type)
Description copied from interface: ClientAPI
Remove the registered file type mapping.

Examples:

        var type = "html";
        var Result = Client.removeType(type);
        //returns true if it removes successfully; false otherwise
        

Specified by:
removeType in interface ClientAPI
Parameters:
type - the given secondary filename
Returns:
true if it removes successfully; false otherwise

reScheduleTask

public void reScheduleTask(Task task)
Description copied from interface: ClientAPI
Reschedule the task Cron Event(s)

Examples:

   var duration = 5;
        var task = Form.getCurrentTask();
        task.setDuration(duration);
        Client.reScheduleTask(task);
        

Specified by:
reScheduleTask in interface ClientAPI

resetDeputyAndDeputyState

public boolean resetDeputyAndDeputyState(java.lang.String memId,
                                         java.lang.String deputyId,
                                         boolean deputyState)
Description copied from interface: ClientAPI
Reset deputy state and deputy member.

Examples:

        var p_MyMemID = "MEM0000992492169920";
        var p_DeputyMemID = "MEM0002972876172780";
        var p_DeputyState = true; // set DeputyState ON
        var Result = Client.resetDeputyAndDeputyState(p_MyMemID,p_DeputyMemID,p_DeputyState);
        //returns true if it reset successfully; false otherwise
        

Specified by:
resetDeputyAndDeputyState in interface ClientAPI
Parameters:
memId - the given member id whom starts up the deputation
deputyId - the given member id whom is a deputy
deputyState - the given true for set deputy state is on ,else false
Returns:
true if it reset successfully; false otherwise

resetMemberDelegation

public boolean resetMemberDelegation()

resetMemberDelegation

public boolean resetMemberDelegation(MemberRecord mbr)
Description copied from interface: ClientAPI
Redispatch tasks to deputy of the member and also update memberrecord.

Examples:

   var member = Client.getCurrentMember();
   var stateTime = Form.getValue("FTextField0"); // Format "2006/01/31 17:30"
   var endTime = Form.getValue("FTextField1");
   member.setExeucteDeputyDuration(true);
   // Set start deputy duration
   member.setStartExecuteDeputyTime(stateTime);
   // Set end deputy duration
   member.setEndExecuteDeputyTime(endTime);
   // Set single deputy member
   member.setByDeputyRule(false);
   member.setDeputyID("MEM000000000003");
   // Set turn on deputy state
   member.setDeputyState(true);
   Client.resetMemberDelegation(member);
  

Specified by:
resetMemberDelegation in interface ClientAPI
Parameters:
mbr - MemberRecord memberrecord
Returns:
boolean true if success else false
See Also:
MemberRecord

runJScript

public abstract boolean runJScript(java.lang.String script,
                                   java.util.HashMap globalVar)
Description copied from interface: ClientAPI
Script Runner.

Examples:

        var script = Form.getValue("TextArea1");  // Input script into TextArea1
        var globalVar = new java.util.HashMap();
        globalVar.put("Form",Form);
        Client.runJScript(script,globalVar);
        

Specified by:
runJScript in interface ClientAPI
Parameters:
script - the input script data string
globalVar - the HashMap which is a global variable
Returns:
false if some error occurred; otherwise, true

runScriptOnServer

public void runScriptOnServer(java.lang.String code,
                              Task t)
Description copied from interface: ClientAPI
Run script on server.

Examples:

        var script = Form.getValue("TextArea1");  // Input script into TextArea1
        var task = Form.getCurrentTask();
        Client.runScriptOnServer(script,task);
        

Specified by:
runScriptOnServer in interface ClientAPI
t - the task

saveAFTVElementVO

public boolean saveAFTVElementVO(AFTVElementVO vo)
Description copied from interface: ClientAPI
save AFTVElementVO to database

Examples:

 var artInsId = MyTask.getArtInstance().getID();
 var itemId = "ITEM0";
 var vo = new Packages.pe.pase.AFTVElementVO(artInsId, itemId);
 vo.setPrincipal("DEP00001091073095699");
 vo.setOfflineReadonly(0);
 vo.setEditCount(1);
 vo.setSaveCount(-1);
  var result = Client.saveAFTVElementVO(vo);
      returns true if it sets successfully ;false otherwise
 

Specified by:
saveAFTVElementVO in interface ClientAPI
Parameters:
vo - the given AFTVElementVO
Returns:
true if succeeded

saveArtifactListToJPG

public abstract void saveArtifactListToJPG(java.util.Vector artInsIDList,
                                           java.util.Vector fileList,
                                           java.lang.String viewState,
                                           boolean bRunScript,
                                           int top,
                                           int down,
                                           int left,
                                           int right,
                                           int orientation)
Description copied from interface: ClientAPI
This method is using for batch saving artifact instances to JPG file.
Note: JSP WebForm does not implement this method.
This function would not proceed in Actions of client side.

Examples:

        var v = new Packages.java.util.Vector();
        v.add("Ans000000658671");
        v.add("Ans000000658665");
        var fv = new Packages.java.util.Vector();
        fv.add("fa.jpg");
        fv.add("fb.jpg");
        Client.saveArtifactListToJPG(v,fv,"",true,0,0,0,0,0);
        

Specified by:
saveArtifactListToJPG in interface ClientAPI
Parameters:
artInsIDList - the vector of artifact instance id
fileList - the file name list of JPG file
viewState - the state of artifact to display
bRunScript - true for running script on viewState
top - the top margin in millimeter
down - the bottom margin in millimeter
left - the left margin in millimeter
right - the right margin in millimeter
orientation - given 0 for horizontal, 1 for vertical

saveArtifactListToPDF

public abstract void saveArtifactListToPDF(java.util.Vector artInsIDList,
                                           java.lang.String pageMode,
                                           java.lang.String fileName,
                                           java.lang.String viewState,
                                           boolean bRunScript,
                                           int top,
                                           int down,
                                           int left,
                                           int right,
                                           int orientation)
Description copied from interface: ClientAPI
This method is using for batch saving artifact instances to PDF file.
Note: JSP WebForm does not implement this method.
This function would not proceed in Actions of client side.

Examples:

        var v = new Packages.java.util.Vector();
        v.add("Ans000000658671");
        v.add("Ans000000658665");
        Client.saveArtifactListToPDF(v,"OriginalPage","t111.pdf","",true,0,0,0,0,0);
        

Specified by:
saveArtifactListToPDF in interface ClientAPI
Parameters:
artInsIDList - the vector of artifact instance id
pageMode - the String type of page mode, should be "FullPage", "CutPage" or "OriginalPage"
fileName - the file name of PDF file
viewState - the state of artifact to display
bRunScript - true for running script on viewState
top - the top margin in millimeter
down - the bottom margin in millimeter
left - the left margin in millimeter
right - the right margin in millimeter
orientation - given 0 for horizontal, 1 for vertical

searchData

public java.util.Vector searchData(SearchCondition cond)

searchScheduleEvent

public java.util.Vector searchScheduleEvent(ScheduleSearchCondition cond)
Description copied from interface: ClientAPI
Search ScheduleEvent by condition search

Examples:

        var ret = Client.searchScheduleEvent(searchEvent);
        

Specified by:
searchScheduleEvent in interface ClientAPI
Parameters:
cond - ScheduleSearchCondition of event
Returns:
Vector contains object of ScheduleEvent

sendHTMLMail

public void sendHTMLMail(java.lang.String from,
                         java.lang.String to,
                         java.lang.String subject,
                         java.lang.String text)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        Client.sendHTMLMail(from,to,subject,text);
        

Specified by:
sendHTMLMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
subject - the "subject" field of E-Mail
text - the content of E-Mail

sendHTMLMail

public void sendHTMLMail(java.lang.String from,
                         java.lang.String to,
                         java.lang.String cc,
                         java.lang.String subject,
                         java.lang.String text)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to      = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowring.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        Client.sendHTMLMail(from,to,cc,subject,text);
        

Specified by:
sendHTMLMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail

sendHTMLMail

public void sendHTMLMail(java.lang.String from,
                         java.lang.String to,
                         java.lang.String cc,
                         java.lang.String subject,
                         java.lang.String text,
                         java.util.Vector fileList)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendHTMLMail(from,to,cc,subject,text,fileList);
        

Specified by:
sendHTMLMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.

sendHTMLMail

public void sendHTMLMail(java.lang.String from,
                         java.lang.String to,
                         java.lang.String cc,
                         java.lang.String subject,
                         java.lang.String text,
                         java.util.Vector fileList,
                         java.util.HashMap auth)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var CurrMember = Client.getMember(MyTask.getMemberID());
        var FrontMember= Client.getMember(MyTask.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        var auth = new java.util.HashMap();
        auth.put("username", "test");
        auth.put("password", "testpassword");
        Client.sendHTMLMail(from,to,cc,subject,text,fileList,auth);
        

Specified by:
sendHTMLMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server.
auth - the login information of the mail server. {"username"=, "password"=}

sendHTMLMailExt

public void sendHTMLMailExt(java.lang.String from,
                            java.lang.String to,
                            java.lang.String cc,
                            java.lang.String subject,
                            java.lang.String text,
                            java.util.Vector fileList,
                            java.lang.String tskID)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content. $taskID";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendHTMLMailExt(from,to,cc,subject,text,fileList,task.getID());
        

Specified by:
sendHTMLMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.
tskID - the designated task ID to execute

sendHTMLMailExt

public void sendHTMLMailExt(java.lang.String from,
                            java.lang.String to,
                            java.lang.String cc,
                            java.lang.String subject,
                            java.lang.String text,
                            java.util.Vector fileList,
                            Task task)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content. $taskID";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendHTMLMailExt(from,to,cc,subject,text,fileList,task);
        

Specified by:
sendHTMLMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.
task - the designated task to execute

sendHTMLMailExt

public void sendHTMLMailExt(java.lang.String from,
                            java.lang.String to,
                            java.lang.String cc,
                            java.lang.String subject,
                            java.lang.String text,
                            java.util.Vector fileList,
                            Task task,
                            java.lang.String script)
Description copied from interface: ClientAPI
Send E-Mail through internet, using HTML format.

Specified by:
sendHTMLMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail.
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail.
cc - the "cc" field of E-Mail address.
subject - the "subject" field of E-Mail.
text - the content of E-Mail.
fileList - the attached file name list. The file name is based on PASE Server.
task - the designated task to execute.
script - the designated script to execute.

sendMail

public void sendMail(java.lang.String from,
                     java.lang.String to,
                     java.lang.String subject,
                     java.lang.String text)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to      = FrontMember.getEmail(); // Receiver e-mail
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        Client.sendMail(from,to,subject,text);
        

Specified by:
sendMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
subject - the "subject" field of E-Mail
text - the content of E-Mail

sendMail

public void sendMail(java.lang.String from,
                     java.lang.String to,
                     java.lang.String cc,
                     java.lang.String subject,
                     java.lang.String text)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        Client.sendMail(from,to,cc,subject,text);
        

Specified by:
sendMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail

sendMail

public void sendMail(java.lang.String from,
                     java.lang.String to,
                     java.lang.String cc,
                     java.lang.String subject,
                     java.lang.String text,
                     java.util.Vector fileList)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowring.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendMail(from,to,cc,subject,text,fileList);
        

Specified by:
sendMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.

sendMail

public void sendMail(java.lang.String from,
                     java.lang.String to,
                     java.lang.String cc,
                     java.lang.String subject,
                     java.lang.String text,
                     java.util.Vector fileList,
                     java.util.HashMap auth)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var CurrMember = Client.getMember(MyTask.getMemberID());
        var FrontMember= Client.getMember(MyTask.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        var auth = new java.util.HashMap();
        auth.put("username", "test");
        auth.put("password", "testpassword");
        Client.sendMail(from,to,cc,subject,text,fileList,auth);
        

Specified by:
sendMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server.
auth - the login information of the mail server. {"username"=, "password"=}

sendMailExt

public void sendMailExt(java.lang.String from,
                        java.lang.String to,
                        java.lang.String cc,
                        java.lang.String subject,
                        java.lang.String text,
                        java.util.Vector fileList,
                        java.lang.String tskID)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content. $taskID";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendMailExt(from,to,cc,subject,text,fileList,task.getID());
        

Specified by:
sendMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.
tskID - the designated task ID to execute

sendMailExt

public void sendMailExt(java.lang.String from,
                        java.lang.String to,
                        java.lang.String cc,
                        java.lang.String subject,
                        java.lang.String text,
                        java.util.Vector fileList,
                        Task task)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var subject = "This is a subject";    // Mail Subject
        var text    = "This is a content. $taskID";    // Mail Content
        var fileList = new java.util.Vector();
        fileList.add("c:\\test.jpg");
        Client.sendMailExt(from,to,cc,subject,text,fileList,task);
        

Specified by:
sendMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail
cc - the "cc" field of E-Mail address
subject - the "subject" field of E-Mail
text - the content of E-Mail
fileList - the attached file name list. The file name is based on PASE Server, not Client.
task - the designated task to execute

sendMailExt

public void sendMailExt(java.lang.String from,
                        java.lang.String to,
                        java.lang.String cc,
                        java.lang.String subject,
                        java.lang.String text,
                        java.util.Vector fileList,
                        Task task,
                        java.lang.String script)
Description copied from interface: ClientAPI
Send E-Mail through internet.

Specified by:
sendMailExt in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail.
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail.
cc - the "cc" field of E-Mail address.
subject - the "subject" field of E-Mail.
text - the content of E-Mail.
fileList - the attached file name list. The file name is based on PASE Server.
task - the designated task to execute.
script - the designated script to execute.

sendPASEMessage

public boolean sendPASEMessage(PASEMessage msg)
Description copied from interface: ClientAPI
Send message through message-system built in Agentflow.

Examples:

        var task =  Form.getCurrentTask();
        var CurrMember = Client.getCurrentMember();
        var FrontMember= Client.getMember(task.getFrontUser());
        var msg = new Packages.pe.pase.PASEMessage();
        msg.setSendID(CurrMember.getID());     // Sender MemID
        msg.setSendName(CurrMember.getName()); // Sender Name
        msg.setRecID(FrontMember.getID());     // Receiver MemID
        msg.setRecName(FrontMember.getName()); // Receiver Name
        msg.setTitle("This is a title");       // Message Title
        msg.setMsg("This is a content");       // Message Content
        msg.setTime(java.lang.System.currentTimeMillis()); // Message create time
        var Result = Client.sendPASEMessage(msg);
        //returns true if it's successful; false otherwise
        

Specified by:
sendPASEMessage in interface ClientAPI
Parameters:
msg - the deliverable message
Returns:
true if the sending is successful; false otherwise.
See Also:
PASEMessage

sendTemplateMail

public void sendTemplateMail(java.lang.String from,
                             java.lang.String to,
                             java.lang.String cc,
                             java.lang.String etID,
                             java.util.Vector fileList,
                             java.lang.String taskID,
                             boolean isHtml)
Description copied from interface: ClientAPI
Send E-Mail Template through internet, using HTML format.

Examples:

        var CurrMember = Client.getMember(MyTask.getMemberID());
        var FrontMember= Client.getMember(MyTask.getFrontUser());
        var from = CurrMember.getEmail();     // Sender e-mail
        var to = FrontMember.getEmail(); // Receiver e-mail
        var cc = "manager@flowrin.com";
        var fileList = new java.util.Vector();
      var etID = "ETPXXXXXXXXXXX";
        fileList.add("c:\\test.jpg");
        Client.sendTemplateMail(from,to,cc,etID,fileList,MyTask.getID(),true);
        

Specified by:
sendTemplateMail in interface ClientAPI
Parameters:
from - the "from" filed of E-Mail auto append EmailTemplate form
to - the "to" field of E-Mail address(format:aaa@x.y.z), used as the destination of the E-Mail,auto append EmailTemplate to
cc - the "cc" field of E-Mail address
etID - EmailTemplate ID
fileList - the attached file name list. The file name is based on PASE Server.
taskID - the designated taskID to execute
isHtml - set mail format is html or text

setArtInsState

public boolean setArtInsState(PASEartInstance artInstance,
                              java.lang.String stateID)
Description copied from interface: ClientAPI
Set artifact instance state.

Examples:

        var stateID = "AST0371992486182500";
        var taskID  = "Tsk000000226232";
        var task    = Client.getTask(taskID);
        var artInstance = task.getArtInstance();
        var Result  = Client.setArtInsState(artInstance,stateID);
        //returns true if it sets successfully ;false otherwise
        

Specified by:
setArtInsState in interface ClientAPI
Parameters:
artInstance - the given PASEartInstance
stateID - the given artifact state id
Returns:
true if it sets successfully; false otherwise
See Also:
PASEartInstance

setDbService

public void setDbService(DBService dBService)

setFileService

public void setFileService(FileService fileService)

setFlowService

public void setFlowService(FlowService flowService)

setGlobals

public void setGlobals(java.lang.String rootTaskID,
                       java.util.HashMap args)
Description copied from interface: ClientAPI
Keep data into database and then reuse.

Examples:

        var task = Form.getCurrentTask();
        var rootTaskID = task.getRootID();
        var ht =  new java.util.HashMap();
        ht.put("ItemName","Pen");
        Client.setGlobals(rootTaskID,ht);
        

Specified by:
setGlobals in interface ClientAPI
Parameters:
rootTaskID - the given root task id
args - the given a HashMap data ( [Key:Value] = [retValue:Boolean(true/false)])

setLocalObject

public void setLocalObject(java.lang.String id,
                           java.lang.Object obj)
Description copied from interface: ClientAPI
Set a local object which belongs to this client.

Examples:

        var myTaskList = Client.getTaskOfMember("MEM0000992492169920",Constant.TASK_STATE_ALL);
        Client.setLocalObject("myTaskList1",myTaskList);
        var list = Client.getLocalObject("myTaskList1");
        if(list != null) {
                for(var i=0;i<list.size();i++){
                        var data=list.get(i);
                        //returns element of a Vector object is like "[Tsk000000213214]Process1"
                }
        }
        

Specified by:
setLocalObject in interface ClientAPI
Parameters:
id - this object's id
obj - the object.

setMonitorRelation

public boolean setMonitorRelation(java.lang.String sourceTaskID,
                                  java.lang.String createdRootTaskID)
Description copied from interface: ClientAPI
Set task monitor relation, store root task ID and those created root task ID when executed.

Examples:

        var taskID = Form.getCurrentTask().getID();
        var createRootTaskID = Client.createProcess(userID,proID,args,false, true);
        var result = Client.setMonitorRelation(taskID, createRootTaskID);
        if(result) {
                java.lang.System.out.println("Success!");
        } else {
                java.lang.System.out.println("Failed!");
        }
        

Specified by:
setMonitorRelation in interface ClientAPI
Parameters:
sourceTaskID - the given RootTaskID
Returns:
true if the execution is successful; false otherwise.

setMonitorRelation

public boolean setMonitorRelation(java.lang.String sourceTaskID,
                                  java.util.Vector createdRootTaskIDs)
Description copied from interface: ClientAPI
Set task monitor relation, store root task ID and those created root task ID when executed.

Examples:

        var taskID = Form.getCurrentTask().getID();
        var createRootTaskID = Client.createProcess(userID,proID,args,false, true);
        var idList = new java.util.Vector();
        idList.add(createRootTaskID);
        var result = Client.setMonitorRelation(taskID, idList);
        if(result) {
                java.lang.System.out.println("Success!");
        } else {
                java.lang.System.out.println("Failed!");
        }
        

Specified by:
setMonitorRelation in interface ClientAPI
Parameters:
sourceTaskID - the given RootTaskID
createdRootTaskIDs - the given created RootTaskID list
Returns:
true if the execution is successful; false otherwise.

setOrgService

public void setOrgService(OrgService orgService)

setPdeService

public void setPdeService(PDEService pdeService)

setReportService

public void setReportService(ReportService reportService)

setSecurityService

public void setSecurityService(SecurityService securityService)

setUtilityService

public void setUtilityService(UtilityService utilityService)

SQLdeleteValue

public boolean SQLdeleteValue(java.lang.String sql)
Description copied from interface: ClientAPI
The method is used to delete value from database (the RTRepository).

Examples:

        var sql = "delete from MyTable where Name=\'Pen\'";
        var Result = Client.SQLdeleteValue(sql);
        //returns true if it's successful; false otherwise
        

Specified by:
SQLdeleteValue in interface ClientAPI
Parameters:
sql - the input SQL data string
Returns:
true if the deletion is successful; false otherwise.

SQLinsertValue

public boolean SQLinsertValue(java.lang.String sql)
Description copied from interface: ClientAPI
The method is used to insert value to database (the RTRepository).

Examples:

        var sql = "Insert MyTable (ItemID,Name,Price) values (101,\'Pen\',350)";
        var Result = Client.SQLinsertValue(sql);
        //returns true if it's successful; false otherwise
        

Specified by:
SQLinsertValue in interface ClientAPI
Parameters:
sql - the input SQL data string
Returns:
true if the insertion is successful; false otherwise.

SQLloadValue

public java.util.List SQLloadValue(java.lang.String sql)
Description copied from interface: ClientAPI
The method is used to load value from database (the RTRepository).

Examples:

        var sql = "select ID,UserName from Mem_GenInf ";
        var dataSet = Client.SQLloadValue(sql);
        if (dataSet.size()>0) {
                for (var i=0; i<dataSet.size(); i++){
                        var record = dataSet.get(i);
                        var userID = record.get("ID");
                        //returns the ID field value is like "FR099"
                        var userName = record.get("UserName");
                        //returns the userName field value is like "JeanLin"
                }
        }
        

Specified by:
SQLloadValue in interface ClientAPI
Parameters:
sql - the input SQL data string
Returns:
the value mapping to the SQL syntax

SQLupdateValue

public boolean SQLupdateValue(java.lang.String sql)
Description copied from interface: ClientAPI
The method is used to update value to database (the RTRepository).

Examples:

        var sql = "update MyTable set Price =350 where Name=\'Pen\'";
        var Result = Client.SQLupdateValue(sql);
        //returns true if it's successful; false otherwise
        

Specified by:
SQLupdateValue in interface ClientAPI
Parameters:
sql - the input SQL data string
Returns:
true if the update is successful; false otherwise.

startTask

public java.util.HashMap startTask(Task oldTask)
Description copied from interface: ClientAPI
Start the task.

Examples:

        var taskID  = "Tsk000000213214";
        var task    = Client.getTask(taskID);
        var hashmap = Client.startTask(task);
        var retValue = hashmap.get("retValue");
        //returns true if it starts successfully;false otherwise
        

Specified by:
startTask in interface ClientAPI
Parameters:
oldTask - the given Task
Returns:
the result ( [Key:Value] = [retValue:Boolean(true/false)])
See Also:
Task

stopRootTask

public void stopRootTask(java.lang.String rootID)
Description copied from interface: ClientAPI
For flow control, stop the root process

Examples:

        Client.stopRootTask("Tsk000000835835");
        

Specified by:
stopRootTask in interface ClientAPI
Parameters:
rootID - the root task id.

suspendTask

public java.util.HashMap suspendTask(Task t)

unlockCoSign

public void unlockCoSign(java.lang.String rt_proID)
Description copied from interface: ClientAPI
Unlock a countrsign task.

Specified by:
unlockCoSign in interface ClientAPI
Parameters:
rt_proID - the given RootTask-Process string

unlockTask

public void unlockTask(java.lang.String tskID)
Description copied from interface: ClientAPI
For task schedule and flow control, set the task unlock

Examples:

        Client.unlockTask("TskXXXXXXX");
        

Specified by:
unlockTask in interface ClientAPI
Parameters:
tskID - the task id

update

public boolean update(java.lang.String sqlcmd,
                      java.util.Vector newRecord,
                      java.util.Vector newColumnTypeList,
                      java.util.Vector oldRecord,
                      java.util.Vector oldColumnTypeList)
Description copied from interface: ClientAPI
The method is used to update value to database (the RTRepository).

Examples:

        var sql = "update MyTable set Price=350 where Name=?";
        var newRecord = new Packages.java.util.Vector();
        newRecord.add(350);
        var newColumnTypeList = new Packages.java.util.Vector();
        newColumnTypeList.add(java.sql.Types.Integer);
        var oldRecord = new Packages.java.util.Vector();
        oldRecord.add("\"Pen\"");
        var oldColumnTypeList = new Packages.java.util.Vector();
        oldColumnTypeList.add(java.sql.Types.LONGVARCHAR);
        var flag = Client.update(sql,newRecord,newColumnTypeList,oldRecord,oldColumnTypeList);
        //returns true if update is success; otherwise false
        

Specified by:
update in interface ClientAPI
Parameters:
sqlcmd - the update SQL string
newRecord - the given new records
newColumnTypeList - the given new colimn type list
oldRecord - the given old records
oldColumnTypeList - the given old column type list
Returns:
true if update is success; otherwise false

updateArtInstance

public boolean updateArtInstance(PASEartInstance instance)
Description copied from interface: ClientAPI
Update artifact instance Notice: Artifact instance is carrying artifact state information. If the state of instance parameter is not the same as current instance, current instance will not be updated with parameter instance. Use updateArtInstanceLog(java.lang.String tID, PASEartInstance instance) method instead. This behavior is for protecting those processes which are not completed yet. Update artifact instance with wrong artifact state could damage process routing.

Examples:

      var newArtInstance = Client.createArtInstance("ART0099992486182440");
      var flag = Client.updateArtInstance(newArtInstance);
      

Specified by:
updateArtInstance in interface ClientAPI
Parameters:
instance - the given PASEartInstance
Returns:
true for success, else false
See Also:
PASEartInstance

updateArtInstance

public boolean updateArtInstance(java.lang.String tID,
                                 PASEartInstance instance)
Description copied from interface: ClientAPI
Update artifact instance

Examples:

      var newArtInstance = Client.createArtInstance("ART0099992486182440");
      var task = Form.getCurrentTask();
      var flag = Client.updateArtInstance(task.getID(), newArtInstance);
      

Specified by:
updateArtInstance in interface ClientAPI
Parameters:
tID - the given task id
instance - the given PASEartInstance
Returns:
true for success, else false
See Also:
PASEartInstance

updateArtInstanceLog

public boolean updateArtInstanceLog(java.lang.String tID,
                                    PASEartInstance instance)
Description copied from interface: ClientAPI
Update artifact instance log

Examples:

      var task = Form.getCurrentTask();
      var artInstance = task.getArtInstance();
      var flag = Client.updateArtInstanceLog(task.getID(), artInstance);
      

Specified by:
updateArtInstanceLog in interface ClientAPI
Parameters:
tID - the given task id
instance - the given PASEartInstance
Returns:
true for success, else false
See Also:
PASEartInstance

updateAttachFileInfo

public boolean updateAttachFileInfo(java.lang.String attachCmpName,
                                    AttachFileInfo fileInfo)
Description copied from interface: ClientAPI
update file information of the specified attach file uploaded by attach file component attachCmpName

Examples:

        var attachFileCmp = Form.getComponent("AttachFile0");
      var fileList = attachFileCmp.getProperty("FileList");
      var fileInfo = fileList.get(0);
      fileInfo.setNote("file note");
        var result = Client.updateAttachFileInfo("AttachFile0", fileInfo);
        

Specified by:
updateAttachFileInfo in interface ClientAPI
Parameters:
attachCmpName - the attach file component which fileInfo belongs to
fileInfo - the given AttachFileInfo object
Returns:
if update is successful
See Also:
FormAPI

updateCompany

public boolean updateCompany(Company company)
Description copied from interface: ClientAPI
Update a Company in organization.

Examples:

        Client.updateCompany(company);
        

Specified by:
updateCompany in interface ClientAPI
Parameters:
company - Company instance
Returns:
true if succeeded
See Also:
Company

updateDepartment

public boolean updateDepartment(Department dep)
Description copied from interface: ClientAPI
Update a Department in organization.

Examples:

        Client.updateDepartment(dep);
        

Specified by:
updateDepartment in interface ClientAPI
Parameters:
dep - Department instance
Returns:
true if succeeded
See Also:
Department

updateDeputyAndState

public boolean updateDeputyAndState(java.lang.String deputyId,
                                    boolean deputyState)
Description copied from interface: ClientAPI
Update deputy member id and state.

Examples:

        var myTaskList = Client.getTaskOfMember("MEM0000992492169920",Constant.TASK_STATE_ALL);
        var p_DeputyMemID = "MEM0000992492169920";
        var p_DeputyState = true;  // set DeputyState is true
        var Result = Client.updateDeputyAndState(p_DeputyMemID,p_DeputyState);
        //returns true if it's successful; false otherwise
        

Specified by:
updateDeputyAndState in interface ClientAPI
Parameters:
deputyId - the given the deputy member id
deputyState - the given true if it will start deputy; false otherwise.
Returns:
ture if updating deputy and state successfully; otherwise, false

updateMemberRecord

public boolean updateMemberRecord(MemberRecord mbr)
Description copied from interface: ClientAPI
Update a MemberRecord in organization.

Examples:

        Client.updateMemberRecord(member);
        

Specified by:
updateMemberRecord in interface ClientAPI
Parameters:
mbr - MemberRecord instance
Returns:
true if succeeded
See Also:
MemberRecord

updatePASEMessage

public boolean updatePASEMessage(PASEMessage msg)
Description copied from interface: ClientAPI
Update the message state includes both IsNew and IsReply fields.

Examples:

        var MessageList = Client.getPASEMessageOfMember("MEM0000992492169920");
        if(MessageList != null) {
                for(var i=0;i<MessageList.size();i++){
                        var msg=MessageList.get(i);
                        msg.setNew(true);
                        msg.setReply(false);
                        var Result = Client.updatePASEMessage(msg);
                        //returns true if it's successful; false otherwise
                }
        }
        

Specified by:
updatePASEMessage in interface ClientAPI
Parameters:
msg - the renewable message
Returns:
true if the update is successful; false otherwise.
See Also:
PASEMessage

updateRole

public boolean updateRole(Role role)
Description copied from interface: ClientAPI
Update a Role in organization.

Examples:

        Client.updateRole(role);
        

Specified by:
updateRole in interface ClientAPI
Returns:
true if succeeded
See Also:
Role

updateScheduleEvent

public void updateScheduleEvent(ScheduleEvent evt)
Description copied from interface: ClientAPI
Update ScheduleEvent

Examples:

        Client.updateScheduleEvent(event);
        

Specified by:
updateScheduleEvent in interface ClientAPI
Parameters:
evt - ScheduleEvent which will be updated

updateTask

public boolean updateTask(Task t)
Description copied from interface: ClientAPI
Update the task data.

Examples:

        var taskID = "Tsk000000226232";
        var task   = Client.getTask(taskID);
        task.setKeyWord("Hello");
        Client.updateTask(task);
        

Specified by:
updateTask in interface ClientAPI
Parameters:
t - the given Task
Returns:
true for success. false for unsuccess.
See Also:
Task

updateTaskState

public boolean updateTaskState(Task t)
Description copied from interface: ClientAPI
Update the task state.

Examples:

        var taskID = "Tsk000000226232";
        var task   = Client.getTask(taskID);
        task.setTaskState(task.TASK_STATE_READY);
        Client.updateTaskState(task);
        

Specified by:
updateTaskState in interface ClientAPI
Parameters:
t - the given Task
Returns:
true for success. false for unsuccess.
See Also:
Task

updateUnitType

public boolean updateUnitType(UnitType unit)
Description copied from interface: ClientAPI
Update the specified unit type

Specified by:
updateUnitType in interface ClientAPI
Parameters:
unit - the given UnitType
Returns:
true if successful, otherwise false
See Also:
UnitType

waitTask

public void waitTask(java.lang.String tskID)
Description copied from interface: ClientAPI
For task schedule and flow control, set the task waiting

Examples:

        Client.waitTask("TskXXXXXX");
        

Specified by:
waitTask in interface ClientAPI
Parameters:
tskID - the task id

waitTask

public void waitTask(java.lang.String tskID,
                     java.lang.String timeString)
Description copied from interface: ClientAPI
For task schedule and flow control, set the task waiting

Examples:

        Client.waitTask("TskXXXXXX","2001/12/10/14/12");
        

Specified by:
waitTask in interface ClientAPI
Parameters:
tskID - the task id
timeString - the time to notify the task

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.