Class StdBSBot
Classe utilizada para gerir o serviço do Bot.
Inheritance
System.Object
StdBSBot
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: StdPlatBS100.dll
Syntax
[ComVisible(true)]
[Guid("F238140D-CA90-421E-806A-747D40D2C2BC")]
[ClassInterface(ClassInterfaceType.None)]
public class StdBSBot : IStdBSBot
Constructors
StdBSBot()
Declaration
Properties
BotClientOnline
Gets an indication of the availibility of the Bot Client based on errors on its initialization.
Declaration
public bool BotClientOnline { get; }
Property Value
Type |
Description |
System.Boolean |
|
BotInicializado
Indica se o motor do Bot foi inicializado.
Declaration
public bool BotInicializado { get; }
Property Value
Type |
Description |
System.Boolean |
|
BotServiceOnline
Gets an indication of the availibility of the Bot service based on task execution heuristics.
Declaration
public bool BotServiceOnline { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
AbreMensagemContexto(String, String)
Este método abre uma mensagem relativa ao contexto activo de uma form do ERP (caso o bot tenha mensagens para mostrar para esse contexto activo)
Declaration
public void AbreMensagemContexto(string strCategoria, string strFormulario = "")
Parameters
Type |
Name |
Description |
System.String |
strCategoria |
|
System.String |
strFormulario |
|
CriaMensagem(BotMessageDto)
Este método cria a mensagem passada como parâmetro, no BOT.
Declaration
public int CriaMensagem(BotMessageDto message)
Parameters
Type |
Name |
Description |
Primavera.Bot.Engine100.ErpViewModel.BotMessageDto |
message |
|
Returns
Type |
Description |
System.Int32 |
|
Este método cria a mensagem passada como parâmetro, no BOT.
Declaration
public int CriaMensagem(string strTopico, string strTarefa, string strTexto, PrimaveraOrderedDictionary objAccoes, bool blnMostraJa)
Parameters
Type |
Name |
Description |
System.String |
strTopico |
|
System.String |
strTarefa |
|
System.String |
strTexto |
|
Primavera.Platform.Collections.PrimaveraOrderedDictionary |
objAccoes |
|
System.Boolean |
blnMostraJa |
|
Returns
Type |
Description |
System.Int32 |
|
CriaTarefa(String, String, String, String)
Este método cria uma tarefa para execução no BOT, sem necessidade de confirmação (mensagem) pelo utilizador.
Declaration
public bool CriaTarefa(string strTopico, string strIdTarefa, string strPipeline, string strParametros)
Parameters
Type |
Name |
Description |
System.String |
strTopico |
|
System.String |
strIdTarefa |
|
System.String |
strPipeline |
|
System.String |
strParametros |
|
Returns
Type |
Description |
System.Boolean |
|
GetLastTaskExecutionHistoryItem(BotTask)
Retrieves the last history item for a specified task.
Declaration
public BotTaskExecution GetLastTaskExecutionHistoryItem(BotTask task)
Parameters
Type |
Name |
Description |
Primavera.Bot.Entities.BotTask |
task |
|
Returns
Type |
Description |
Primavera.Bot.Entities.BotTaskExecution |
|
GetLastTaskExecutionItem(BotTask)
Retrieves the last task execution Work item.
Declaration
public BotWorkQueueItem GetLastTaskExecutionItem(BotTask task)
Parameters
Type |
Name |
Description |
Primavera.Bot.Entities.BotTask |
task |
|
Returns
Type |
Description |
Primavera.Bot.Entities.BotWorkQueueItem |
|
GetTask(String)
Retrieves a task by natural key.
Declaration
public BotTask GetTask(string taskKey)
Parameters
Type |
Name |
Description |
System.String |
taskKey |
|
Returns
Type |
Description |
Primavera.Bot.Entities.BotTask |
|
GetTaskExecutionItems(BotTask, Int32)
Retrieves all history items for a specific task.
Declaration
public List<BotTaskExecution> GetTaskExecutionItems(BotTask task, int maxRecords = 200)
Parameters
Type |
Name |
Description |
Primavera.Bot.Entities.BotTask |
task |
|
System.Int32 |
maxRecords |
|
Returns
Type |
Description |
System.Collections.Generic.List<Primavera.Bot.Entities.BotTaskExecution> |
|
InicializaBot()
Este método inicializa o bot e o seu motor de carregamento dinâmico de mensagens.
Declaration
public void InicializaBot()
LoadTopic(String)
Load a topic configuration
Declaration
public BotTopic LoadTopic(string topicId)
Parameters
Type |
Name |
Description |
System.String |
topicId |
Topic Id
|
Returns
Type |
Description |
Primavera.Bot.Entities.BotTopic |
The Topic Instance
|
LoadTopicsList()
Declaration
public List<BotTopic> LoadTopicsList()
Returns
Type |
Description |
System.Collections.Generic.List<Primavera.Bot.Entities.BotTopic> |
|
SaveTask(BotTask)
Saves the task passed as parameter.
Declaration
public bool SaveTask(BotTask task)
Parameters
Type |
Name |
Description |
Primavera.Bot.Entities.BotTask |
task |
|
Returns
Type |
Description |
System.Boolean |
|
Termina()
Declaration
UpdateWorkItem(BotWorkQueueItem)
Este método atualiza a execução de uma tarefa do bot.
Declaration
public void UpdateWorkItem(BotWorkQueueItem item)
Parameters
Type |
Name |
Description |
Primavera.Bot.Entities.BotWorkQueueItem |
item |
|
Events
NotificacaoAccao
Evento para propagação de operações do Bot que é necessário tratar.
Declaration
public event StdBSBot.NotificacaoAccaoHandler NotificacaoAccao
Event Type
Implements