Learn WorkXpress
![]() AutomateAutomation enables the computer to perform tasks for you automatically. These are commonly referred to as "rules" and were historically created using programmatic tools. In WorkXpress, no programming is required to create automation. Actions are used any time, and every time, you want the computer to do something for you automatically. WorkXpress Actions may take the form of Control Actions (evaluations, loops, and schedules) and Execution Actions (actual activities that do something). There is only one interface for creating or maintaining Actions, the Action Manager. Here you can setup Actions on any available triggering point or according to a schedule. All Actions are created inline. Except for scheduled Actions and Action sets, all Actions are created in context. All actions process in a specific order. Some are as obvious as "save a value" or "send an email", while others are less obvious, such as "open a page" or "make a soap call".
| |
Automate Business ProcessesIn WorkXpress, Automation becomes a yellow block known as Actions. | |
Overview
-

Controlling Actions
Show Technical DetailsExecution Actions versus Control Actions
Execution Actions refer to specific activities performed by the computer, such as saving a value or sending an email. However, one subset of Actions is a Control Action. WorkXpress has four types of Control Actions:
- Evaluation - used for setting up an "if, then" scenario.
- For Each - used for repeating a subsequent series of Actions on each item in context
- Schedule - used for setting a time or series of times to run Actions later
- Thread - used for spinning off subsequent Actions into their own processing thread
Control Actions are treated like Actions in every way, except how they are treated in the Action Manager interface. Control Actions essentially serve to control, route, or group Actions, or to change their context. Execution Actions, on the other hand, exist to perform functionality automatically.
-

Like Programming
Show Technical Details

Use Actions to build any Automation or Integration.
We'll teach you about the fifth and final Building Block of WorkXpress, Actions, in this lesson. We'll examine the different kinds of triggers in WorkXpress and show how each trigger fires a procedure. For any procedure, we will show you how you can create and invoke Actions. Finally, we will list the different Action Types available for you to use in WorkXpress.
Click here to read a full article on the WX Logic Layer
Triggers Many different activities in WorkXpress can trigger logic. Examples of User-driven activities include saving a page or layout, opening a page and clicking on a link or mouseing over a field. System driven activities include validating a Field and arriving at a previously scheduled time.
Like a Procedural LanguageA procedure results from any trigger. A procedure is simply a series of instructions (Actions) that can progress linearly.
Like a Declarative LanguageIn a procedure, any time that an Action operates on another building block, it invokes the Actions associated with that building block. In other word, each building block is treated as an object, and operating on that block invokes the logic associated with that object. For example, if an Action saves a value into a Field, that Field may in turn have Actions that run whenever it is updated. The procedure will reveal that this declaration has occurred, and will show the Fields update actions in the tree.
Like Code - FunctionsThere are many aspects of WorkXpress that are conceptually similar to writing code. Mentioned above is triggers, procedures and declarations. Mentioned elsewhere are concepts like data layer, presentation layer and logic layer. And still elsewhere a Query Language is discussed. The WorkXpress Expression Builder empowers you to query data and operate on that data using functions and formula’s, just like you would in a scripting language.
Like Threading –
Schedules and QueuesAny action can be queued (moved to a new thread and processed in the background) or scheduled (moved to a new thread to be processed at a later time). In each case, you may set a priority with which resources are assigned to processing the thread.
Like Commenting Out
– Enable and DisableAny action can be disabled and later enabled. Disabling an action causes it’s appearance to fade out to gray in the procedure. At runtime, that Action will be skipped.
-

