Appearance
Action
Declaration
Action
Description
The Action object can be used to interact with a Flow Action while it is executing. This provides access to properties of the Action and allows some of the properties to be altered for the current execution.
You can access the Action object by referencing Action in script.
Usage
Among other things the following tasks can be achieved by working with the Action object
Identifying the current Trading Partner for an executing Action
Action.Partner returns a TFloTradingPartner object for the currently active Trading Partner.
Managing the steps to be executed by an Action - (Not) Cancelling subsequent Action Steps
The Action Steps to be executed by an Action can be controlled by setting, or clearing, the check-box "Execute next Action Step even if previous one is cancelled" (on the Action's Execution tab). If this has been set then the Action will not show as Cancelled in the Flow Logs - not even when all Action Steps were Cancelled nor when the StopExecution statement is called. The check-box corresponds to the Action.IgnoreCancel property and this can be set or cleared via script. For example, when it is wanted that a multi-Step Action show as Cancelled in the Logs, then the property could be cleared part way through the Action (at run-time) so that StopExecution will have full effect:
pascal
if (SampleDataSource.RecordCount = 0) then
begin
Action.IgnoreCancel := False;
StopExecution;
end;Managing the steps to be executed by an Action - (De-)Activating an Action Step
The Action Steps to be executed by an Action can be controlled at run-time by referencing the Action.Actions array, and setting or clearing the ItemActive property for a Step. See the Actions property for further information about ItemActive.
Using Trading Partners to process one source file multiple times
The list of Trading Partners that has been configured on an Action's Trading Partner tab can be referenced using the Action.Partners array. For example, a script can determine whether the currently active Trading Partner is the first to be processed, or the last, or somewhere in between. See the Partners property for more information about using it to process one source file multiple times..