#region Namespace using Asm.As.Oib.Client; using Asm.As.Oib.SiplacePro.LineControl.Contracts; using Asm.As.Oib.SiplacePro.Proxy.Architecture.Objects; using com.itac.mes.domain; using com.itac.oib; using Tools = com.itac.mes.tools; using com.itac.mes.tools; using com.itac.oib.displayservice.contracts.data; using com.itac.oib.linecontrol.contracts.data; using com.itac.oib.siplacesetupcenter.contracts.data; using com.itac.oib.siplacepro.service; using com.itac.oib.siplacepro.contracts.data; using Itac.Oib; using System; using System.Diagnostics; using LcTypes = Asm.As.Oib.SiplacePro.LineControl.Contracts; using OibSpiTyp = Asm.As.Oib.SiplacePro.Proxy.Types; using Asm.As.Oib.Client.CustomExtensions; using com.itac.oib.client.customextensions; using com.itac.oib.traceability.contracts.data; using com.itac.oib.linecontrol.data; using System.Collections.Generic; using Asm.As.Oib.DisplayService.Contracts.Messages; #endregion namespace com.itac.mes.proxy.business { public class OIBServiceImpl : OIBService, IDisposable { #region Fields private IAdapterControl _adapterControl; private readonly MessageWriter _messageWriter; public ChangeoverReceiver ChangeoverReceiver { get; set; } #endregion public OIBServiceImpl(IAdapterControl adapterControl, MessageWriter messageWriter) { _adapterControl = adapterControl; _messageWriter = messageWriter; } public OibSetupCenterAccess OibSetupCenterAccess { get; set; } public OibLineControlAccess OibLineControlAccess { get; set; } public SiplacePro SiplacePro { set; get; } public OibDisplayServiceAccess DisplayServiceAccess { get; set; } public string configuredLineFullPath { get; set; } public string firstMachineInLine { get; set; } public string lastMachineInLine { get; set; } public void Shutdown() { } internal void SetAdapterControl(IAdapterControl adapterControl) { _adapterControl = adapterControl; } #region ISiplaceSetupCenter Member public void set(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitLocation[] packagingUnitLocations) { try { OibSetupCenterAccess.Set(PackagingUnitLocationMapper.get(packagingUnitLocations)); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "Class OIBServiceImpl, Call ISiplaceSetupCenter.Set failed: ", e); } } public void refill(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitLocation[] packagingUnitLocations) { try { OibSetupCenterAccess.Refill(PackagingUnitLocationMapper.get(packagingUnitLocations)); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "Class OIBServiceImpl, Call ISiplaceSetupCenter.Refill failed: ", e); } } public void tearDown(string strSetup, com.itac.oib.siplacesetupcenter.contracts.data.ComponentLocation[] componentLocations) { try { OibSetupCenterAccess.TearDown(strSetup, ComponentLocationMapper.get(componentLocations)); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "Class OIBServiceImpl, Call ISiplaceSetupCenter.TearDown failed: ", e); } } public com.itac.oib.siplacesetupcenter.contracts.data.MachineSetup getReducedActualSetup(string machineId) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SetupCenter.GetReducedActualSetup(machineId=" + machineId + ")"); try { www.siplace.com.OIB._2008._05.SetupCenter.Contracts.Data.MachineSetup oibMachineSetup = OibSetupCenterAccess.GetReducedActualSetup(machineId); if (oibMachineSetup == null) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SetupCenter.GetReducedActualSetup returned null"); return null; } MachineSetup machineSetup = MachineSetupMapper.get(oibMachineSetup); Evaluate(machineSetup); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SetupCenter.GetReducedActualSetup returned"); return machineSetup; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to SetupCenter.GetReducedActualSetup failed", e); return null; } } public PackagingUnitResult[] update(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] packagingUnits) { try { return PackagingUnitResultMapper.getArray(OibSetupCenterAccess.Get(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(packagingUnits))); } catch (Exception) { return null; } } public PackagingUnitResult[] get(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] packagingUnits) { try { return PackagingUnitResultMapper.getArray(OibSetupCenterAccess.Get(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(packagingUnits))); } catch (Exception) { return null; } } public com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitResult[] create(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] packagingUnits) { try { return PackagingUnitResultMapper.getArray(OibSetupCenterAccess.Get(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(packagingUnits))); } catch (Exception) { return null; } } public PackagingUnitResult[] delete(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] packagingUnits) { return PackagingUnitResultMapper.getArray(OibSetupCenterAccess.Get(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(packagingUnits))); } public void activate(ComponentLocation[] componentLocations) { try { OibSetupCenterAccess.Activate(ComponentLocationMapper.get(componentLocations)); } catch (Exception) { } } public void deactivate(com.itac.oib.siplacesetupcenter.contracts.data.ComponentLocation[] componentLocations, string reason) { try { OibSetupCenterAccess.Deactivate(ComponentLocationMapper.get(componentLocations), reason); } catch (Exception) { } } public void lockUids(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] puIDs, string reason) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SetupCenter.Lock(reason=" + reason + ")"); try { OibSetupCenterAccess.Lock(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(puIDs), reason); Evaluate(puIDs); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SetupCenter.Lock returned"); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to SetupCenter.Lock failed", e); } } public void unlockUids(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnit[] puIDs) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SetupCenter.Unlock"); try { OibSetupCenterAccess.Unlock(com.itac.oib.siplacesetupcenter.contracts.data.PackagingUnitMapper.get(puIDs)); Evaluate(puIDs); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SetupCenter.Unlock returned"); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to SetupCenter.Unlock failed", e); } } public Configuration getConfiguration() { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SetupCenter.GetConfiguration"); try { var configuration = ConfigurationMapper.get(OibSetupCenterAccess.GetConfiguration()); Evaluate(configuration); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SetupCenter.GetConfiguration returned"); return configuration; } catch(Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to SetupCenter.GetConfiguration failed", e); return null; } } public bool isConnected() { try { return OibSetupCenterAccess.IsConnected(); } catch { return false; } } public void setMessageLevel(int messageLevel) { try { OibSetupCenterAccess.SetMessageLevel(messageLevel); } catch { } } public string getDatabaseName() { try { return OibSetupCenterAccess.GetDatabaseName(); } catch { return null; } } #endregion #region ILineControl Member public string getDatabaseId() { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.getDatabaseId"); try { String result = OibLineControlAccess.LineControlSession.DatabaseId; LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.getDatabaseId returned " + result); return result; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.getDatabaseId failed, return false ", e); return null; } } public string getAdapterTimeZone() { try { return OibLineControlAccess.LineControlSession.GetAdapterTimeZone(); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.getAdapterTimeZone failed, return empty string ", e); return ""; } } /// /// full path required (including folders) /// /// /// public bool stopLine(string lineName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.StopLine(" + lineName + ")"); try { bool b = OibLineControlAccess.LineControlSession.StopLine(lineName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.StopLine returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.StopLine failed, return false ", e); return false; } } public bool stopLineConveyor(string lineName, int nLanes) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.StopLineConveyor(" + lineName + "," + nLanes + ")"); try { var oibLanes = (LcTypes.ConveyorLanes)Enum.ToObject(typeof(LcTypes.ConveyorLanes), nLanes); bool b = OibLineControlAccess.LineControlSession.StopLineConveyor(lineName, oibLanes); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.StopLineConveyor returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.StopLineConveyor failed, return false", e); return false; } } public bool continueLine(string lineName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.ContinueLine(" + lineName + ")"); try { bool b = OibLineControlAccess.LineControlSession.ContinueLine(lineName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.ContinueLine returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.ContinueLine failed, return false", e); return false; } } public bool continueLineConveyor(string lineName, int nLanes) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.ContinueLineConveyor(" + lineName + "," + nLanes + ")"); try { var oibLanes = (LcTypes.ConveyorLanes)Enum.ToObject(typeof(LcTypes.ConveyorLanes), nLanes); bool b = OibLineControlAccess.LineControlSession.ContinueLineConveyor(lineName, oibLanes); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.ContinueLineConveyor returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.ContinueLineConveyor failed, return false", e); return false; } } public bool blockStationInputConveyor(string station, bool bLock, string strBlockingApplicationName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.BlockStationInputConveyor(" + station + "," + bLock + ", " + strBlockingApplicationName + ")"); try { bool b = OibLineControlAccess.LineControlSession.BlockStationInputConveyor(station, bLock, strBlockingApplicationName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.BlockStationInputConveyor returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.BlockStationInputConveyor failed, return false", e); return false; } } public bool unBlockStationInputConveyor(string station, string strUnblockingApplicationName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.UnBlockStationInputConveyor(" + station + ", " + strUnblockingApplicationName + ")"); try { bool b = OibLineControlAccess.LineControlSession.UnBlockStationInputConveyor(station, strUnblockingApplicationName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.UnBlockStationInputConveyor returned " + b); return b; } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.UnBlockStationInputConveyor failed, return false", e); return false; } } public string getActiveProductionSchedule(string lineName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.GetActiveProductionSchedule(" + lineName + ")"); String result = null; try { result = OibLineControlAccess.LineControlSession.GetActiveProductionSchedule(lineName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.GetActiveProductionSchedule(" + lineName + ") returned " + result); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.GetActiveProductionSchedule failed", e); } return result; } public LineControlLineStatus getLineStatus(string lineName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.GetLineStatus(" + lineName + ")"); LineControlLineStatus result = null; try { result = LineControlLineStatusMapper.get(OibLineControlAccess.LineControlSession.GetLineStatus(lineName)); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to LineControl.GetLineStatus(" + lineName + ") returned "); Evaluate(result); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, ".NET call to LineControl.GetLineStatus failed", e); } return result; } public StartJobResult startPlacementRecipe(string productionSchedule, string jobName, int conveyor) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to LineControl.startPlacementRecipe(schedule=" + productionSchedule + ", job=" + jobName + ", conveyor=" + conveyor + ")"); StartJobResult startJobResult = new StartJobResult(); try { // evtl. ist productionSchedule leer, dann den aktuellen Schedule der Linie nehmen LcTypes.ConveyorLanes lcLane = (LcTypes.ConveyorLanes)conveyor; // Get the SIPLACE Pro session for the SPI adapter on the local host Session session = SiplacePro.oibSpiAccess.Session; // Get the line the production schedule will be for. Object line = session.GetObject(configuredLineFullPath, OibSpiTyp.ObjectServerType.Line); if (line == null) { startJobResult.errorText = string.Format("Line '{0}' does not exist in SIPLACE Pro.", configuredLineFullPath); startJobResult.result = false; return startJobResult; } if (productionSchedule.Equals("") || productionSchedule.Equals("*")) { // automatic resolving of current production schedule productionSchedule = OibLineControlAccess.LineControlSession.GetActiveProductionSchedule(configuredLineFullPath); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "automatic resolved ProductionSchedule is " + productionSchedule); } Asm.As.Oib.SiplacePro.Proxy.Business.Objects.ProductionSchedule prodSched = session.GetObject(productionSchedule, OibSpiTyp.ObjectServerType.ProductionSchedule) as Asm.As.Oib.SiplacePro.Proxy.Business.Objects.ProductionSchedule; if (prodSched == null) { startJobResult.errorText = string.Format("ProductionSchedule '{0}' not found in SIPLACE Pro.", productionSchedule); startJobResult.result = false; return startJobResult; } bool found = false; Asm.As.Oib.SiplacePro.Proxy.Business.Objects.ProductionScheduleElement productionScheduleElement = null; foreach (Asm.As.Oib.SiplacePro.Proxy.Business.Objects.ProductionScheduleElement prodSchedElem in prodSched.ProductionScheduleElements.Values) { if (prodSchedElem.Recipe.Name.Equals(jobName) || prodSchedElem.Recipe.FullPath.Equals(jobName)) { found = true; productionScheduleElement = prodSchedElem; break; } } if (!found) { startJobResult.errorText = string.Format("Job {0} not found in ProductionSchedule '{1}'.", jobName, productionSchedule); startJobResult.result = false; return startJobResult; } Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.DownloadResult result = OibLineControlAccess.LineControlSession.DownloadIC( prodSched.FullPath, //Name of the production schedule prodSched.ProductionScheduleElements.IndexOf(productionScheduleElement), //Zero based index of the ProductionScheduleElement "", // ProductionScheduleElement ID, if this is empty, Index will be used lcLane,// LcTypes.IntegrityCheckMode.AllowHeadstepRecalcuation, LcTypes.IntegrityCheckModeForRepartitioning.AvoidRepartitioning, LcTypes.DownloadProcessingOptions.AutoWidthAdjust | LcTypes.DownloadProcessingOptions.OverwriteFeederSettings) as Asm.As.Oib.SiplacePro.LineControl.Contracts.Data.DownloadResult; startJobResult.result = result.Succeeded; startJobResult.errorText = result.DetailedResults.ToString(); } catch (Exception e) { startJobResult.errorText = e.Message; startJobResult.result = false; return startJobResult; } Evaluate(startJobResult); return startJobResult; } #endregion #region IAdapterControl Member public void startSetupCenterNotifyReceiver() { if (_adapterControl != null) { _adapterControl.startSetupCenterNotifyReceiver(); } } public void stopSetupCenterNotifyReceiver() { if (_adapterControl != null) { _adapterControl.stopSetupCenterNotifyReceiver(); } } public void startMonitoringReceiver() { _adapterControl.startMonitoringReceiver(); } public void stopMonitoringReceiver() { _adapterControl.stopMonitoringReceiver(); } public bool ping() { return _adapterControl.ping(); } public bool isSetupStation() { return _adapterControl.isSetupStation(); } public void setInterfaceHost(int port, string ipAddress, string canonicalHostName, string hostName) { _adapterControl.setInterfaceHost(port, ipAddress, canonicalHostName, hostName); } public void setChannelName(string channelName) { _adapterControl.setChannelName(channelName); } public void startTraceReceiver() { _adapterControl.startTraceReceiver(); } public void stopTraceReceiver() { _adapterControl.stopTraceReceiver(); } public void startBoardGateKeeper() { _adapterControl.startBoardGateKeeper(); } public void stopBoardGateKeeper() { _adapterControl.stopBoardGateKeeper(); } public void startDekReceiver() { _adapterControl.startDekReceiver(); } public void stopDekReceiver() { _adapterControl.stopDekReceiver(); } #endregion #region ISiplacePro Member public BoardCheckInRequest completeCheckinData(BoardCheckInRequest checkinData) { return SiplacePro.completeCheckinData(checkinData); } public BoardElement[] getPlacementForBoard(String boardFullName) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SiplacePro.getPlacementForBoard(" + boardFullName + ")"); BoardElement[] placeInfo = null; try { placeInfo = SiplacePro.getPlacementForBoard(boardFullName); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, ".NET call to SiplacePro.getPlacementForBoard(" + boardFullName + ") returned "); Evaluate(placeInfo); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, "java call to SiplacePro.getPlacementForBoard failed", e); } return placeInfo; } // beim starten des interface ermittelt sich das Interface darueber einmalig den Status und die Rüstng der Linie, und // kann damit die Rüstung neu aufbauen oib.client.customextensions.LineChangeoverEventArgs ISiplacePro.getCurrentLineProductionData() { if (ChangeoverReceiver == null) { return null; } return ChangeoverReceiver.getCurrentLineProductionData(); } #endregion #region Logging Utils private void Evaluate(Object arg) { if (_messageWriter != null) { _messageWriter.output(arg); } } #endregion #region IDisposable public void Dispose() { if (OibLineControlAccess != null) OibLineControlAccess.Dispose(); if (OibSetupCenterAccess != null) OibSetupCenterAccess.Dispose(); if (OibLineControlAccess != null) OibLineControlAccess.Dispose(); if (OibLineControlAccess != null) OibLineControlAccess.Dispose(); } #endregion public void sendMessageByLinePathAllStations(string linePath, string messageText, string extendedDescription, AcknowledgementType acknowledgementType, bool callbackRequest, SeverityLevel severityLevel) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByLinePathAllStations"); // wenn default-Wert (*) dann den konfigurierten Wert für die Linie benutzen if (linePath == null || linePath.Length == 0 || linePath.Equals("*")) { linePath = configuredLineFullPath; } try { Asm.As.Oib.DisplayService.Proxy.Architecture.Objects.DisplayServiceClient displaySession = DisplayServiceAccess.DisplayServiceSession; Asm.As.Oib.DisplayService.Contracts.Data.Types.AcknowledgementType ackType = AcknowledgementTypeMapper.get(acknowledgementType); Asm.As.Oib.DisplayService.Contracts.Data.Types.SeverityLevel severity = SeverityLevelMapper.get(severityLevel); Asm.As.Oib.DisplayService.Contracts.Messages.SendMessageResponse sendMessageResponse = displaySession. SendMessageByLinePathAllStations(linePath, messageText, extendedDescription, ackType, callbackRequest, 0, severity, null, null); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByStationPath finished"); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, "java call to SendMessageByStationPath finished", e); } } public void sendMessageByLinePathFirstStation(string linePath, string messageText, string extendedDescription, AcknowledgementType acknowledgementType, bool callbackRequest, SeverityLevel severityLevel) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByLinePathFirstStation"); if (linePath.Equals("*")) { linePath = configuredLineFullPath; } try { Asm.As.Oib.DisplayService.Proxy.Architecture.Objects.DisplayServiceClient displaySession = DisplayServiceAccess.DisplayServiceSession; Asm.As.Oib.DisplayService.Contracts.Data.Types.AcknowledgementType ackType = AcknowledgementTypeMapper.get(acknowledgementType); Asm.As.Oib.DisplayService.Contracts.Data.Types.SeverityLevel severity = SeverityLevelMapper.get(severityLevel); Asm.As.Oib.DisplayService.Contracts.Messages.SendMessageResponse sendMessageResponse = displaySession. SendMessageByLinePathFirstStation(linePath, messageText, extendedDescription, ackType, callbackRequest, 0, severity, null, null); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByLinePathFirstStation finished"); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, "java call to SendMessageByLinePathFirstStation finished", e); } } public void sendMessageByStationPath(string stationPath, string messageText, string extendedDescription, AcknowledgementType acknowledgementType, bool callbackRequest, SeverityLevel severityLevel, Answer[] answerList) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByStationPath"); if (stationPath.Equals("*")) { stationPath = firstMachineInLine; } else if (stationPath.Equals("#")) { stationPath = lastMachineInLine; } try { Asm.As.Oib.DisplayService.Proxy.Architecture.Objects.DisplayServiceClient displaySession = DisplayServiceAccess.DisplayServiceSession; Asm.As.Oib.DisplayService.Contracts.Data.Types.AcknowledgementType ackType = AcknowledgementTypeMapper.get(acknowledgementType); Asm.As.Oib.DisplayService.Contracts.Data.Types.SeverityLevel severity = SeverityLevelMapper.get(severityLevel); List asmAnswerList = new List(); Asm.As.Oib.DisplayService.Contracts.Messages.SendMessageResponse sendMessageResponse = displaySession. SendMessageByStationPath(stationPath, messageText, extendedDescription, ackType, callbackRequest, 0, severity, asmAnswerList, null); LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Information, "java call to SendMessageByStationPath finished with failure"); } catch (Exception e) { LogHandler.log(Tools.Constants.LOGGER, TraceEventType.Error, "java call to SendMessageByStationPath finished", e); } } } }