Graph automation reference
A Graph visually coordinates Objects, Queries, and Variables. Use it for multi-step automation with branches, waits, timeouts, and breakpoint validation.
When to use this page
- You are unsure whether a requirement belongs in a Page method, Graph, or C# Script.
- Node ports do not connect, or Build reports a type, reference, or parameter error.
- You need a wait, timeout, operator confirmation, or error-recovery path.
- Debug does not pause at the intended breakpoint, or you are unsure what to do after it pauses.
- A change is saved, but the runtime still executes the old workflow.
Entry point and core objects
Create or open a Graph under Resources → Graphs. Drag an Object from the Object tree to create a call node, or use the canvas context menu to choose a node from the insert menu.
| Object | Purpose |
|---|---|
| Method | A callable Graph entry point; one Graph can have several methods |
| Control port | Execution order, including the branch that follows a completed step |
| Value port | A string, number, Boolean, object, or structured value passed between nodes |
| Breakpoint | A location where Debug pauses before the selected node |
| Graph Variable | Temporary state owned by one Graph instance |
After a Graph is bound to an Object, its methods extend that Object and can be called by a Page, another Graph, or the runtime lifecycle.
Node reference
| Node | Purpose |
|---|---|
| Method | Define entry parameters, return values, and the first execution step |
| Function | Call an Object or standard-library method |
| Query | Call an HTTP Query defined in App Settings |
| If / Switch | Select a branch from a condition or value |
| Foreach | Process each item of a collection in order |
| Concurrent | Run several branches concurrently and continue after all finish |
| Get Variable / Set Variable | Read or write a Graph, App, or Saved Variable |
| Wait Until | Recheck a condition with separate Success and Timeout outputs |
| Confirm | Wait for an operator to confirm, cancel, or time out on a runtime page |
| Subgraph | Call another Graph method on the same Object |
A control port means “what runs next.” A value port means “where this input comes from.” Connected types must match. Set a default in node Properties when appropriate instead of forcing an incompatible connection.
When should you use a Graph?
| Requirement | Recommended location |
|---|---|
| One button calls one Object method and shows a message | Page Flow method |
| Multi-step equipment order, branch, wait, timeout, and recovery | Graph |
| Protocol, complex algorithm, or equipment capability missing from the standard library | An Object method in a C# Script, called by a Graph |
| Screen layout, display formatting, and navigation | Page / Component |
Wrap stable actions in domain-oriented Object methods such as Home or Read barcode. A Graph coordinates those capabilities and should not repeat low-level addresses or protocols.
Variable scope
| Scope | Defined in | Lifetime |
|---|---|---|
| graph | Current Graph properties | Isolated per Graph instance; use for temporary workflow values |
| app | App Settings → Variables | Shared across Pages and Graphs in the current loaded runtime; starts from its initial value after reload or redeployment |
| saved | App Settings → Variables | Current value is kept by the Runtime target across restarts |
Choose an explicit scope and Variable in Get Variable or Set Variable. Do not use a Graph Variable for a parameter that must survive an App restart.
Waits, timeouts, and lifecycle
- Every site wait needs an explicit completion condition and an acceptable timeout policy.
- Connect Wait Until Success to the normal path and Timeout to alarm, retry, cancel, or safe stop. Do not leave Timeout unhandled when an infinite wait is unacceptable.
- Confirm waits for a runtime-page response. When several clients are open, only the first valid response is applied.
- Use Object-bound
Initfor startup preparation andDisposefor shutdown cleanup. Updateis part of the periodic scan path. Keep its work short and bounded. Put long waits or external I/O in asynchronous Object methods or an explicit state workflow.
Build and Debug
A saved Graph must produce valid build outputs. An explicit Build finds problems before startup. Start and Debug also prepare and deploy the current runtime package as needed.
Debug workflow:
- Set a Breakpoint on a node you need to observe.
- Confirm that the App is stopped and the correct Runtime target is selected.
- Select Debug.
- When the breakpoint is reached, the status becomes Paused and the Graph locates the current node.
- Inspect Variables, Object state, Problems, and Console, then choose Continue or Stop.
- Stop before changing the workflow. Paused still occupies the runtime and does not allow a new Build.
Key rules
- A Graph owns workflow, not screen layout or device protocol.
- Queries come from App Settings. Do not duplicate URLs, authentication, or request bodies inside a Graph.
- Object, method, Variable, and Query references must resolve to real resources in the current App.
- Every error, cancel, and timeout path needs an explicit result.
- Theseus does not replace the live Object tree while the App is Running, Debugging, Paused, Starting, or Stopping.
- Save success is not Build success, and Build success is not site acceptance.
How to validate
- After Save, check Problems for missing ports, type mismatches, and invalid references.
- Run Build and resolve every blocking diagnostic.
- Use Debug with simulated Objects or in a safe test environment first.
- Test the normal condition, False branch, Timeout, cancellation, and equipment error separately.
- Confirm that Pause, Continue, and Stop converge to the expected state.
- Perform a low-risk trial on real equipment only under the approved site test plan.