Is there a (wanted) solution to interrupt the oder by operator intervention in the worker support tab (clicking on a button) without changing to order tab? And how would the implementation principally look like?
We have written an ERP-Adapter which basically reads all available orders and reacts on order change by subscribing on following events:
public void Start()
{
OrderManagement.OperationProgressChanged += OnOperationProgress;
OrderManagement.OperationCompleted += OnOperationCompleted;
OrderManagement.OperationUpdated += OnOperationUpdated;
timers.Add(ParallelOperations.ScheduleExecution(SyncOrders, Config.PollingTimerSec * 1000, Config.PollingTimerSec * 1000));
}
. It happens from time to time that a user wants to report interrupted orders when an error occurs in the test cell within the worker support tab.
There is no intendend way to achieve what you are asking for. You could however define an (additional) event on your cell resource and subscribe to it from your ERP Adapter.
Something like the code below:
public class MyCell : Cell, IInterruptEvent
{
public event EventHandler<string> InterruptOrder;
private void OnWorkersupportCompleted(...)
{
InterruptOrder(this, "OrderNumber");
}
}
public class ErpAdapter
{
public void Start()
{
var cell = ResourceManager.GetResources<IInterruptOrder>();
cell.InterruptOrder += OnInterrupt;
}
private void OnInterrupt(object sender, string orderNumber)
{
var operation = // Find in pool
OrderManagement.Interrupt(operation);
}
}