Status | ID | Priority | Type |
Closed | 37447 | Major | Question |
Profile | Reply |
gabossoloClient | Hello -- Could you please help me on the best way log BusinessOperation executions. Thank you! |
User | Description | Posted On |
MariyaVoytovichAgent | Hello gabossolo! If you use Managed Business Operation, you can use Managed Operations logging. For example: [BusinessOperation(typeof(ChangeFreightContext))] [DisplayName(@"Default implementation")] [Description("Performs change of freight costs by a predetermined amount in%.")] public class ChangeFreightContextDefaultImpl : OperationServiceBase { public override void Execute(IBusinessOperation businessOperation) { var bo = (ChangeFreightContext)businessOperation; bo.Process.Name = bo.Name;var rate = (decimal)(bo.Percent / 100);if (bo.Orders == null || !bo.Orders.Any()) return; using (var objectSpace = BusinessOperationManager.Instance.Application.CreateObjectSpace()) Information for the log is transmitted using : bo.Process.NextStep(msg, step); To view the log, you need to click on the "Show log" button on the detailed view. Feel free to contact us if you need further assistance or have additional questions. Regards, |