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.
9 replies Latest Post - ‏2013-02-05T00:29:13Z by Nicoolas
CBS3_Ian_Wilson
CBS3_Ian_Wilson
41 Posts
ACCEPTED ANSWER

Pinned topic Displaying workflow folder attachments in ICN

‏2013-01-22T16:50:51Z |
Is anyone aware of ICN having problems dealing with Folder attachments in a workflow?

I can store documents fine. However, it's useful to present a User with a folder (e.g. a Case folder) and for that folder to contain various documents. So, I assign a folder as an attachment in my workflows.

However, when I open these work items up in ICN, then click on the Attachments tab, it fails to open the Folder correctly (see attached screenshot). I try clicking, double-clicking, Right-clicking, but I just see the message in the Content pane "Sorry, an error occurred".

Am I doing something wrong, or is this a bug that needs a PMR raising?
Updated on 2013-02-05T00:29:13Z at 2013-02-05T00:29:13Z by Nicoolas
  • Nicoolas
    Nicoolas
    21 Posts
    ACCEPTED ANSWER

    Re: Displaying workflow folder attachments in ICN

    ‏2013-01-22T17:46:34Z  in response to CBS3_Ian_Wilson
    It works for me. I attach a folder, click on it (can also right-click and select open), and the contents are displayed in the content list pane.
    See attached
  • CBS3_Ian_Wilson
    CBS3_Ian_Wilson
    41 Posts
    ACCEPTED ANSWER

    Re: Displaying workflow folder attachments in ICN

    ‏2013-01-22T20:07:53Z  in response to CBS3_Ian_Wilson
    Thanks Nicoolas, that's reassuring.

    How did you assign the Folder attachment though? Did you do it manually?

    I'm performing my folder attachment assignment through some workflow steps. The steps are:
    1) getObjFromPath, where path is a folder path (e.g. /Claims/CLM-123), type is folder. The return value is assigned to the attachment field.
    2) If getObjFromPath fails to return an attachment, it's assumed it doesn't yet exist, and then there is a step to createFolder. The return value is assigned to the attachment field.
    • Nicoolas
      Nicoolas
      21 Posts
      ACCEPTED ANSWER

      Re: Displaying workflow folder attachments in ICN

      ‏2013-01-22T20:56:15Z  in response to CBS3_Ian_Wilson
      Hi Ian, no problem.

      I attached the workflow by using the select object and searched for my folder. So it is done from the step processor UI.

      It seems you are using the API to add the attachment?
  • CBS3_Ian_Wilson
    CBS3_Ian_Wilson
    41 Posts
    ACCEPTED ANSWER

    Re: Displaying workflow folder attachments in ICN

    ‏2013-01-22T22:16:24Z  in response to CBS3_Ian_Wilson
    Hi,

    No, I'm not using the API, I'm assigning the folder attachments using steps developed in Process Designer.

    I've now managed to assign the folders manually in ICN, so the issue is clearly caused by the Workflow steps (through the CE_Operations component).

    Also, if I switch to using a WPXT step processor, the folder displays fine. Maybe an incompatibility between ICN step processor and CE_Operations::createFolder?
    • CBS3_Ian_Wilson
      CBS3_Ian_Wilson
      41 Posts
      ACCEPTED ANSWER

      Re: Displaying workflow folder attachments in ICN

      ‏2013-01-30T11:31:15Z  in response to CBS3_Ian_Wilson
      The problem seems to be caused by a JavaScript error in ecm.js.jgz.

      Clicking on the folder attachment reveals a message "Sorry an error occurred" in the Document details pane. I enabled the Web Console in FireFox, and at the point that this error occurs, I see in the browser console:

      TypeError: this._respository is null.showCheckoutForReservation dojo.js.jgz
      ...repository.getType() == "p8" && this._properties == ... ecm.js.jgz
      • Nicoolas
        Nicoolas
        21 Posts
        ACCEPTED ANSWER

        Re: Displaying workflow folder attachments in ICN

        ‏2013-01-31T20:58:47Z  in response to CBS3_Ian_Wilson
        Not sure if that helps. According to dev:
        The attachment values are tokenized strings with the object type, library type, library name (really object store name) and id or version. If this tokenized string is formulated correctly, it should open in Navigator too...

        What I could do is try to reproduce your issue and write a defect. Can you send the workflow definition?
        • CBS3_Ian_Wilson
          CBS3_Ian_Wilson
          41 Posts
          ACCEPTED ANSWER

          Re: Displaying workflow folder attachments in ICN

          ‏2013-02-04T22:19:26Z  in response to Nicoolas
          Nicoolas,

          As you say, an attachment is simply stored internally as a tokenized string.

          Good idea. I've just created a copy of the workflow, but this time one that doesn't create the folder. Instead, I did this manually in the ICN step processor.

          So now, I compared the tokenized attachment strings for both scenarios:

          MyTest1||2|3|OS02_PoC|{B4F14F93-AEC1-426E-9F03-CED1433176DB} - this fails

          MyTest1||2|3|OS02_POC|{B4F14F93-AEC1-426E-9F03-CED1433176DB} - this succeeds

          I was just about to write that these are identical.... but just noticed the ObjectStore names are different in case. Maybe this is the cause... I shall investigate.
          • CBS3_Ian_Wilson
            CBS3_Ian_Wilson
            41 Posts
            ACCEPTED ANSWER

            Re: Displaying workflow folder attachments in ICN

            ‏2013-02-04T22:46:52Z  in response to CBS3_Ian_Wilson
            OK, I think I've now found the cause of this problem, and a workaround.

            In the object store I'm using:
            Label Name = "OS02_PoC"
            Symbolic Name = "OS02_POC"

            In the above post, there is a difference in the object store name embedded inside the attachment token. I checked my workflow definition, and found that I'd used the correct symbolic name. But the call to createFolder in CE_Operations is returning an Attachment token containing the Object store label name.

            So, I renamed the label name of my Object store to "OS02_POC".... and this fixed the problem!!

            So... this means that there is a defect in the createFolder method in CE_Operations. It should be returning the Object store symbolic name inside the attachment token. Strangely enough, WPXT step processors handle this situation, but the ICN step processor fails (correctly in my view).