IBM BPM Web Process Designer (WebPD) incorporates preview files to improve the WYSIWYG view of the Coach layout. However, placing a Coach View in a wrapper complicates the ability of the preview to work correctly.
If you have followed along the steps of creating your own custom template that is based off a Brazos UI template or any other template then you might have already experienced this limitation.
Basically if you map out the template variable, it doesn't pass through and the setting doesn't modify the WYSIWYG editor to show the hidden content box. But if you "hard code" the option Template by selecting it on the wrapped Template it shows up fine then and is always present.
To better illustrate the issue here is how the WYSIWYG view works when you work directly with a Brazos UI or any other base template -
(You can see that when you check and un-check the "Display details" checkbox the corresponding section appears and disappears as it should)
Now if you try to expose the Display Details option of the Template in a wrapper and add it to your coach then the preview won't work in the WebPD.
(Basically what happens is that the details section is always hidden in design view. Even when the Display Details is checked in your wrapper template. The configuration option is not being passed to the wrapped Brazos Template at design time in WebPD preview)
If you wrap any control (Brazos UI or IBM's BPM UI) and map out its configuration options, they no longer have an effect on the displayed preview when you change said options. For the most part, this will only affect cosmetic appearances. In the case of the Brazos Template, however, it interferes with functionality as the Details content box remains hidden.
As noted above this is a limitation of WebPD at the moment and so, it cannot be fixed. But there are some workarounds
- Hard coding the template to always have the details exposed works: the wrapped template will always show the details box, e.g. if the configuration is bound to a variable - as the case of mapping it out to a wrapper CV - then the Details section will always be visible. This will cause it to be less dynamic, but it will essentially mimic the previous behavior of the Desktop PD where both content boxes were always visible.
- Can be worked around by temporarily turning off WYSIWYG (via right-click in a layout window) and when you've made the edits to that section you can re-enable WYSIWYG via the same right-click context menu.
- Use the template control's preview files for the customized template's preview files. This does have some limitations noted below but works well for simple wrappers where you intend to promote all of the configuration options.
Use of the wrapped control's preview files in the wrapper has the following limitations:
- If you copy the preview files to the wrapper, all of the config options promoted to the wrapper will live update on the WYSIWYG editor.
- If you don't copy the preview files to the wrapper, promoted configuration options don't display correctly or live update on the WYSIWYG editor.
- Mixed cases of hard-coding some options while promoting other options results in a situation where only some of the options display or update live on the WYSIWYG editor, depending on if you use copies of the preview files or not.
Essentially when using wrappers with copied preview files, you can have one or the other of promoted/live configs or static configs in the underlying control. That choice works out fine for wrapping everything or static (and static composite) coach views, but there's no method to mix the two and get both to preview correctly. In mixed cases where some configurations are static or when you want to promote configurations from a composite coach view, you have to decide which is going to make for a better preview.
- We have filed an RFE filed with IBM for this limitation, so, please vote if you find appropriate https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=120365
- This limitation is not Brazos UI specific, it's applicable to any custom templates you create using some base template
Summary / conclusion
The WYSIWYG editor in the WebPD is limited in what it can show and live update in the preview of a coach view wrapper. For most cases, this is only a cosmetic limitation and doesn't impact functionality. The exception is when wrapping controls that change their layout when being configured, such as the Brazos UI Template. When customizing these types of controls with a wrapper, you have options to set these display options in the wrapped control to make them more usable, to temporarily turn off the dynamic WYSIWYG editor setting, or to utilize the preview files in the wrapper control.