Hi guys
we've been trying to build a project on WM7. We're using a 'template' project that has been imported and upgraded from WM5. As you know we have had a number of issues, however bit by bit we have worked through most issues with your help.
Now however we've encountered issues with the WIC. We set a default value in a BizFlow Process Variable, amend it in the form (we've checked the code is correctly setting it), and then submit the form. It does not appear to be submitting the WIC, as when the page reloads the original value is still present. Any suggestions / hints as to what to check?
Thanks
we've been trying to build a project on WM7. We're using a 'template' project that has been imported and upgraded from WM5. As you know we have had a number of issues, however bit by bit we have worked through most issues with your help.
Now however we've encountered issues with the WIC. We set a default value in a BizFlow Process Variable, amend it in the form (we've checked the code is correctly setting it), and then submit the form. It does not appear to be submitting the WIC, as when the page reloads the original value is still present. Any suggestions / hints as to what to check?
Thanks
RE: WIC Bindings
I'm sorry you have been having problems with the upgrade to version 7.
To try and debug this specific issue, I think you need to check through the developer logs when the form is submitted.
Some things I would look for:
Is the correct value present in the initial incoming message?
Is the SaveWICDetails Controller being called?
Is this correctly making an external call to the BizFlow service?
Does this request include the Process Variable that has been updated, and does it have the new value?
Is this call to BizFlow successful?
Hopefully answers to these will help track down why the value is not being updated.
It would also be useful to know whether you are getting this behaviour for all PVs, or just this specific one.
Regards,
Gerard
RE: WIC Bindings
Hi Gerard
I can see the value in the eForm/Control section of the document (a field called newroute is bound to the PV 'Route'). newroute has been updated in the view-Page-Painter / View - Page / Input: Data from Browser section.
-<eForm xmlns="http://www.hyfinity.com/mvc" xmlns:mvc="http://www.hyfinity.com/mvc">
-<Control>
<is_script_enabled>true</is_script_enabled>
<_gen_showsla>true</_gen_showsla>
<_gen_showreject>false</_gen_showreject>
<_gen_showterminate>true</_gen_showterminate>
<_gen_showpend>true</_gen_showpend>
<_gen_procdefid>7042</_gen_procdefid>
<_newroute>continue</_newroute>
Under eForm/Data there is a WorkitemContext node - the PV is blank in that.
I can then see the Call_saveWICDetails / if_workitem_context_info_was_supplied call - result is true.
The SaveWICDetails-Controller is then called successfully and then we move onto the Submit controller.
RE: WIC Bindings
If the value is going into the Control block rather than the data (and not under unbound), then this indicates that it didn't find any binding information to say where the value should go.
Given this, I would check is the bindings for the _newroute field. Make sure you have the accordion selected for the action that is being called in this case, and check that the submission binding XPath is correct.
If there isn't an accordion option shown for this action, then you will need to make sure that the field's submission bindings are the same for all the actions that are displayed in order for it to bind for your one.
If you are still unable to resolve this, you could send through the generated XSL file for this page, and I will have a look at the binding settings that are being used.
Regards,
Gerard
RE: WIC Bindings
we've tried all that you suggest I am afraid, and can't see any problem.
I've sent you the xsl - I hope we've missed something straightforward!
Thanks
RE: WIC Bindings
Thanks for sending the XSL through.
From looking at this, the _newroute field seems to have the following submission bindings defined
Does this match what you are seeing in the studio? Which action are you calling when the binding is failing?
I am wondering whether there is some out of date information left around here. For example, I think it unlikely that you would have two different actions called generalCompleteClicked and genCompleteClicked.
If you can send through a project export I can look into this further, but it might be worth trying to delete this field, save the page, and then recreate it. If these are out of date settings incorrectly left around then this should resolve this.
I'm sorry you are having these issues, but hopefully we can soon get this resolved.
Regards,
Gerard
RE: WIC Bindings
Those bindings look ok. I did have two different actions called generalCompleteClicked and genCompleteClicked as I tried to create a new action to see if that still had the issue (it did).
I will have a go at deleting the field as you suggest. However, this issue first raised its head with a binding for the field called _route, and my initial attempt to resolve it was to create _newroute and switch the bindings to that to see if it resolved the problem. I'll let you know how it goes
Thanks
RE: WIC Bindings
Ok, that is good that those bindings look correct. This means that the problem is not with the studio, but with the processing at runtime.
Are you able to set the platform log level to debug, and rerun the transaction where the completeClicked action is called?
This should give us some useful information on the data submitted from the browser before the binding process occurs.
Regards,
Gerard
RE: WIC Bindings
I've sent through the info you asked for.
I've also deleted the field and recreated it as newroute and the issue persists.
Thanks
RE: WIC Bindings
Thanks for sending through all the files.
I have had a detailed look at this and I think I now know what the issue is.
The newroute field is contained within a group called hiddenfields_group, which is always disabled. Unfortunately this disabling seems to be affecting the binding process, as the hidden _xpath control values are no longer getting submitted.
Given this, I think you have a couple of options to resolve the issue.
Either remove the disabling (which might be ok as the fields will be hidden normally anyway?) or add the following script line before the form is submitted. (eg for the 'complete' case you could add this line to your customValidation function in DASGeneral.js)
dojo.query('input[type="hidden"][name$="_xpath"], input[type="hidden"][name*="_xpath_xga"]', dojo.byId('hiddenfields_group')).forEach(function(item){ item.disabled = false; });
I appreciate this isn't an ideal solution, but hopefully this gives you a couple of options to get things working as expected.
Please let me know how you get on.
Regards,
Gerard
RE: WIC Bindings
I removed the disabling and this resolved the issue :)
As I mentioned above, we have based this project on a template that we had in v5. This wasn't a problem on the previous version. Is this a deliberate change? I did review the v7 notes but don't recall seeing anything about this change - although I may have glazed over at some point :P
Thanks for all your help on this issue.
RE: WIC Bindings
I'm glad you managed to get it working.
This wasn't a deliberate change, but rather an unforeseen side effect of all the other improvements made to the disabling functionality since version 5.
I think the previous behaviour will get restored at some point, but I can't say when this will be at the moment. In the mean time, if you do need to submit and bind disabled fields (when using a disable method of read only) then you can use a script line like I mentioned above.
Regards,
Gerard