Topic
  • 3 replies
  • Latest Post - ‏2013-07-12T21:08:10Z by AndrewPaier
Anoop_m
Anoop_m
32 Posts

Pinned topic IBM BPM Coach and Struts Integration via Ajax

‏2013-07-11T13:06:01Z |

Hello,

we have requirement to develop an application using IBM BPM7.5.1 Coach. for this application we will be a home screen using struts application. When user click on Next button the Coach screen will be loaded on iframe of struts.

Also in this screen having another iframe as a status bar based on struts/jsp. If user change any value in the coach screen, the value needs to be passed from coach screen to struts without refreshing the entire screen

Can anybody suggest is technically feasible pass data from coach UI to struts frame using Ajax or any other approach?

 

 

thanks

Anoop

Attachments

  • dogren@gmail.com
    dogren@gmail.com
    387 Posts

    Re: IBM BPM Coach and Struts Integration via Ajax

    ‏2013-07-11T15:22:00Z  

    My personal opinion is that you shouldn't try to do this. In theory you could try to modify the coach XSLT template and add it some helper functions that watch of onChange events and relay them to the parent frame. But my experience is that architectures like this are very brittle and become support nightmares. You are effectively trying to support two separate Controllers in a MVC framework and that's a road you don't want to go down. Not to mention that you'd be essentially rewriting much of the coach layer and none of it would be portable to BPM 8.0 "new coaches".

    If you absolutely must support this "structs status bar" as the controller, let it be the controller and have it query the human service (including the coach definitions) via the REST API. You would still get most of the benefits of the coach framework, but you'd actually integrate them at a defined API point rather than trying to staple the two architectures together at the client layer.

    (Or, obviously you could just adopt the coach framework as a whole and integrate with the struts framework as you'd integrate with a custom portal. i.e. let the coach run end to end as a pop up window, ignoring the struts header until the end of the human service.)

    David

  • Anoop_m
    Anoop_m
    32 Posts

    Re: IBM BPM Coach and Struts Integration via Ajax

    ‏2013-07-12T04:32:47Z  

    My personal opinion is that you shouldn't try to do this. In theory you could try to modify the coach XSLT template and add it some helper functions that watch of onChange events and relay them to the parent frame. But my experience is that architectures like this are very brittle and become support nightmares. You are effectively trying to support two separate Controllers in a MVC framework and that's a road you don't want to go down. Not to mention that you'd be essentially rewriting much of the coach layer and none of it would be portable to BPM 8.0 "new coaches".

    If you absolutely must support this "structs status bar" as the controller, let it be the controller and have it query the human service (including the coach definitions) via the REST API. You would still get most of the benefits of the coach framework, but you'd actually integrate them at a defined API point rather than trying to staple the two architectures together at the client layer.

    (Or, obviously you could just adopt the coach framework as a whole and integrate with the struts framework as you'd integrate with a custom portal. i.e. let the coach run end to end as a pop up window, ignoring the struts header until the end of the human service.)

    David

    thanks David for your inputs..

    -- Even we are not so happy with the design we are thinking of. the only reason for thinking this approach is we need to embed map(not  google map, but something similar to it ) in the screen. at this point we are not clear whether this map API's will support Coach.

    -- In case if we are going with Struts status bar approach, not sure how to populate the fields in the status bar dynamically. As struts bar does'nt have any event such as button click event. Is there any way we can dynamically load data from Coach to struts without refreshing the screen using REST API?

     

    thanks

    Anoop

  • AndrewPaier
    AndrewPaier
    741 Posts

    Re: IBM BPM Coach and Struts Integration via Ajax

    ‏2013-07-12T21:08:10Z  

    I agree with David.  (That's something like 3 times today David.  One of us owes the other a beer).  However assuming you can't get out of this requirement a few things to mention.

    First I've successfully embedded other UI's inside Coach Designer based coaches using the custom HTML widget and an iframe (I think it was an iframe.  This was a while ago...)

    Second, if you are embedding the coach in an I frame then I think in the coaches ui you can do something like looking at the current form's (maybe current document's parent?) and figure that out.  If you the parent is the same as the current thing, then you aren't in an iframe.  If the parent is something different then you are, and you could then use JS to manipulate things on that parent.

    This link shows you how to detect the iframe.

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

    Updated on 2013-07-12T21:08:54Z at 2013-07-12T21:08:54Z by AndrewPaier