Differences

This shows you the differences between two versions of the page.

Link to this comparison view

remotetriggerplugin [2016/09/22 02:36]
127.0.0.1 external edit
remotetriggerplugin [2017/10/29 17:44] (current)
admin
Line 2: Line 2:
  
 //Remote Trigger Plugin// automatically sends the state and transition traversal event triggers to the remote agent as MBT model is being executed. ​ //Remote Trigger Plugin// automatically sends the state and transition traversal event triggers to the remote agent as MBT model is being executed. ​
 +
 +[[http://​testoptimal.com/​javaDoc/​reference/​com/​webmbt/​plugin/​RemoteTriggerPlugin.html| MScript Functions]]
 +
 +------
 +==== Overview ====
  
 Upon receiving the state and transition traversal event triggers, the remote agent then performs the action accordingly. After the action is performed, the agent responds to the server with the execution result and obtains next state and transition traversal event trigger. Upon receiving the state and transition traversal event triggers, the remote agent then performs the action accordingly. After the action is performed, the agent responds to the server with the execution result and obtains next state and transition traversal event trigger.
 +
 +==== Remote Agent ====
  
 The remote agent can be written in any programming language which supports http requests. That is, if you can call an url and parse the result returned from a remote web server, you can write the remote agent. The remote agent can be written in any programming language which supports http requests. That is, if you can call an url and parse the result returned from a remote web server, you can write the remote agent.
Line 16: Line 23:
   * end-loop   * end-loop
  
-The url to obtain the agent id is:+     
 +  http://​localhost:​8888/​MbtSvr/​app=agentsvc&​action=regAgent&​mbtFile=xxx 
 +  Return: localhost:​6049
  
-    [[http://​localhost:​8888/​MbtSvr/​app=agentsvc&​action=regAgent&mbtFile=xxx|http://localhost:8888/​MbtSvr/​app=agentsvc&action=regAgent&mbtFile=xxx]] +  ​http://​localhost:​8888/​MbtSvr/​app=agentsvc&​action=nextCmd&agentID=localhost:6049&status=SUCCESS&result=xxx
-    Return: localhost:​6049+
  
-Replace xxx with the name of the model. The agent id returned is then used in all subsequent requests. 
- 
-The url to obtain the next trigger is: 
- 
-    [[http://​localhost:​8888/​MbtSvr/​app=agentsvc&​action=nextCmd&​agentID=localhost:​6049&​status=SUCCESS&​result=xxx|http://​localhost:​8888/​MbtSvr/​app=agentsvc&​action=nextCmd&​agentID=localhost:​6049&​status=SUCCESS&​result=xxx]] 
  
 You may pass FAIL for "​status"​ param which will cause the state/​transition to fail and the value in "​result"​ param will be the exception message. You may pass FAIL for "​status"​ param which will cause the state/​transition to fail and the value in "​result"​ param will be the exception message.
  
-   ​Return:​+   ​Return ​from "​nextCmd"​:
  
   * MBT_start()   * MBT_start()
Line 42: Line 45:
   * trans1_action()   * trans1_action()
   * trans1_verify()   * trans1_verify()
 +
 +
 +==== More Plugin Info ====
  
 By default, this plugin is different from [[RemoteCommandPlugin|RemoteCommandPlugin]] which allows you to send a specific command to the remote agent instead of the the triggers that correspond to the traversing of states and transitions. However, you can use this plugin to also run mScript like [[RemoteCommandPlugin|RemoteCommandPlugin]] by following the instruction described in [[RemoteCommandPlugin|RemoteCommandPlugin]]. By default, this plugin is different from [[RemoteCommandPlugin|RemoteCommandPlugin]] which allows you to send a specific command to the remote agent instead of the the triggers that correspond to the traversing of states and transitions. However, you can use this plugin to also run mScript like [[RemoteCommandPlugin|RemoteCommandPlugin]] by following the instruction described in [[RemoteCommandPlugin|RemoteCommandPlugin]].
Print/export
QR Code
QR Code remotetriggerplugin (generated for current page)