My project is to help company change the UI of existing Domino application to use Flex.
So the first thing i do is to change the output of Domino Agent to XML format like the following:
(.......)
Dim DocURL As String
DocURL =server +"/"+ Replace(AttachmentDB(0),"\","/")+"/0/"+AttachmentUNID(0)+"/$file/"+AttachmentName(0)
Dim xmlstr As String
xmlstr = "<docimage><url>" +DocURL+ "</url></docimage>"
Print "Content-Type:application/xml"
Print xmlStr
(........)
And the output part is converted successfully to XML format and Flex can read it and display it normally with no problem.
Now the second thing to do is to convert the input part. The old system’s input part is using “Form” to handle and after user input all the parameters, they click send and the domino Form help to do all backend stuff and return the result back to client in the $$return section like following:
drafturl:="/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/0/"+@Text(@DocumentUniqueID)+"?editdocument";
sourl:="/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/agentSendToSOTest?openagent&unid="+@Text(@DocumentUniqueID) +"&username="+@Name([CN];@UserName);
filingurl:="/"+@ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")+"/agentFilingDocumentTest?openagent&unid="+@Text(@DocumentUniqueID);
url:=@If(action="0";drafturl;action="1";sourl;filingurl);
@If(action="0";+ "<url>"+drafturl+"</url>";action="1";"<url>"+url+"</url>";action="2";"<url>"+filingurl+"</url>";"")
To convert it using Flex, I use Flex to build the exactly same form with same parameter name, but I still have to found out where should the form post to, finally, I’ve found the path in the Domino Form’s HTML source:
After the input part and output part’s technically done, the last thing is to combined them, just like when user filling Form, there’ s already some default variables send to users from domino, in the old system, those parameters are easily to display as hidden variable in Domino Form like:
Where the ParentUNID can get by the lotusScript in Domino Designer’s Form:
Paramstr := “ParentUNID”;
RightStr := @RightBack(Query_String_Decoded;“&”+Paramstr+“=”);
getParam := @If(@Contains(RightStr;“&”);@Left(RightStr;“&”);RightStr);
@If(getparam=“”;“no”;getparam)
But for Flex, I’ve to write extra Agent and send those preset parameters to Flex’s Form when user click on those Form button and initialize it.
Everything seems very smooth and without any problem in the testing machine, but when I move the application to Production Server and around 100 users are using it, there comes the problem.
They use the application during office hour and at first, everything is smooth and fast, but after using 3 - 4 hours, they whole system become extreme slow, for example, at beginning, calling an agent only need one second for getting the response, but after some hours, calling the same agent need 40 seconds and more to get the response, I’ve checked the production server’s CPU and RAM usage and both are low. As I only use back the old Domino DB and only added some agent, I really have no idea why it come to so slow after using Flex for input and output the data.
And after office hour and staff back home, everything is fast again, the previous agent back to 1 second to give the response.
Done anyone have any ideas on why it happen? I can tell you everything about the system setting if needed.