3 Replies Latest reply on Jun 25, 2007 9:42 AM by Jasmin Charbonneau

    Setting intital data in Workspace embedded Flex Application

      I created 2 processes, one has an embedded Flex application in it. My first process has an output of type XML that is passed to the 2nd process using events. I have attached an Event Message Template to the Event so i can drill down into the data schema. I am able to receive and see the XML data in the receiving process. My Flex application is set to data type Form and has its own schema associated. What I am trying to do using the SetValue service is set some of the values in the Flex schema to the values of the XML data received from the first process.
      My Flex application has an "initialDataHandler" function that receives a DataEvent event from LC Workspace. Using the SetValue service and drilling down into the schema doesn't seem to set the DataEvent event data of the Flex App.
      Does anybody have any ideas on how to set the initial data of the Flex App so the data will be pre-populated when a user opens up the application?

      Thanks,
        • 1. Re: Setting intital data in Workspace embedded Flex Application
          Level 1
          can you send me your process?
          mergeandfuse@gmail.com
          • 2. Re: Setting intital data in Workspace embedded Flex Application
            Level 1
            Mike,

            On your variable of type Form that contains the SWF file, there is a default Render service that is responsible to render the SWF file. By default, this service point to the readRessource operation which simply reads the SWF from the repository.

            What you can do is build you own render process that reads the ressource from the repository (readRessource) and use a SetValue to set the XML. You would have to create an IN variable to pass the xml.

            That way the form would be sent to the user already populated.

            Jasmin
            • 3. Re: Setting intital data in Workspace embedded Flex Application
              Jasmin Charbonneau Level 4
              Mike,
              I double checked with engineering and this cannot be done. I though that creating a custom render service would work, but it wont since it has to return a document variable and we can only change the data of a swf when its in a Form variable. And there is no way to go from Form to document variable because one contains the content and the other one is only a pointer.

              You can define default data on the variable settings under Default Data, but this data is essentially hard coded, which is not ideal.

              Youre only option at this point is to populate from the formInitData event in the swf form which can call a database or a web service.

              Engineering will make that Default Data a variable in a next release of the product which should get you across this problem but nothing to help us now.

              Sorry for the confusion.

              Jasmin