Converting C#-examples To Abl-code

Hi everybody,

OE11.6 – Win8

Sorry for the long post, but I try to give as many information as I can.

I try to access the DocuWare Platform Services and have some C#-examples, which I try to transform to Progress ABL.
I know that no one out there is familiar with this Docuware-Library, but I have absolutely no C#-experience either, so the problems I encounter might be no problems at all for C#-guys.


Some background-information about Docuware and what I try to do:

I connect to Docuware, this connection provides one or more “organizations” and every “organization” provides one or more “filecabinets”.


What I already achieved:
  • I managed to connect to DocuWare
  • The ServiceConnection-Class has a property called “Organizations”, which gets all the available organisations.
  • I already managed to retrieve the “active” organisation with the following code:
DEF VAR org AS CLASS Docuware.Platform.ServerClient.Organization NO-UNDO.
assign org = cast(sc:Organizations:GetValue(0), DocuWare.Platform.ServerClient.Organization) .


so the next step would be to access the FileCabinets of this organization:

…and here I’m stuck !


The Organization-Class does not have a property “FileCabinets”, the only fitting property I can find is “FileCabinetsRelationLink”, which returns the uri of the link for the relation “filecabinets” (according to the documentation).

I have no clue at all what I’m supposed to do with this string !


On the other hand: the Organization-Class has a method called “GetFileCabinetsFromFilecabinetsRelation”, which should return the FileCabinets (maybe an array ?)


Here is what the documentation says about this method:

Calls the HTTP Get method on the link for the relation “filecabinets”.

Namespace: DocuWare.Platform.ServerClient
Assembly: DocuWare.Platform.ServerClient (in DocuWare.Platform.ServerClient.dll) Version: Version 6.10

C#-Syntax:
public FileCabinets GetFileCabinetsFromFilecabinetsRelation()
Return Value
Type: FileCabinets
The content of the response.




So I tried many different ways to “use” this method, with no luck at all.

DEF VAR fc AS CLASS Docuware.Platform.ServerClient.FileCabinet NO-UNDO.

fc = cast ( org:GetFileCabinetsFromFilecabinetsRelation():GetValue (0), DocuWare.Platform.ServerClient.FileCabinet) .

….which I thought might be similar like I retrieved the organisations in the previous step, gives error “element “GetValue” could not be found in class “Docuware.Platform.ServerClient.FileCabinet (12927)”


My next try was:

fc = org:GetFileCabinetsFromFilecabinetsRelation.

….which gives error “class method has been referenced as though it where a variable (12929)”. The error-explanation suggests to add “()”


So I added parentheses:

fc = org:GetFileCabinetsFromFilecabinetsRelation().

….the result was error “incompatible data-types… (223)”



My last tries were:

fc = org:GetFileCabinetsFromFilecabinetsRelation():FileCabinets.
fc = org:GetFileCabinetsFromFilecabinetsRelation:FileCabinets.

….which of course produced only errors.


so even if nobody is familiar with the Docuware-Library, maybe somebody could point out what i'm doing wrong.
Any answers extremely appreciated !

Wolf
 

RealHeavyDude

Well-Known Member
Does something like this work?

Code:
define variable fileCabinets  as class System.Array  no-undo.
define variable fileCabinet  as class Docuware.Platform.ServerClient.FileCabinet  no-undo.
define variable cabinetNo  as integer  no-undo.

assign fileCabinets  = org:GetFileCabinetsFromFilecabinetsRelation().

do cabinetNo = 1 to fileCabinets:length:
  assign fileCabinet  =  cast ( fileCabinets:GetValue ( cabinetNo - 1 ), Docuware.Platform.ServerClient.FileCabinet  ). /* .NET starts with zero */


end.

Explanation: You will get an array and must loop through them to get a hand on the single array elements ...

Heavy Regards, RealHeavyDude.
P.S. - Greetings to my old homeland ...
 

RealHeavyDude

Well-Known Member
Okay - so FileCabinets is not an array. Do you know which type it is?

Do you have any documentation on that class?

Heavy Regards, RealHeavyDude.
 

RealHeavyDude

Well-Known Member
Never had anything to do with Docuware ...

Just guessing: This FileCabinets is a pointer ( URL ) to where, whatever it is that it is pointing, can be downloaded / fetched. I guess there must be some other object / method you can use for the download.
 
the "Organisation"-class has a property called "FileCabinetsRelationLink", which in my case returns "/DocuWare/Platform/FileCabinets?orgid=464".
This takes me to the website, where I can access my documents online. No use at all.

I know you can only guess and I really appreciate all your efforts, but your guesses are for sure much better than mine, so: one last try:

The method "Organization.GetFileCabinetsFromFilecabinetsRelation" is described as "Calls the HTTP Get method on the link for the relation “filecabinets”."

how the hell could something like this be implemented in ABL ? In some other examples "GetValue" was used. Could this maybe be used in any way ?
 
Top