cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Business Process Event Error

0 Likes
504

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);
}

}

Accepted Solutions (0)

Answers (0)