Edit Action

{% if action == "get" %} {% set result = pluginObject._get(xpath, callerToken) %} {% set description = result.description or {} %} {% elif action == "new" %} {% set result = {} %} {% set description = {} %} {% set _ = description.update(name=name) if name else None %} {% set _ = description.update(interval=interval) if interval else None %} {% set _ = description.update(xpath=xpath) if xpath else None %} {% set _ = description.update(multiple=multiple) if multiple else None %} {% set _ = description.update(condition=condition) if condition else None %} {% set _ = description.update(minInterval=minInterval) if minInterval else None %} {% set _ = description.update(aggregate=aggregate) if aggregate else None %} {% set _ = description.update(method=method) if method else None %} {% set _ = description.update(url=url) if url else None %} {% set _ = description.update(data=data) if data else None %} {% set _ = description.update(mimetype=mimetype) if mimetype else None %} {% elif action == "add" %} {% set description = {} %} {% set _ = description.update(name=name) if name else None %} {% set _ = description.update(interval=interval) if interval else None %} {% set _ = description.update(xpath=xpath) if xpath else None %} {% set _ = description.update(multiple=multiple) if multiple else None %} {% set _ = description.update(condition=condition) if condition else None %} {% set _ = description.update(minInterval=minInterval) if minInterval else None %} {% set _ = description.update(aggregate=aggregate) if aggregate else None %} {% set _ = description.update(method=method) if method else None %} {% set _ = description.update(url=url) if url else None %} {% set _ = description.update(data=data) if data else None %} {% set _ = description.update(mimetype=mimetype) if mimetype else None %} {% set result = pluginObject._post(description, callerToken) %} {% set description = result.description or {} %} {% elif action == "replace" and not replaceXPath.startswith('/data/actions/action') %} {% set result = {'message' : 'Invalid XPath for replace: %s' % replaceXPath} %} {% set description = {} %} {% elif action == "replace" %} {% set result = pluginObject._get(replaceXPath, callerToken) %} {% set description = result.description or {} %} {% set _ = description.update(name=name) if name != description.name and (name or description.name) else None %} {% set _ = description.update(interval=interval) if interval != description.interval and (interval or description.interval) else None %} {% set _ = description.update(xpath=xpath) if xpath != description.xpath and (xpath or description.xpath) else None %} {% set _ = description.update(multiple=multiple) if multiple != description.multiple and (multiple or description.multiple) else None %} {% set _ = description.update(condition=condition) if condition != description.condition and (condition or description.condition) else None %} {% set _ = description.update(minInterval=minInterval) if minInterval != description.minInterval and (minInterval or description.minInterval) else None %} {% set _ = description.update(aggregate=aggregate) if aggregate != description.aggregate and (aggregate or description.aggregate) else None %} {% set _ = description.update(method=method) if method != description.method and (method or description.method) else None %} {% set _ = description.update(url=url) if url != description.url and (url or description.url) else None %} {% set _ = description.update(data=data) if data != description.data and (data or description.data) else None %} {% set _ = description.update(mimetype=mimetype) if mimetype != description.mimetype and (mimetype or description.mimetype) else None %} {% set result = pluginObject._replace(replaceXPath, description, callerToken) %} {% set description = result.description or {} %} {% else %} {% set result = {'message' : 'Unknown action="%s"' % action} %} {% set description = {} %} {% endif %} {% if action == "new" %}

Create new action

{% else %}

View or edit existing action

{% endif %} {% set message = result.pop('message', None) %} {% if message %}

Warning: {{message}}

{% endif %}
{% if returnTo %} {% endif %}
Group Key Value Help
Triggers Name Name for triggering through call to /action/name
Interval Automatically trigger approximately every interval seconds
Expression Enter an XPath expression. Trigger whenever an element matching the expression is changed
Multiple When checked, this action triggers for each element matched by expression, otherwise it triggers once
Conditions Condition Enter an XPath expression. If it evaluates to false or empty when a trigger happens the action does not run
Min Interval Action runs at most once every Min Interval seconds
Aggregate Multiple triggers happening in close succession are aggregated into one
Action Method The REST method to call (GET/PUT/POST/DELETE) on URL, default GET
URL The URL to call the method on. Can be internal (starting with / or external (full URL)
Data Data to pass to method
Mimetype The mimetype of the data. Default text/plain
{% if action == "new" %} {% else %} {% endif %}

Most text fields can contain Attribute Value Templates (AVTs), XPath expressions bracketed by braces ({ and }). These expressions will be evaluated at the time the action runs and the value inserted. The value $originalContext can be used in an AVT to refer to the element matched by expression.


{% if returnTo %} Return to {{returnTo}}.
{% endif %} Return to main action editor page
Return to Igor homepage