+

Search Tips   |   Advanced Search

AssemblyLine Simulation Mode

AssemblyLines can be debugged without actually exchanging data with connected systems using the AssemblyLine Simulation Mode. When an AssemblyLine has been started in this mode all AssemblyLine Components which potentially could cause changes in the target systems will be skipped.

This implies that the AL executes normally, but Connectors in Update, Delta, Delete and AddOnly Mode do not perform the actual operation.

Note: An AssemblyLine run this way can only approximate what would happen in normal mode; in many cases the very fact that a connected system does not receive any updates in Simulation Mode may cause your business logic to behave differently, negating the usefulness of the simulation.

The simulation state should not to be confused with the state of a component. The component’s state has higher priority than the component’s simulation state.

The component’s state has two values – Enabled or Disabled. If the component is in Enabled state then it will initialize and its simulation state will be checked when the appropriate operation is called. When the state is set to Disabled then no check for the simulation state will be made since no operation will be called, and the component’s initialization will not be called.

Connectors and FCs have another state called Passive. When their state is set to Passive then they only will be initialized. Their operations can be executed only via a user script. When their specific operation is called then the simulation state is checked. There are a number of ways in which an AssemblyLine can be started in Simulation Mode:

In order to run an AssemblyLine in Simulate Mode, a new configuration is created. It is a child of the AssemblyLine Config. This configuration object contains parameters that configure the connection to an AL that will be used as a Proxy AssemblyLine (ProxyAL). The SimulationConfig object has a method that creates or updates a template of a ProxyAL based on the components’ states of the AssemblyLine that is being simulated. The SimulateConfig object also contains all the hooks defined for Components that are in Scripted simulation state. The name of each hook is the same as the name of the component in Scripted simulation state. It also contains the simulation state for each component.

AssemblyLines to be run in Simulation Mode can be configured in more detail; relevant settings can be configured by selecting AssemblyLine Settings > Simulation Settings in the AssemblyLine Editor window. Simulation Settings window

The configuration of the simulation states for each component is done using the Simulation Settings dialog box. This dialog box configures the ProxyAL to be used by the components which simulation state is set to ProxyAL. When you click Update Proxy AssemblyLine the Config Editor will either create a new ProxyAL in the current project or will update an existing Proxy AssemblyLine. The created or updated ProxyAL is provided as a template and its structure is based on the configuration you have done in the Simulation Settings dialog box. Note that in this process only the name of the Proxy AssemblyLine is taken into account. The Server Name and Config ID are taken into account during the execution of the Simulated AssemblyLine. If there is already an existing AssemblyLine with the name specified in the dialog box, then only new branches will be added and no old branches will be modified or removed. This is because some of them can contain a user-specific configuration. Individual components in the AssemblyLine can be set to one of the following states:

You have the ability to check whether the AL is simulating and also to switch simulation on and off using the following methods:

You have the ability to check the state of each component, and to set it dynamically by using the following methods:

Note: Only Connectors and FCs have the full set of simulation states as described above, the remaining components (and Connectors in Server mode) have only Enabled and Disabled states. Security Directory Integrator considers some FCs safe and their default simulation state will be Enabled, that is by default they will not simulate and will execute as usual; these are all FCs that are unable to change a target system since they simply do not connect to any. The list of safe FCs is as follows:

Attention: You still can cause changes to underlying datasystems by explicit coding; this is out of scope of the Simulation Mode.

Any remaining FCs not listed here are considered potentially unsafe and their default simulate state will be set to Simulated.


Parent topic:

Debugging features in SDI