Block Association
Show Technical DetailsBlock Association is the tie that binds all WorkXpress Blocks to each other and enables them to work together. There are permanent, global Block Associations and temporary, local ones. First, all Blocks are permanently associated with either an Item Type or Relationship--this defines an application's structure. Second, Layouts and Fields can permanently nest inside of Layouts to create your interface. Third, Actions can permanently nest inside of Actions to create logic. Finally, at any point in time, a Layout, Field, or Action will temporarily be "about" a particular Item in the database, to give context.
Introduction:
- Block Association makes WorkXpress unique and powerful as an application development tool. It's the glue that connects all WorkXpress Blocks to each other.
- Permanent Block Associations define the application's structure.
- Temporary Block Associations give the interface and logic "context", which helps the application to interact with the database at a point in time.
Permanent (Global) Block Associations
Item Type or Relationship Type AssociationThe most basic type of all Associations, this defines your application structure. At the topmost level, an application is a group of Item Types. These Item Types may have associated Relationship Types. Collectively, all other Blocks in WorkXpress then are associated ultimately with an Item Type. Therefore, an "application" is defined as a set of Item Types and all their associated Blocks.
When searching for Blocks in the build tools, you will tend to find them by first beginning your search on a particular Item Type or Relationship Type, and viewing their associated Blocks.
This choice of Association also effects data backup and restoration.
Blocks with permanent Item Type Association only: Relationships
Blocks with permanent Item Type or Relationship Type Association: Layouts, Fields, Actions
Layout AssociationTo build an interface you must nest Layouts and Fields inside of other Layouts. This nesting generates Layout Association.
Blocks with permanent Layout Association: Layouts, Fields
Action AssociationTo build a logic model (aka business rules, scripting, etc.) you must nest Actions inside of other Actions within a procedure.
Blocks with permanent Action Assocation: Actions
Global and Local Actions
Actions may be associated with an event and block globally, or they may be associated locally. A "Global Action" exists everywhere and every time the Action's parent Block undergoes that same event. A "Local Action", however, only exists when the Action's parent block undergoes this specific event, in this context. In this case though, context refers to the context of the triggering Block within the interface, not the Item context. This is a unique kind of context.
In other words, although a Field may trigger a local Action when it is saved from within one Layout, it will not trigger that same local Action when it is saved from within a different Layout. In both cases, however, its global save Actions will be triggered from either Layout.
For example, for a certain Field, Action A is global to its "Field Save" event for all pages and Action B is local to its "Field Save" event for a specific page. Later, that same Field is added to a new page. When that new page is saved, Action A will fire, but Action B will not exist at all on that page (in that unique context).
Item Association and Context
An Action is always associated with the building block for whom it is a "local" or "global" action (see below). Placing an Action in the Action Manager will result in that Action being associated with an Item Type based on where it is placed. Actions may be associated with Layouts, Fields, Items, or Relationships.
Similarly, an Action typically requires context to function properly. That context comes from the Block for whom this Action Manager Tool was opened and may not be the same Block for which this Action is a local or global Action. Context and Item Association for an Action may be different.
Further, some Actions can change the context. For example, when a list of Items is passed into an Action Manager from a "Mass Action" button in Layout Type - List, the context is each of the Items passed. However if they pass through a "foreach" control structure, the subsequent context passed to subordinate action is that of a single one of the Items in the list, changing each time the loop is repeated.
Temporary (Local) Block Association
Temporary Item Association (Context)At any given time, what is the page you are on "about"? If the page is about a company, then the context of that page is the specific company it is displaying (e.g. "Acme Company", where Acme Company is an "Item" in the database of "Type" Company). Any Fields or Actions need to be about that specific item and not some other item (i.e. about "Acme company and not some other company), so those Fields or Actions need to be provided with this context. For a much more detailed examination of this concept, which is critical to successfully building applications with WorkXpress, please see our lesson about Context.
If the page is about a specific Item of Type: User...for example the "current user"...then perhaps it is about you? When the page displays data, it needs to display that data about you. When Actions on the page shoot off an email notifying of a change to username, it needs to shoot that email to you, not to some other User. YOU are an Item in the database of Type User, and are also the context in this second example.
Context then is the specific Item (Not Item Type) in the database which the current Layout, Field or Action is displaying data about.
Blocks with temporary Item Association: Layouts, Fields, Actions
-

Automations
Show Technical DetailsAutomations
Creating Actions does not create any automations. Conversely, Actions may be created by the automations of other Building Blocks.
-

Configuration
Show Technical DetailsCreation
Creating an Action refers to the act of adding an Action of some type into an application.
How to Create
There is only one way to create an Action. First, navigate to the Application Manager Tool, probably by clicking an available Layout or Field Block in the Application Workspace. Second, click on the Block representing any event; on its flyout menu, choose "Add an Action" (or add evalution, or add foreach, etc.).
At this point, you may use the linked select boxes to choose the Action Type. Each time you change the Action Type, the settings for that Action Type will reload. By adjusting the settings and choosing the save button, the Action will be created and properly placed into the context of current events.
Wizard Questions
Actions do not have wizard questions.
How to Edit
All Action settings are accessed simply by editing the Action itself, inline, in the Action Manager tool. Click on any Action, and then click on the edit wrench associated with the "edit action" menu choice.
Settings vary based on Action Type. Please see each individual Action Type for a detailed description of its settings.




