cancel
Showing results for 
Search instead for 
Did you mean: 

Invoke custom controller

Former Member
0 Kudos

Hi ,

How can we configure my custom controller which extends ConfigurableFlowController,so that when onclick event occurs in wizard(create-wizard) my custom controller will get invoked.Can you please explain how flow goes while click on next or back or cancel button?which methods are invoked first? How controllers are mapped?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I have attached snippet of configuration file in myextenstion backoffice widget.xml.link text

is configuration sufficient to invoke my controller not existing one? or i missed any thing in above configuration?

former_member632755
Active Contributor
0 Kudos

Are you sure that the configurzation is applied? Have you used the Reset everything button in the Application orchestrator?

For me the snippet looks totally fine and if only is applied should work. If it doesn't it's apparently a bug. Can you double-check if it is applied and if not create a defect report?

Cheers, Wojtek

Former Member
0 Kudos

yes,I am using reset everything button each time after making any changes. I want to confirm whether id in my widget.xml should same to existing id from backoffice?I have tried with different as well as same id in my widget.xml file. One more behaviour i have observed that while clicking create action two wizards are getting displayed.is it due two widgets available for create action?

Again I have attached document for your reference.link text

Thank you.

former_member632755
Active Contributor
0 Kudos

The widget should have a unique id, different than the one used by hybris. Be sure to reflect the change both: in the widget and on all connections to and from the widget. If this doesn't help please report a support ticket to get direct help.

Cheers, Wojtek

former_member632755
Active Contributor
0 Kudos

Hi,

  • is this the only instance of the configurable flow? I assume yes. If not - are the right connections used?

  • have you re-declared the controller in definition.xml of your new widget?

It should work if the configuration is OK. If not you will have to ask at support@hybris.com since the shreads of information I see are insuficient to diagnose the problem.

Cheers, Wojtek

Former Member
0 Kudos

Thank you for your information.

I have created one widget which extends configurableflow (com.hybris.cockpitng.widgets.configurableflow) widget.I have declared same widget in my custom backoffice widget xml configuration as below.

Now when any onclick events occur from wizard my controller should get invoked,but still existing controller(ConfigurableFlowController) is getting invoked.

Former Member
0 Kudos

Hi Ahswini,

If i Understand right, You've extended the ConfigurableFlow widget (creating new definition.xml,extending ConfigurableFlow controller) , that implies you've created completely new widget and you've to use your new widget to get your controller invoked on save,next or whatever. If you're using OOTB Configurableflow wizard , the existing controller is invoked not your's.

Hope this helps.

Thanks, sandeep

Former Member
0 Kudos

Yes Sandeep, I have created new widget. Now i want to replace/override existing widget (configurable flow widget) with newly created widget so that each time my controller should get invoked.Existing controller should not get invoked.

former_member632755
Active Contributor
0 Kudos

Hi,

the documentation of Configurable Flow Widget and tutorial on How to extend a widget will give you all the answers.

When you extend the widget and override just the controller be sure to change the *id*s in the widgets.xml to use your extended widget. The rest should just work. The only issue I know about is the definition.xml - when you extend the widget you may have to redeclare all sockets and settings (you may just copy-paste the - it's a known bug.

Cheers, Wojtek