Topic
5 replies Latest Post - ‏2012-03-12T09:24:08Z by StenlundRikard
StenlundRikard
StenlundRikard
4 Posts
ACCEPTED ANSWER

Pinned topic Send close work item

‏2012-03-05T17:46:06Z |
Hi,

I've built a custom "Step completion"-widget since the one included in the ECM suite did not suffice. I have a question regarding the "Send close work item"-event. How can I force the IBM widgets to clear their state as they do when Step processor sends close work item? The documentation states this event is for internal use only, and I have tried catching the event and broadcasting it myself (and also via firebug) but it seems something is going on under the hood. Anyone have any idea of how I can resolve this issue?

Thanks

/Rikard
Updated on 2012-03-12T09:24:08Z at 2012-03-12T09:24:08Z by StenlundRikard
  • drdamour
    drdamour
    23 Posts
    ACCEPTED ANSWER

    Re: Send close work item

    ‏2012-03-05T21:44:06Z  in response to StenlundRikard
    What version of ICM?


    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?

    Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
    • StenlundRikard
      StenlundRikard
      4 Posts
      ACCEPTED ANSWER

      Re: Send close work item

      ‏2012-03-06T08:17:22Z  in response to drdamour
      Hi,

      It's ECM widgets. version 4.5.2.1

      /Rikard
      • StenlundRikard
        StenlundRikard
        4 Posts
        ACCEPTED ANSWER

        Re: Send close work item

        ‏2012-03-06T09:45:23Z  in response to StenlundRikard
        Noticed the following code in init.js
        _sendCloseWorkItem:function()
        {
        return this.iScope.iEvents.fireIterableDeferredsIEvent("Send Close Work Item","CloseWorkItem").addCallbacks(dojo.hitch(this,function(_c61){
        return this.viewModeContentPane.model;
        }
        ),dojo.hitch(this,function(err){return err;}));
        }
        It seems like this is an internal event since its not located in the eventService using synchronous callbacks to validate the data from the different widgets to determine whether or not a change has been made.

        Might be hard to make this work.
        • drdamour
          drdamour
          23 Posts
          ACCEPTED ANSWER

          Re: Send close work item

          ‏2012-03-07T18:15:04Z  in response to StenlundRikard
          ha, my bad for not paying attention to what forum i'm in!

          This isn't the exact answer you're looking for, but this is how we've been doing what you're asking about. Instead of replacing the step completion widget completely, we hid the existing widget, and added our own widget that communicates with the hidden one via iEvents. Thus it remains the responsibility of the step completion widget to send the events to all the other widgets so that they clear out.

          most of this technique was stolen from http://www.ibm.com/developerworks/data/library/techarticle/dm-1009ecmwidgets3/index.html

          FWIW: i'm not sure anymore (haven't been playing in 4.5.2.1 land in a while), but i'm pretty sure the way the clearing works is that the step competion widget just makes a fake Step Element like payload with all the values empty and sends that to every widget that accepts an Receive Work Item event.


          I am Just a new Boy,
          A Stranger in this Town,
          Where are All the Good Times,
          Who's Gonna Show this Stranger Around?
          Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions
          • StenlundRikard
            StenlundRikard
            4 Posts
            ACCEPTED ANSWER

            Re: Send close work item

            ‏2012-03-12T09:24:08Z  in response to drdamour
            Thanks a lot for the response, seems like a good way to resolve my issue!