Send System Action Listener#
The Send System Action Reply task will reply back to a message bus message that awaits a reply. This task should be used with the System Action Listener task.
Inputs#
| Name | Data Type | Description |
|---|---|---|
| Reply | String | Message to reply back to the message bus request |
| Activate | any | Activates the task |
Outputs#
| Name | Data Type | Description |
|---|---|---|
| Success | Boolean | If there was no problem emits a true |
| Error | Error | Error that occurred during the processing of this task |
Settings#
| Name | Data Type | Default | Description |
|---|---|---|---|
| Default Reply | String | 10000 | Default Message to reply back to the message bus request |
Behavior#
The Send System Action Reply task will reply back to a message bus message, for this controller instance, received in its execution context. This task should be used with the System Action Listener task.
Example#
DEE action code to make a publish:
UseReference("Cmf.Foundation.BusinessObjects.dll", "Cmf.Foundation.BusinessObjects");
UseReference("Cmf.Foundation.BusinessOrchestration.dll", "");
UseReference("", "Cmf.Foundation.Common.Exceptions");
UseReference("", "Cmf.Foundation.Common");
UseReference("Cmf.Navigo.BusinessObjects.dll", "Cmf.Navigo.BusinessObjects");
UseReference("Newtonsoft.Json.dll", "Newtonsoft.Json.Linq");
UseReference("%MicrosoftNetPath%Microsoft.CSharp.dll", "");
var serviceProvider = (IServiceProvider)Input["ServiceProvider"];
IResource res = serviceProvider.GetService<IResource>();
res.Name = "Anneal-104";
res.Load();
var instance = res.GetAutomationControllerInstance();
if (instance == null)
throw new Exception("Resource not connected to any IoT instance");
else
{
instance.Publish("HelloWorld", "Value");
}
DEE action code to make a request and receive a reply:
UseReference("Cmf.Foundation.BusinessObjects.dll", "Cmf.Foundation.BusinessObjects");
UseReference("Cmf.Foundation.BusinessOrchestration.dll", "");
UseReference("", "Cmf.Foundation.Common.Exceptions");
UseReference("", "Cmf.Foundation.Common");
UseReference("Cmf.Navigo.BusinessObjects.dll", "Cmf.Navigo.BusinessObjects");
UseReference("Newtonsoft.Json.dll", "Newtonsoft.Json.Linq");
UseReference("%MicrosoftNetPath%Microsoft.CSharp.dll", "");
var serviceProvider = (IServiceProvider)Input["ServiceProvider"];
IResource res = serviceProvider.GetService<IResource>();
res.Name = "Anneal-104";
res.Load();
var instance = res.GetAutomationControllerInstance();
if (instance == null)
throw new Exception("Resource not connected to any IoT instance");
else
{
dynamic reply = instance.SendRequest("HelloWorld", "Request", 10000);
throw new Exception(reply == null ? "Nothing received" : "**" + reply.reply + "**" );
}
Remarks#
There is no particular remark to be made.
