-
1. Re: No save option in Designer
eaa Feb 17, 2012 11:04 AM (in response to out_sider)In your case you will need to use Guvnor's Embedded Editors and not the designer as a standalone app: http://ilesteban.wordpress.com/2010/11/23/guvnor-embed-assets-editor-in-your-application/
Best Regards,
-
2. Re: No save option in Designer
out_sider Feb 20, 2012 4:21 AM (in response to eaa)Many thanks for the reply...but I didn't quite understand the diference between what I was doing and what you suggested...the link you provided uses the standaloneEditorServlet...so isn't it the same thing?
-
3. Re: No save option in Designer
eaa Feb 20, 2012 4:31 AM (in response to out_sider)Sorry, I didn't see that you were also trying to invoke designer through Guvnor (the correct way).
In your case, seems that you are missing some parameters in the URL you are using:
Please try using this URL. If this still doesn't work, please post the error log you are getting in the app server you are using.
Best Regards,
-
4. Re: No save option in Designer
out_sider Feb 20, 2012 4:42 AM (in response to eaa)It's working fine many thanks for the help.
What I didn't know was that it was possible to interact with the designer using the JavaScript object added to the "window".
I hope this interaction helps me fixe the consecutive saving issue I'm having...when I save a process and try to save it again without refershing I get :"Unable to save this asset, as it has been recently updated by [guest]". Do you think it's possible to issue a refresh to the iframe through the JavaScript?
Thanks again
-
5. Re: No save option in Designer
eaa Feb 20, 2012 4:47 AM (in response to out_sider)1 of 1 people found this helpfulI faced the exact same problem. What I did was to attach a listener using registerAfterSaveAllButtonCallbackFunction and reloading the iframe where Designer was opened.
Hope it helps.
Best Regards,
-
6. Re: No save option in Designer
out_sider Feb 20, 2012 5:24 AM (in response to eaa)Thanks for the quick replies.
I found an issue when trying to access the window.guvnorEditorObject through the chrome console. If I try to retrieve the Asset ID by getAssetsUUIDs I get: TypeError: Cannot call method 'getAssetsUUIDs' of undefined.
For what I can uderstand the guvnorEditorObject is not defined in window...am I doing anything wrong?
Best regards
-
7. Re: No save option in Designer
eaa Feb 20, 2012 5:26 AM (in response to out_sider)guvnorEditorObject is defined in the window object of the iframe where Guvnor is opened.
For example, this is the way I'm getting the reference to this object:
var guvnor = window.document.getElementById('guvnor_iframe_id').contentWindow.guvnorEditorObject;
Best Regards,
-
8. Re: No save option in Designer
out_sider Feb 22, 2012 1:01 PM (in response to eaa)Now that I can acess the contentWindow because the iframe parent is in the same domain I'm having another issue .
By doing console.log(guvnor) I get the following information of the guvnorEditorObject:
Object- afterCancelButtonCallbackFunction: null
- afterSaveAndCloseButtonCallbackFunction: function (){console.log('ssssssssssssssaved')}
- brlCallbackFunction: null
- drlCallbackFunction: null
- getAssetsUUIDs: function (){return c.Lg()}
- getBRL: function (b){this.brlCallbackFunction=b;c.Mg()}
- getDRL: function (b){this.drlCallbackFunction=b;c.Ng()}
- registerAfterCancelButtonCallbackFunction: function (b){this.afterCancelButtonCallbackFunction=b}
- registerAfterSaveAndCloseButtonCallbackFunction: function (b){this.afterSaveAndCloseButtonCallbackFunction=b}
- __proto__: Object
There is a "registerAfterSaveAndCloseButtonCallbackFunction" which receives as argument the function to call when the Save button is pressed. The problem is that it isn't calling the function.
Things I've noticed:
In the Stand Alone Editor there isn't a Save and Close button but a Save All Changes button...as such it makes more sence to use the "registerAfterSaveAllButtonCallbackFunction" which you previously refered. Bu the guvnorEditorObject doesn't have such property.
What can I do in order to refresh the iframe of the Stand Alone editor after saving?
-
9. Re: No save option in Designer
eaa Feb 22, 2012 1:11 PM (in response to out_sider)Which version of Guvnor are you using? I don't remember if I added this feature in 5.3 or 5.4
Best Regards,
-
10. Re: No save option in Designer
out_sider Feb 22, 2012 1:20 PM (in response to eaa)Sorry for the dumb question but how can I check the Guvnor version? I downloaded jBPM which brought the Guvnor Editor
On the lib folder which has the .war I have "guvnor-distribution-wars-5.3.1.Final"...does that mean the 5.3 version?
-
11. Re: No save option in Designer
eaa Feb 22, 2012 1:25 PM (in response to out_sider)In guvnor, go to Administration section (left panel) -> About.
If you are using jbpm 5.2 then I think you are using guvnor 5.3.1, what means that I implemented the new callbacks functions in 5.4 .
Unfortunatelly, you will need to use this version if you want to use the new callback functions.
-
12. Re: No save option in Designer
out_sider Feb 22, 2012 1:28 PM (in response to eaa)Can I use the 5.4 with jBPM? is it as simple as downloading the .war?
PS: It is 5.3.1 (just checked)
Thank you very much for all the prompt help
-
13. Re: No save option in Designer
eaa Feb 22, 2012 1:33 PM (in response to out_sider)Not sure if you can use it without any problem. But basically, what you can do is to download the latest snapshot .war and deploy it.
Don't forget to share with us the results
Best Regards,
-
14. Re: No save option in Designer
out_sider Feb 22, 2012 1:40 PM (in response to eaa)Very well...I'll be trying that tomorrow and I'll post the results.
Where can I download the 5.4 version?
As last resource I can always try to catch the Check in Save click event and refresh the iframe.
Again many many thanks for the help