Abort pwo in Assigned Orderstate

Hi community

I desperately need to ABORT (no CancelOrder) some pwos in any reasonable state (“Assigned”,”OrderProduct”, etc..)  from a custom script. If I try CallMethod(“Abort”…) I got an error message like “this method can only be called internally”, but I need that so much.

Please, advice.

Thanks in advance

a

Parents
  • ABORT is done for internal technical reasons and thus can not be done in a user, even admin, context.

    You should be able to run your script as a process from a jobserver. Jobserver processes run in an internal service acocunt context and should be able to call the method.

    Not recommended but possible: you can set the "Service Account" flag on the systemuser you authenticate with. That should put you also in an internal context. I advise you to be very careful with this and revert as soon as possible. Otherwise large parts of the normal objectlayer functionality might be bypassed.

    For one-time cleanup operations you might also check out the SQL stored procedure "exec QBM_PJobCreate_HOCallMethod_L " which basicly creates ad-hoc jobs for the job server to process. Again be careful and know what you do.

Reply
  • ABORT is done for internal technical reasons and thus can not be done in a user, even admin, context.

    You should be able to run your script as a process from a jobserver. Jobserver processes run in an internal service acocunt context and should be able to call the method.

    Not recommended but possible: you can set the "Service Account" flag on the systemuser you authenticate with. That should put you also in an internal context. I advise you to be very careful with this and revert as soon as possible. Otherwise large parts of the normal objectlayer functionality might be bypassed.

    For one-time cleanup operations you might also check out the SQL stored procedure "exec QBM_PJobCreate_HOCallMethod_L " which basicly creates ad-hoc jobs for the job server to process. Again be careful and know what you do.

Children