PhixFlow Help

Stream Item Actions

This page is for application designers who need to configure specific operations that will change data in the stream.

Action Concepts

A stream has a set of Stream Item Actions. These specify an operation that can happen to a record in the stream. Stream item actions can create, read, update or delete a record, so are called CRUD actions.

You can configure an Action to perform several operations on the data in different streams. This is because the action contains a list of stream item actions that can come from different streams.

The action can potentially run any of the actions in its list. To decide which stream item action to run, the action has a rule associated with each stream item action. When a Stream Item Action Rule evaluates to true, the action runs the action and therefore makes a change to the data in the stream.

Creating a Stream Item Action

To create a stream item action:

  • either open a stream's properties. In the Stream Item Action section, click  Add .
  • or open the repository branch for a stream. Right-click Stream Item Actions and select  Add.

In both cases, PhixFlow opens a new stream item action properties tab.

Stream Item Action Properties

 Use the following properties to configure the stream item action.

For information about the properties toolbar, and about the sections Parent Details, Analysis Models, Description and Audit Summary, see Common Properties.  For a full list of all the PhixFlow property tabs and windows, see Property Tabs.

Basic Settings

FieldDescription
NameEnter the name of the stream item action.

Stream Item Action

Select the type of operation:

  • None 
  • Insert
  • Delete
  • Update

The remaining options available in Basic Settings depend on the type of operation you select.

You cannot undo or reverse a stream item action that deletes data records from a stream.

If you want users to have the option to undo a change:

  1. Configure a stream item action to Update rather than delete.
  2. The update marks the records as 'deleted', for example in a "status" attribute.
  3. Set up a scheduled archive task. Configure it to archive (delete) records set that have had status set to 'delete' in a specified time period, e.g. 48h hours.

This gives users time to reinstate records that have been deleted by mistake. The user will need to manually update the status attribute for the record to remove 'deleted'. If you do not  want your users to see deleted records, you can filter them from any views.

Attributes to Update

This option is available where Stream Item Action is Insert,Update or Delete.

This section has a toolbar with standard buttons and   Show Attributes.

The grid  contains a list of attributes on which the stream item action will operate. If the grid is empty, the stream item action will operate on all attributes in the stream. To add stream attributes to the grid, in the toolbar, click  Show Attributes. PhixFlow opens the list of stream attributes. Drag attributes into the grid.

To create a new attribute, click  Add. To edit an attribute that is listed in the grid, double-click its name. In both cases, PhixFlow opens the Stream Item Action Attribute properties.

The grid displays information from the action attribute:

  • Order: The order in which the rules are evaluated.
  • Name: The backing stream.
  • Expression: Any expression that has been defined for the attribute.

To remove an attribute from the grid, use the  Permanently Delete in the toolbar.

For Delete actions, use the expression to include information related to the action. For example, you may want users to add a reason for deleting the record. This means the Delete action has an audit record that also records the reason. The alternative is to use an Update action to record the information, then use a Delete action. However, this results in two audit records.

Filter Type

This option is only available where Stream Item Action is Delete or Update.

Select an option from the drop-down list.

The action will only apply to the records that:

  • Selected Items - the user has selected on the dashboard from which the action was initiated, unless the Target View is specified.
  • Edited Items - that the use has updated on the view from which the action was initiated, unless the Target View is specified.
  • View Filter - that are currently displayed  on the view from which the action was initiated unless the Target View is specified.
  • Action Filter - that the filter defined in the action has retrieved.
  • Dragged Items - the user is dragging, for a drag-and-drop action.
  • Drop Target Items - the user is dropping something onto, for a drag-and-drop action.
Target View

This option is only available where Stream Item Action is Delete or Update.

Enter a stream view name.

Where Filter Type is one of Selected Items, Edited Items or View Filter, PhixFlow takes the records from the named view. The user may have started the action on a different view.

Condition

This option is only available where Stream Item Action is Delete or Update and Filter Type is Action Filter.

Create a filter to specify the records to which the action applies.

Expressions in this filter can refer items on the view or dashboard from which this action was initiated, for example:

  • form fields
  • context parameters
  • attributes from any selected record

Configure this filter in the same way that you would a pipe filter.

Copy Values By Name

This option is only available where Stream Item Action is Insert or Update.

Specify what to do if the dashboard from which the action was initiated includes more attributes than those listed in the properties grid Attributes to Update.

 Untick to update only those attributes listed in Attributes to Update. All other attributes are unchanged. For insert actions, nothing is added (null).

 Tick to update only those attributes are not listed in Attributes to Update

PhixFlow looks for a form field or stream view attribute with the same name as the attribute. If it finds a match, PhixFlow updates the attribute to the value of the form field or stream view attribute. If PhixFlow does not find a match, it does not update the attribute value.

Maximum Items Expr.

This option is only available where Stream Item Action is Delete or Update.

Enter an expression that evaluates to a number. The number limits how many records (items) this action can affect. If this action applies to more than the maximum number of items, PhixFlow updates only the specified number of items and ignores the rest. Phixflow reads records in the  order they are listed in the stream view from which the items are selected.

Minimum Items Expr.

This option is only available where Stream Item Action is Delete or Update.

Enter an expression that evaluates to a number. The number specifies the minimum number of records that the action must be applied to for this action to run. If fewer than this number of items the action will return an error and will not run.

Action Validation

Enter a validation expression.





Please let us know if we could improve this page feedback@phixflow.com