Difference between revisions of "Actions"

From AMTech WikiDocs
Jump to: navigation, search
(Send command)
(Send command)
Line 41: Line 41:
 
* At configuration time you must supply a thing type (the thing type that will receive the command) and an observation type to be send as command.
 
* At configuration time you must supply a thing type (the thing type that will receive the command) and an observation type to be send as command.
 
[[File:Command-1.png|850px|thumbnail|center|Thing and observation type]]
 
[[File:Command-1.png|850px|thumbnail|center|Thing and observation type]]
* You can specify a thing id (target uri) of the thing type previously specified in order to be more specific about the thing instance that will receive the command.
+
* You can bind a thing id (target uri) of the thing type previously specified in order to be more specific about the thing instance that will receive the command.
 
[[File:Command-2.png|1150px|thumbnail|center|thing id]]
 
[[File:Command-2.png|1150px|thumbnail|center|thing id]]
  

Revision as of 13:00, 23 January 2018

Actions are added to reasoners, in order to be executed. All reasoners must have al least one action to be valid for publication in an activity

Create action workflow

Select action from actions menu

Actions editor

Set action's general properties

Action general properties

Recipients

Media

Continue on failured

Bind action's properties

Create thing

  • This action is configured to create a new thing.
  • The name property will be used to generate a unique ID for this thing.
  • Things aren't immediately created. The creation action is queued as a promise. See CRUD promises.

Update thing

  • This is only available in a for-each reasoner.
  • This action is configured to update an existing thing: the thing that is currently being visited by the for-each reasoner.
  • Things aren't immediately updated. The update action is queued as a promise. See CRUD promises.
  • In the configuration context (and also at execution time) the object referencing "the thing" doesn't change after the action update. It means that any further action using "the current thing" object will work with the same object that the observer retrieved from the DAP.

Delete thing

  • This action is only available in a for-each reasoner.
  • This action is configured to delete the thing that is currently being visited by the for-each reasoner.
  • The thing is not immediately deleted. The deletion action is queued as a promise instead. See CRUD promises.

Send observation

Send command

  • This action can be configured to send a command.
  • Command objects have no differences with observation objects. In fact, you will be asked to provide an observation type as if you were sending a regular observation.
  • At configuration time you must supply a thing type (the thing type that will receive the command) and an observation type to be send as command.
Thing and observation type
  • You can bind a thing id (target uri) of the thing type previously specified in order to be more specific about the thing instance that will receive the command.
thing id

Send notification

  • This action can be configured to send a notification. Notifications are configured as global objects under the activity's scope.
  • You will need to provide string bindings for all the configured placeholders.
  • You will decide if the security for the execution of this action will be taken from the observation that triggered this reasoner or from thing being visited, in case of for-each reasoners. Based on that the notification will be either be received by the users in the tenant of observation or by the users in the tenant of the thing.


Send scheduled observation

  • Very similar to send observations action.
  • You will be required to specify the following:
    • An identifier for this scheduled observation.
    • Start date: a starting point in the future where the send observation action will actually be executed.
    • Occurrence: a number of repetitions: 0 for unlimmited repetitions
    • A frequency of repetitions specified as a combination of years, months, days, hours, minutes, seconds. For instance, 3 days, 4 hours, 30 minutes will specify that the observation will be sent each time a period of 3 days 4 hours and 30 minutes is elapsed.