Preciso executar uma macro de tabela a partir de uma tela especializada em aspx. Para isso achei diversas formas para realizar tal tarefa, assim escolhi o BTL para fazer a execução.
Segue trecho de código:
private string insereHistoricoLote()
{
var task = BusinessTask.Factory.NewMacroTask("KHistoricoAtualiza")
.AddSessionVar("MONITORHANDLESPEG", lista.getHandlesToString())
.Start();
var result = BusinessTask.Factory.GetTask<int>(task.ProcessHandle);
int resultado = result.WaitResult(1000);
return string.Empty;
}
Ao dar o start estoura o seguinte erro em tela:
Error activating ITasksService No matching bindings are available, and the type is not self-bindable. Activation path: 2) Injection of dependency ITasksService into parameter taskService of constructor of type BusinessTaskFactory 1) Request for BusinessTaskFactory Suggestions: 1) Ensure that you have defined a binding for ITasksService. 2) If the binding was defined in a module, ensure that the module has been loaded into the kernel. 3) Ensure you have not accidentally created more than one kernel. 4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name. 5) If you are using automatic module loading, ensure the search path and filters are correct.