Open Document/Program

This action provides an interface with an external application and opens it using a command-line.

External applications can execute additional processing and provide result back to the Loftware. This action allows it to bind with any 3rd party software that can execute some additional data processing, or acquire data. External software can provide data response by saving it to file, from where you can read it into variables.

You can feed the value of variable(s) to the program by listing them in the command-line in square brackets.

C:\Applications\Processing.exe [variable1] [variable2]

UUID-5d28e5a1-7881-3792-3aca-f065586a3897.png

Note

If you use this action in Loftware solutions, it allows you to open web pages or create email messages directly from your forms. See section Creating hyperlinks and sending emails on form in Loftware user guide.

About group identifies the selected action.

  • Name: allows you to define a custom action name. This makes actions easily recognizable on the solution's list of actions. By default, the action name is taken from its type.
  • Description: custom information about the action. Enter a description to explain the purpose and role of action in a solution.
  • Action type: read-only information about the selected action type.

File group defines the file to be opened.

  • File name: location and file name of the file or application to be opened.

    The selected file name can be hard-coded, and the same file is going to be used every time. If only a file name without path is defined, the folder with Loftware Automation configuration file (.MISX) is used. You can use a relative reference to the file name, in which the folder with .MISX file is used as the root folder.

    Data source: enables variable file name. Select a variable that contains the path and/or file name or combine several variables that create the file name. For more information see section Using Compound Values in Loftware Automation User Guide.

    Note

    Use UNC syntax for network resources. For more information, see section Access to Network Shared Resources in Loftware Automation User Guide.

Execution Options group sets program opening details.

  • Hide window: renders the window of the opened program invisible. Because Loftware is run as a service application within its own session, it cannot interact with desktop, even if it runs with the privileges of the currently logged user. Microsoft has prevented this interaction in Windows Vista and newer operating systems for security reasons.

  • Wait for completion: specifies for action execution to wait for this action to be completed before continuing with the next scheduled action.

    Tip

    Enable this option if the action that follows depends on the result of the external application.

Action Execution and Error Handling

Each action can be set as a conditional action. Conditional actions only run when the defined conditions allow them to be run. To define these conditions, click Show execution and error handling options.

Execution options are:

  • Enabled: specifies if the action is enabled or disabled. Only enabled actions will execute. This functionality may be used while testing a form.
  • Condition: defines one-line programming expression that must provide a Boolean value (true or false). When the result of the expression is true, the action will execute. Condition offers a way to avoid executing actions every time.

Error handling options are:

  • Ignore failure: specifies whether an error should be ignored. If enabled, the execution of actions continues even if the current action fails.

    Note

    Nested actions that depend on the current action do not execute in case of a failure. The execution of actions continues with the next action on the same level as the current action. The error is logged but does not break the execution of the action.

  • Example

    At the end of printing, you might want to send the status update to an external application using the HTTP Request action. If the printing action fails, action processing stops. In order to execute the reporting even after the failed print action, the Print Label action must have the option Ignore failure enabled.

  • Save error to variable: allows you to select or create a variable to save the error to. The same cause of the error is also saved to internal variables ActionLastErrorId and ActionLastErrorDesc.