2021 Nov 20 3:50 PM - edited 2024 Feb 04 2:44 AM
Hi guys, I create an action that modified a value into one or more items (Order), order in status "wait for manual export" into "export", now when i selected the Orders and click on action button nothing change and into the log i have this error : "ERROR [hybrisHTTP33] [ManualOrderExportAction] ERROR:
java.util.NoSuchElementException: null
at java.util.Collections$EmptyIterator.next(Collections.java:4210) ~[?:?]
at my."".!!.$$.backoffice.actions.ManualOrderExportListAction.perform(ManualOrderExportListAction.java:37) [?:?]".
@Resource(name = "businessProcessService")
private BusinessProcessService businessProcessService;
@Override
public ActionResult<Object> perform(ActionContext<Object> actionContext)
{
HashSet<OrderModel> hashSet = (HashSet<OrderModel>) actionContext.getData();
try
{
businessProcessService.triggerEvent(hashSet.iterator().next().getOrderProcess().iterator().next().getCode() + "_" + "SaitManualExportEvent" ); //line 37 that generate error.
Messagebox.show(POPUP_MESSAGE);
return new ActionResult<>(ActionResult.SUCCESS);
}
catch (final Exception ex)
{
LOG.error("ERROR: ", ex);
return new ActionResult<>(ActionResult.ERROR);
}
}
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.