C
cverbiest
Guest
You can use the api sample from our code, I stipped most irrelevant parts if not valid-handle(WZ-RTBAPI-HND) then do: IF NOT VALID-HANDLE(WZ-RTBAPI-HND) THEN run rtb/p/rtb_api.p PERSISTENT SET WZ-RTBAPI-HND. end. &scoped-define testfile _rtb.p def var wz-rtb-path as char no-undo form "x(60)". file-info:file-name = "{&testfile}". wz-rtb-path = substring(file-info:full-pathname, 1, length(file-info:full-pathname) - length("{&testfile}") - 1). if wz-rtb-path = ? then do: message "CCE Roundtable intergration not found (wz-rtb-path)". return. end. IF VALID-HANDLE(WZ-RTBAPI-HND) then do transaction: L-ORGPATH = propath. run login IN WZ-RTBAPI-HND ("username","password",OUTPUT sessionID,OUTPUT WZ-RTB-Error). run set_paths IN WZ-RTBAPI-HND (WZ-RTB-PATH,PROPATH,OUTPUT WZ-RTB-Error). run set_session_id IN WZ-RTBAPI-HND (INPUT sessionID). run set_workspace_id IN WZ-RTBAPI-HND (WZ-wspace-id). run add_task in WZ-RTBAPI-HND (WZ-WSPACE-ID /* Pwspace - workspace to create task in (blank means current wspace) */ , WZ-WK-CODE /* Puser - user id of task */ , WZ-MN-CODE /* Pmanager - manager of task*/ , subst('&1', "description" ) /* Psummary - task summary */ , subst("Modification request&1", WZ-MODIF-REQUEST-ID) /* Puser-ref - user reference*/ , "" /* Pdesc - task description */ , "Central" /* Pshare - share status (Central, Task, Group, Public)*/ , "" /* Ptask-dir - task directory */ , output WZ-RECID /* Precid - recid of task record */ , output WZ-RTB-ERROR /* Perror - error message returned */ ). run logout IN WZ-RTBAPI-HND (sessionID,OUTPUT l-RTB-ERROR2). delete procedure WZ-RTBAPI-HND. propath = L-ORGPATH. if WZ-RTB-ERROR = "" then /* success */ . else /* failure */ .
Continue reading...
Continue reading...