Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
28 replies Latest Post - ‏2013-06-11T22:34:58Z by AndrewPaier
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic Images not displying in coach through the Process Portal

‏2012-01-15T20:08:38Z |
Hi everyone:

Working with BPM 7.5 in the part of the process designer, I have an issue, that doesn't allow me to see the images.
Only a rectangle with a red cross appears.

I have loaded the JPG images as Web Files in my project, calling them like this:


<img id=
"logo" src=
"<#=tw.system.model.findManagedFileByPath(" logo.jpg
", TWManagedFile.Types.Web).url#>" border=0>


If I test the coach inside the Process Designer, everything goes ok.
But if I start the process in the Process Portal, then the image won't show.

Hope someone could help me with this problem

Thanks in advance.

Regards.
Updated on 2013-03-03T07:19:29Z at 2013-03-03T07:19:29Z by SystemAdmin
  • kolban
    kolban
    3315 Posts
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2012-01-16T15:23:03Z  in response to SystemAdmin
    Zerav,
    Can you confirm that the code you described is HTML you coded inside a "Custom HTML" component inside a Coach inside a Human Service? You didn't say and I wanted to be sure.

    Can you also validate the code you pasted is the exact code you entered in Process Designer? If it is, I am thinking there are some code problems with this fragment. Looks like the quotes types may need to be mixed (double and single quotes used in quote nesting).

    Neil
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2012-01-18T01:18:53Z  in response to kolban
      Hi:

      Thanks for your answers.

      Neil, this is part of a Custom HTML block, and I'm using just double quotes. What can I do to correct this?
      Ritesh, unfortunately, that didn't solve the problem =( The white rectangle with the red cross still appears
      instead of the image.
      Anthony, funny thing is that my code has no spaces, but the code tag in the forum just added that blank space
      before the name of the image.
      Strange that it works fine in Process Designer, but in the Process Portal logging in with a user of that very flow
      I'm having this inconvenient.
      And if I checked the generated HTML code and paste the image URL on some other tab, it asks me to login,
      I use the admin user, then I'm able to see the image.
      Hoping this have a solution.

      Regards.
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2012-01-18T01:19:48Z  in response to kolban
      Hi:

      Thanks for your answers.

      Neil, this is part of a Custom HTML block, and I'm using just double quotes. What can I do to correct this?
      Ritesh, unfortunately, that didn't solve the problem =( The white rectangle with the red cross still appears
      instead of the image.
      Anthony, funny thing is that my code has no spaces, but the code tag in the forum just added that blank space
      before the name of the image.
      Strange that it works fine in Process Designer, but in the Process Portal logging in with a user of that very flow
      I'm having this inconvenient.
      And if I checked the generated HTML code and paste the image URL on some other tab, it asks me to login,
      I use the admin user, then I'm able to see the image.
      Hoping this have a solution.

      Regards.
  • ritedas
    ritedas
    95 Posts
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2012-01-17T07:27:10Z  in response to SystemAdmin
    Correct Code should be like this:
    />
    Logo image you can display on coach with 'Image' control also.

    Thanks.
  • AnthonyBpm
    AnthonyBpm
    390 Posts
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2012-01-17T17:02:27Z  in response to SystemAdmin
    It looks as though you have a space in the front of your image name.

    You have " logo.jpg"

    My guess is that it should be "logo.jpg"?

    Be sure that the file name parameter in the findManageFileByPath call matches the file name as it appears in your proces application/toolkits "Files" list.

    -Anthony
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2012-01-18T01:21:01Z  in response to AnthonyBpm
      Hi:

      Thanks for your answers.

      Neil, this is part of a Custom HTML block, and I'm using just double quotes. What can I do to correct this?
      Ritesh, unfortunately, that didn't solve the problem =( The white rectangle with the red cross still appears
      instead of the image.
      Anthony, funny thing is that my code has no spaces, but the code tag in the forum just added that blank space
      before the name of the image.
      Strange that it works fine in Process Designer, but in the Process Portal logging in with a user of that very flow
      I'm having this inconvenient.
      And if I checked the generated HTML code and paste the image URL on some other tab, it asks me to login,
      I use the admin user, then I'm able to see the image.
      Hoping this have a solution.

      Regards.
      • ritedas
        ritedas
        95 Posts
        ACCEPTED ANSWER

        Re: Images not displying in coach through the Process Portal

        ‏2012-01-18T05:02:49Z  in response to SystemAdmin
        Have you tried with Image control?
      • ritedas
        ritedas
        95 Posts
        ACCEPTED ANSWER

        Re: Images not displying in coach through the Process Portal

        ‏2012-01-18T10:33:06Z  in response to SystemAdmin
        Hi, could you please check how many records are there in 'LSW_MANAGED_ASSET' table with name="logo.jpg".
        • SystemAdmin
          SystemAdmin
          7615 Posts
          ACCEPTED ANSWER

          Re: Images not displying in coach through the Process Portal

          ‏2012-01-18T14:03:51Z  in response to ritedas
          Ritesh:

          I'm using the image on a CustomHTML block instead of the Image control because I'm trying to emulate tabs as I had
          some details with the content (serialize - deserialize) using dojo, and having short time to experiment, I decided
          to use a custom html block.

          As I mentioned, it is weird why the admin is able to see the image but any other user can't =(
          Maybe do I need to grant any kind of permissions to my other users?

          Let me check the table as I don't have direct access to it.

          Thanks.
          • AnthonyBpm
            AnthonyBpm
            390 Posts
            ACCEPTED ANSWER

            Re: Images not displying in coach through the Process Portal

            ‏2012-01-18T20:16:33Z  in response to SystemAdmin
            I still haven't seen a correct posting of the html + code you are using in the custom HTML block. The screen shot a few posts does not include proper quotes around the src attribute value.

            It should look like this:
            
            <img src=
            "<#=tw.system.model.findManagedFileByPath('filename.ext',TWManagedFile.Types.web).url#>"></img>
            


            I typed that in manually, but the gist is that you need to be aware of the manner in which quotes are used and their context.

            'filename.ext' must exist in your list of managed files for your process application/toolkit.

            Once you're sure you have the correct code, do you have Firebug or IE developer tools to inspect your rendered coach to see how the tag is being constructed? That would help also, if you're still running into issues.

            hth
            • SystemAdmin
              SystemAdmin
              7615 Posts
              ACCEPTED ANSWER

              Re: Images not displying in coach through the Process Portal

              ‏2012-01-19T13:50:09Z  in response to AnthonyBpm
              Hi Anthony:

              The URL is constructed correctly, and admin user is able to see the image with the URL, but a mortal one just can't.

              I don't know if I need permission on the rest of my users.

              Regards
              • AnthonyBpm
                AnthonyBpm
                390 Posts
                ACCEPTED ANSWER

                Re: Images not displying in coach through the Process Portal

                ‏2012-01-19T14:26:25Z  in response to SystemAdmin
                Just making sure, I only have what you post to go on :).

                How are they accessing this image:
                1. Is it a service that a mere mortal user has access to because it is exposed?
                2. Is it a task that is assigned to the user?
                3. Something else?

                -Anthony
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Images not displying in coach through the Process Portal

                  ‏2012-01-19T22:48:15Z  in response to AnthonyBpm
                  Hi:

                  1. Yes, it is a human service, and has the associated role in the upper activity. It is exposed to start this activity
                  to the role of the user that is accesing this activity.
                  2. Yes, the task is assigned to the user.
                  3. Nope, hope I'm not missing something.

                  Thanks and Regards.
                  • SystemAdmin
                    SystemAdmin
                    7615 Posts
                    ACCEPTED ANSWER

                    Re: Images not displying in coach through the Process Portal

                    ‏2012-01-23T15:51:09Z  in response to SystemAdmin
                    I log into the portal with a user, and the images are not shown.
                    Then, I go to the source code, copy-paste the image URL in a new tab, then the Process Portal asks me
                    to sign in again; enter the same user login information, and then, the images appear correctly.

                    I can't still figure out what is wrong with the Process Portal, that I need to log in twice in order to
                    see the images of my project.

                    Regards
                    • AnthonyBpm
                      AnthonyBpm
                      390 Posts
                      ACCEPTED ANSWER

                      Re: Images not displying in coach through the Process Portal

                      ‏2012-01-24T04:19:51Z  in response to SystemAdmin
                      Hey Zerav:

                      At this point, it is really tough to troubleshoot what is going on. This is a scenario where it works for everyone else, except for you. Not having any screen shots, logs, exact code with coach designer layout makes it that much more difficult.

                      I would start with a blank canvas at this point and confirm that you can get that to work.

                      1. Upload a new web image, test.jpg or similar
                      2. Create a new human service
                      3. Add a single 'coach' to the service
                      4. In addition to the default components, add a custom HTML component.
                      5. Inside the custom HTML component, simply add the server-side script to include the image from #1
                      6. Run the service from the process designer play button, confirm it works.
                      7. From there, expose the service temporarily so you can call it from the portal, confirm it works.

                      If your 'blank canvas' runs as you'd expect, then there is something suspect about how you are either:
                      1. including your image in the custom HTML block that started this thread
                      2. the image itself
                      3. how you are calling the human service

                      hth
                      • SystemAdmin
                        SystemAdmin
                        7615 Posts
                        ACCEPTED ANSWER

                        Re: Images not displying in coach through the Process Portal

                        ‏2012-01-26T13:56:44Z  in response to AnthonyBpm
                        Well, I guess this is what happens when you use an expensive defective tool that is not working properly.

                        I've been doing several tests, and the code is correct. I'll raise a PMR expecting this to be solved on 2 months.

                        Regards
                        • Laura.Doherty
                          Laura.Doherty
                          2 Posts
                          ACCEPTED ANSWER

                          Re: Images not displying in coach through the Process Portal

                          ‏2012-05-02T10:37:01Z  in response to SystemAdmin
                          Hi

                          Did you ever get this resolved? I experienced a similar issue recently - however, on opening the task in Chrome, the image was downloaded (this did mean that you had to start the task twice to actually see the task details) but opening any further coaches opened did display the image. This is obviously not something that would be suitable for our end users, so if an actual fix exists I would be interested in the details of this.

                          Thanks

                          laura
                        • vedoonam
                          vedoonam
                          8 Posts
                          ACCEPTED ANSWER

                          Re: Images not displying in coach through the Process Portal

                          ‏2012-10-09T07:26:41Z  in response to SystemAdmin
                          Zerav,

                          Did you get any resolution for this?

                          Regards
                          • edling
                            edling
                            256 Posts
                            ACCEPTED ANSWER

                            Re: Images not displying in coach through the Process Portal

                            ‏2012-10-09T08:02:49Z  in response to vedoonam
                            Like someone else wrote: Check the resulting image URL in your web browser (right-click image icon etc) and verify it is the same server as listed in you browser navigation bar. We had problems where one was a http and another https or the port was different or whatever. Using a custom URL like myapplication.mycompany.com also messed things up. Now we have configured things correctly (or rather my sysadmin has).
  • C9NX_Paulo_Bastos
    C9NX_Paulo_Bastos
    1 Post
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2012-05-22T12:49:15Z  in response to SystemAdmin
    Hi Zerav,

    I have the same problem.
    Did you found a solution?

    Regards.
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2012-05-30T14:21:16Z  in response to C9NX_Paulo_Bastos
      I had a similar issue with images in my coaches. I noticed that image is loaded using the fully qualified hostname. If you log in to process portal using something other than the fully qualified name, it didnt resolve the image for me (I assume it was due to a session issue). When I log into the process portal using the fqn it worked fine.
  • whatswrong
    whatswrong
    15 Posts
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2013-02-28T20:20:07Z  in response to SystemAdmin
    Hi Zerav

    Did you get this resolved. I have the same issue in BPM 8.0
    Image shows up fine when I run my coach thru process designer but NOT when I run thru portal.

    Thanks
    • mjanzen
      mjanzen
      1 Post
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2013-06-11T20:01:15Z  in response to whatswrong

      I had the exact same issue with BPM 8.0. I was able to "workaround" this by pasting the URL for the image into another browser window and "signing on" to view the image. After that the Process Portal displayed the image properly.

       

      What is very strange is that I signed out of the Portal closed the browser, restarted the browser, re-logged on and the image continued to display correctly in the Process Portal.

       

       

    • AndrewPaier
      AndrewPaier
      711 Posts
      ACCEPTED ANSWER

      Re: Images not displying in coach through the Process Portal

      ‏2013-06-11T22:34:58Z  in response to whatswrong

      The post above is likely your clue.  If you are logging into say https://myserver:9443/portal and if "my server" will resolve to the right machine for you you are logged in okay.  However if the URL of the image is https://myserver.mydomain.com:9443/images/some_image.png then it may not render since the browser doesn't have a "valid" cookie for that server.  The right answer is to use the correct portal URL for login.  Although I'm guessing here, since I've not seen this problem.

      Andrew Paier  |  Director  |  BP3 Global, Inc.
      BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

  • SystemAdmin
    SystemAdmin
    7615 Posts
    ACCEPTED ANSWER

    Re: Images not displying in coach through the Process Portal

    ‏2013-03-03T07:19:29Z  in response to SystemAdmin
    Hi,

    I tried this out in BPM v8.0.1 and it just works fine for me. Both from the Process Designer and the Portal.
    
    <img id=
    "pieLogo"></img> <script> require([
    'dojo/ready'],function(ready)
    { ready(function()
    { dojo.byId(
    'pieLogo').src = com_ibm_bpm_coach.getManagedAssetUrl(
    'pie.PNG', com_ibm_bpm_coach.assetType_WEB, 
    'VCC', 
    
    false); 
    }) 
    }) </script>
    


    Thanks,
    Vivekananth.T