Launch form using ECL Session?
I am writing a .Net client which displays the list of blank forms available to the user and then allows the user to launch the chosen form in Metastorm. I am successfully using ECL to create a session and retrieve the list of forms, and then generating the correct URL to launch the form. It all works, but the first form to be launched requires the user to log in (non-SSO) or exhibits the delay associated with starting a session (SSO). Is there any way the launched form can use the session I have already created for getting the forrms list?
Comments
-
Hi Andrew,
If you are using the ECL.WS to get the initial list, then there should be a SessionId property available off the ServiceSessionState object that you used to get the list. The same property is also available if using the managed DLLs. When assembling the BPM URLs, you can optionally add that SessionId property as another query string parameter ie...
http://Server/Directory/eForm.aspx?Map=MapName&Client=External&SN=MySessionID
I haven't tested this in a while, but the direct BPM URL should now use that SessionID for its session. See Section 5 of the Web Client Configuration Guide.
0 -
Tony,
Thanks for the reply, and I see the bit about the URL, but I'm not sure where ServiceSessionState is.
I'm logging in with:
private IMetastormOperation _oSession;
public V9Session(string sServiceConfig, string sServiceName, string sLoginName, string sClientType, stringsUseSAP)
{
_oSession = new MetastormOperation();
FormField[] oLoginData = newFormField[] { };
_oSession.Login(sLoginName, "");
if (!_oSession.IsAuthenticated)
...
and later I get the list with:
oList = _oSession.GetList(ListContentsType.Todo, null, "eFolderName", "", -1, -1);
Am I missing something?
Regards,
Andrew
0 -
On further investigation, it looks like the MetastormOperation (using the .Net DLLs) does not currently expose the SessionId to you. There is an enhancement request already filed under DEF18916.
The ECL.WS, however, DOES expose this in the ServiceSessionState. Since the .Net DLLs use the ECL.WS, it shouldn't be much trouble to refactor your code to be a purely services oriented application (remove the DLL references, but add a service reference to the hosted ECL.WS). Here is some code on Form1 that gets that SessionId using the ECL.WS.
private ServiceSessionState eclServiceSession = new ServiceSessionState(); private ServiceClient eclWS = new ServiceClient(); private void button1_Click(object sender, EventArgs e) { try { FormField[] loginData = new FormField[] { new TextField() { Name = "username", Value = textBox1.Text.Trim(), Culture = CultureInfo.InvariantCulture.ToString() }, new TextField() { Name = "password", Value = PasswordEncrypt(textBox2.Text.Trim()), Culture = CultureInfo.InvariantCulture.ToString() } }; eclServiceSession = eclWS.Login("WEB;", 0, "", loginData); if (eclWS.IsLoggedIn(eclServiceSession)) { MessageBox.Show(eclServiceSession.SessionID); } else { MessageBox.Show("Cannot log you in."); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
0 -
Thanks, Tony. I've actually decided to go back to using the V7 legacy DLLs for V9. It's a lot less work than using the web service directly. I'll go back to the new V9 DLLs if and when the "enhancement" gets done.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories