23 Replies Latest reply on Feb 18, 2011 1:46 AM by vu.tuan.anh

    Resource is not visible in workbench Aplication View

    Mrsunilg Level 1

      Hi,

       

      When i write any file into the repository from Java API or Dotnet services using writeResource(), then I am not able to see this resource from Application View in Work bench.

       

      Though i am able to read the resource using API but not able to open it from Work bench.

       

      Can any one tell me why this is happening???

       

       

      Regards

      Sunil

        • 1. Re: Resource is not visible in workbench Aplication View
          Jasmin Charbonneau Level 4

          The Application view is not a view to the repository.The content from the different applications are stored in the repository, but you can have other items in the repository that don't belong to an application and they won't show up.

           

          What you can try is to use the Ressource view instead of the Application view. This way you'll see the ressouces that don't belong to an application and perhaps you'll see your items.

           

          Jasmin

          • 2. Re: Resource is not visible in workbench Aplication View
            Mrsunilg Level 1

            Jasmin,

             

            So Can i modify and same the file which is not visible in Application View, but visible in resource View.

             

            Right now when i write any file in above application folder, i am able to see it but not able to open the file.

            It shows message (screen shot)resourceView.JPG

             

             

             

             

            Actually i want to open and edit a file in workbench if i write any file in to repository using API.

             

            Regards

            Sunil

            • 3. Re: Resource is not visible in workbench Aplication View
              Mrsunilg Level 1

              And I want to version it after editing

              the file

              Like we do checkin check out

              • 4. Re: Resource is not visible in workbench Aplication View
                Jasmin Charbonneau Level 4

                You'll only be able to modify files that are under the Application folder in the repository using Workbench. The main Application folder in the repository is kind of Workbench's space.

                 

                If you have a file outside of that Application folder, it'll show up in the Resource view.If you want to modify it, you'll have to import it in an application. You can right-click on an application in the Application view and select Import/Resource and select the file you want to import.

                 

                Once the file is imported in an application, you'll be able to modify it using Workbench (but you're going to modify the version of that file that's now under the Application folder and not the original one).

                 

                I hope this is not too confusing.

                 

                Jasmin

                • 5. Re: Resource is not visible in workbench Aplication View
                  Mrsunilg Level 1

                  Jasmin,

                  that is fine if i import it Application view.

                  I am able to edit it if i import it to application view.

                   

                  And i also learned that editing of a file will happen only in Application view. But I want to view and open a file which is written in Application folder.

                  Why I am not able to see any file if i write it to application  using Java API. I want to edit a file which is written in to resource using Java API.

                   

                  From the readresouce service i am able to read it. But on workbench it is not visible. If it is not visible then how can i update it.

                   

                   

                  Please reply...

                   

                   

                   

                   

                  Regards

                  Sunil

                  • 6. Re: Resource is not visible in workbench Aplication View
                    Mrsunilg Level 1

                    Basically, I am developing application in Using Java API to read a resource from one server and want to migrate it to another server.

                     

                    On another server, the content should be visible to User. User can modify using workbench.

                     

                    Please let me know if my question is not clear...:)

                    • 7. Re: Resource is not visible in workbench Aplication View
                      Jasmin Charbonneau Level 4

                      If you want to use Workbench to modify the files, then they will need to be saved under the Application folder, otherwise Workbench won't be able to modify them.

                       

                      Are you able to write files to the Application folder?

                       

                      Jasmin

                      • 8. Re: Resource is not visible in workbench Aplication View
                        Mrsunilg Level 1

                        Jasmin,

                         

                        Yes, i am able to write a resource under Application folder, but it is not visible.

                         

                        But when i test it using readresouce process, i am able to read it when i invoke it.

                         

                        I am also able to read it using repositoryClient.readResource()  Java API.

                         

                         

                         

                        Regards

                        Sunil

                        • 9. Re: Resource is not visible in workbench Aplication View
                          Mrsunilg Level 1

                          I just want to see it in tree structure and i want to be able to open it.

                           

                           

                          I am sure if i am able to see it in application folder on Application View tab, then I will be able to Modify it also. But i am not able to see it under Application foder in Application View tab.

                          • 10. Re: Resource is not visible in workbench Aplication View
                            Mrsunilg Level 1

                            even i am not able to fetch this file on my local system when i simply drag and drop the application folder,

                             

                            I am not able to see it when i check out in my default working folder also

                            • 11. Re: Resource is not visible in workbench Aplication View
                              Jasmin Charbonneau Level 4

                              Try to synchronize your application. Remember the application view shows you a local version of the files. If you add a file to the repository, you need to synchronize to get the latest version of the application's content from the server.

                               

                              Jasmin

                              • 12. Re: Resource is not visible in workbench Aplication View
                                Mrsunilg Level 1

                                Jasmin,

                                 

                                I have syncronize it but  it is not appearing.

                                 

                                 

                                Regards

                                Sunil

                                • 13. Re: Resource is not visible in workbench Aplication View
                                  Mrsunilg Level 1

                                  Even though the local copy is not appearing/downloading in default Working Folder.

                                   

                                  ~

                                  Sunil

                                  • 14. Re: Resource is not visible in workbench Aplication View
                                    Mrsunilg Level 1

                                    Jasmin,

                                     

                                    Can you please help me to get out of this issue. Please take other employees help if possible..its really very critical...

                                     

                                    thanks in advance

                                     

                                     

                                     

                                     

                                     

                                    Regards

                                    Sunil

                                    • 15. Re: Resource is not visible in workbench Aplication View
                                      Jasmin Charbonneau Level 4

                                      Can you try to add a  file that's not a form type? Maybe a jpeg or text file to see if this works. Those file types don't have any DCI associated with them, and I'm wondering if it has anything to do with that.

                                       

                                      Jasmin

                                      • 16. Re: Resource is not visible in workbench Aplication View
                                        Mrsunilg Level 1

                                        Jasmin,

                                         

                                        I did not try with jpeg file but i have tried with text file and this text file was visible.

                                         

                                        Tommorrow i will check with jpeg file but text file worked fine.

                                         

                                        what is the issue with xdp and pdf files???

                                         

                                         

                                         

                                        Regards

                                        Sunil

                                        • 17. Re: Resource is not visible in workbench Aplication View
                                          Jasmin Charbonneau Level 4

                                          I'm pretty sure it's because of the DCI. I you add and XDP in an application in Workbench and then copy it back to your desktop, you'll get two files. The XDP and a dci file. The dci file is created by workbench automatically when it adds the xdp to the repository. If you manually add the xdp through the repository interface, it probably doesn't create the associated dci file and that prevents it to be displayed properly in Workbench.

                                           

                                          Can you try to add a dci file along with you xdp to see if that works?

                                           

                                          Jasmin

                                          • 18. Re: Resource is not visible in workbench Aplication View
                                            Mrsunilg Level 1

                                            Jasmin,

                                             

                                            No it doesnot work.

                                             

                                            What i did..

                                            1. I read the file which was already visible and wrote it to another folder.

                                            2. then i read _dci file also and wrote in the same folder..

                                             

                                            but no achievement..

                                             

                                             

                                            regards

                                            Sunil

                                            • 19. Re: Resource is not visible in workbench Aplication View
                                              Mrsunilg Level 1

                                              Jasmin,

                                               

                                              I did a mistake there. Actually when i write any file either .txt or jpg file. Both the files are not appearing in Application View. When i syncronize it , even i dont find the files on my local system.

                                               

                                              Both txt and jpg files are there in the folder under Applications but there is no file _dci as it got created for pdf and xdp.

                                               

                                               

                                              Conclusion : When i write a file (txt,jpg,pdf and xdp) using java api, neither of it is visible in Application View tab. And _dci files are not automatically got created for txt and jpg file.

                                               

                                               

                                               

                                              Regards

                                              Sunil

                                              • 20. Re: Resource is not visible in workbench Aplication View
                                                Jasmin Charbonneau Level 4

                                                Ok,

                                                 

                                                One last thing. Are you putting it under Applications, but then also under a sub folder that corresponds to the application you want to use in Workbench?

                                                 

                                                If this doesn't work maybe we can try a different approach. What about if you export the assets you want in an LCA an import that LCA on another system. It'll put the files in the right spot. You can use the java API to export and import a lca.

                                                 

                                                Jasmin

                                                • 21. Re: Resource is not visible in workbench Aplication View
                                                  Mrsunilg Level 1

                                                  Jasmin,

                                                  I am putting writing file under Applications/ProcessApplication/1.0/Test Folder.

                                                   

                                                   

                                                   

                                                  Yes, I can use Import/Export, but the problem is that I can import an LCA but can not export it.

                                                  Means--- We have process to upload an LCA to the server but to create LCA import API doesnt works.

                                                   

                                                  I want to build an application which will migrate only updated file to the another server.

                                                  Struture on both server gonna be the same, but if i update any file on server1. Only those specific file should move to another server automatically.

                                                   

                                                  I can check this by comparing meta data of the files. If they are different then i can write or update the file on another server.

                                                   

                                                  So this is my requirement.

                                                   

                                                  If i use import export, then i need to create lca, which is manual process and difficult to search updated files in a batch file repository.

                                                  so i am avoiding this..

                                                   

                                                   

                                                   

                                                  Please suggest me.. or let me know if you need further clarification on what i wanna do..

                                                   

                                                   

                                                   

                                                  Regards

                                                  Sunil

                                                  • 22. Re: Resource is not visible in workbench Aplication View
                                                    dclynch_igh

                                                    It's been several months since you posted, so I'm not sure whether you still need this, However, I'm trying to do the same thing -- migrate only the new or changed forms between servers using the RepositoryService APIs, and I think I've found something that works.

                                                     

                                                    When I drag a resource into an application in ES2, the resource ends up with a ResourceProperty collection.  When I add a resource using the writeResource API call, however, this ResourceProperty collection is not created.  After some trial and error, I found that I could create a ResourceProperty collection when I create the Resource itself and then use the writeResource API call to add the resource to an application.

                                                     

                                                    The ResourceProperty that makes the resource visible is in the "System" namespace.  It's named "PRIMARY" and should have the value of

                                                    "true".

                                                     

                                                    I use the .NET APIs, not the Java APIs, but I think the concept would be the same.  In the code below, "ES2RepositoryService" is a web reference to the LC ES2 repository service and "OriginalBlob" is the Blob read in from the region from which I'm migrating.

                                                     

                                                     

                                                                Dim ES2LC As New ES2RepositoryService.RepositoryServiceService

                                                                ES2LC.Credentials = New System.Net.NetworkCredential(<logon>, <password>)

                                                              

                                                                Dim NewBLOB As New ES2RepositoryService.BLOB

                                                                NewBLOB.contentType = OriginalBLOB.contentType

                                                                NewBLOB.binaryData = OriginalBLOB.binaryData

                                                              

                                                                Dim NewContent As New ES2RepositoryService.ResourceContent

                                                                NewContent.dataDocument = NewBLOB

                                                                NewContent.size = NewBLOB.binaryData.Length

                                                     

                                                                Dim NewResource As New ES2RepositoryService.Resource

                                                                NewResource.id = New ES2RepositoryService.Id

                                                                NewResource.lid = New ES2RepositoryService.Lid

                                                                NewResource.content = NewContent

                                                                NewResource.name = <resource name>

                                                                NewResource.description = <resource description>

                                                     

                                                                'add properties

                                                                Dim testProps(0) As ES2RepositoryService.ResourceProperty

                                                                Dim newProp As ES2RepositoryService.ResourceProperty

                                                     

                                                                'this one makes it visible in Workbench

                                                                newProp = New ES2RepositoryService.ResourceProperty

                                                                newProp.name = "PRIMARY"

                                                                newProp.namespace = "System"

                                                                newProp.value = "true"

                                                     

                                                                testProps(0) = newProp

                                                              

                                                                NewResource.resourceProperties = testProps

                                                              

                                                                ES2LC.writeResource(<new resource path>, NewResource, Nothing, Nothing)

                                                     

                                                     

                                                    Setting this "PRIMARY" property seems to be the trick to making the resource visible under the application in Workbench.

                                                     

                                                    When I drag a resource in, many other resource properties are generated as well, and these can be added just as the "PRIMARY" property was.  In my case I saw the following in the resourceProperties collection:

                                                     

                                                    In the "System" namespace:

                                                    LASTUPDATEDBY                              - name of the last user who updated the resource

                                                    PRIMARY                                    - "true"

                                                    VISIBILITY                                 - this had the value of "Private"

                                                    PUBLISHEDSTATUS                            - this was valued as "InProgress"

                                                    RESOURCETYPE                               - this had the value of "TLO"

                                                    Deployment Version                         - Nothing

                                                    Deployment ID                              - Nothing

                                                     

                                                    In the "Custom" namespace:

                                                    extension                                  "xdp"

                                                    scope                                      "Far"

                                                    relative-path

                                                    absolute-path

                                                    application-name

                                                    isApplication                              "false"

                                                    version

                                                     

                                                    If the resource is an XDP that has a relationship to another file (an XSD, for example) another ResourceProperty is created where

                                                    the value is the path to the related file and the namespace is "Reference".

                                                    • 23. Re: Resource is not visible in workbench Aplication View
                                                      vu.tuan.anh Level 1

                                                      Hi dclynch_igh,

                                                       

                                                      I encountered the same problem and after following your solution, I was able to view the resources in the workbench.

                                                       

                                                      Thank you very much for your sharing,

                                                       

                                                      Regards,

                                                      Anh