Skip to main content

Batch Processing

Besides the client software, OpCon Deploy also provides batch processing capability by using the Batch.SMAOpConDeployClient.exe application. This application performs the following functions:

Batch Processing Functions

DEPLOY

  • Performs a deployment of a defined schedule or package

IMPORT

  • Performs an import of schedules or transformation rules into the OpCon Deploy repository from a source OpCon system

SIMULATE

  • Performs a deployment simulation of a schedule or package

INIT

  • Populates the OpCon Deploy repository from an existing production system.
    • All schedule definitions set to version 1 and a deployment record created, marking the version 1 deployment status as active and setting the definition as "Current in production"
    • This should only be used when setting up the OpCon Deploy environment from an existing OpCon production system

Batch Processing Arguments

The Batch.SMAOpConDeployClient.exe application supports the following arguments:

Batch Application Arguments

-a

  • Required argument that indicates the action to be performed
    • Supports DEPLOY, IMPORT, SIMULATE, and INIT

-bd

  • Optional argument that defines the schedule auto build days used with DEPLOY. When set to 0 and build days in advance set to 0, will reset the values

-bda

  • Optional argument that defines the schedule auto build days in advance used in DEPLOY. When set to 0 and build days set to 0, will reset the values

-d

  • Optional argument that defines the description to be added to the records generated by the batch action

-dd

  • Optional argument that defines the schedule auto delete days used with DEPLOY. When set to 0, will reset the value

-dno

  • Optional flag used with DEPLOY. Use of this flag indicates that the schedule definitions on the target system should not be overwritten

-id

  • Optional argument for IMPORT, that indicates the record id of the deployment record. This is used by the batch deployment process. If this is not present a new deployment record is created (Default 0)

-fw

  • An argument that defines the filename used with IMPORT or INIT for schedules.
    • The file consists of a list of schedule names to be imported into the OpCon Deploy repository

-p

  • Required argument that defines the password for the user in the -u argument. The password must be encrypted using the encryption tool provided by the Enterprise Manager

-pkg

  • An argument that defines the package name used with DEPLOY or SIMULATE

-s

  • Optional argument that defines the server name
    • For IMPORT or INIT, it is the name of the source OpCon system
    • For DEPLOY and SIMULATE, it is the name of the target OpCon system

-sap

  • (Optional) Used to indicate that if a SAP job is encountered, the SAP definition must be extracted / inserted (Default false)

-sub

  • (Optional) argument for IMPORT that is used to indicate that if sub-schedules are found in the schedules, the sub-schedules should also be included in the import process (Default false)

-t

  • Optional argument that defines any deployment level transformation rules to be included in the DEPLOY or SIMULATE function
    • The value consists of the record IDs separated by commas (e.g., 5,10,15)

-tf

  • An argument that defines the filename used with the IMPORT function for transformation rules
    • The file consists of a list of transformation rule files

-u

  • Required argument that defines the user performing the action
    • It must be a registered user in the repository
    • When performing the DEPLOY or SIMULATE functions, a check is made to determine if the user has the appropriate role to access the server defined in the -s argument

-v

  • Optional argument that defines the version of the schedule or package used with DEPLOY or SIMULATE

-w

  • An argument that defines the name of the schedule
Note

When performing an IMPORT function, either a workflow (-w), a filename for schedules (-fw), or a filename for transformation rules (-tf) argument must be present.

When a DEPLOY or SIMULATE function is being performed, either a workflow (-w) or a package (-pkg) argument must be present.

Also, when performing an INIT function, a filename (-fw) argument must be present.

When using batch processing to deploy schedules or packages, it should be understood that no checking is performed for the existence of the schedule/package or any mismatch between the existing schedule and the version in the previous deployment record. However, a backup of the definitions is made and stored in the current deployment record so that no data will be lost. It is recommended that before performing a batch deployment, a simulation is performed to determine if there could be any problems with the deployment.

Batch Processing Examples

The examples in this section show how the Batch.SMAOpConDeployClient.exe application can be used to perform DEPLOY, IMPORT, SIMULATE, or INIT functions.

Example One

In this example, the simulation of schedule DUP_TEST version 11 is performed by user "user1" for system OPC170-PROD, using Transformation Rules 5,12, and 17. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a SIMULATE -s OPC170-PROD -w “DUP_TEST” -v 11 -t 5, 12, 17 -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==

Example Two

In this example, the deployment of package PKG001 version 2 to system OPC170-PROD is performed by user "user1". Example:

C:\test\Batch.SMAOpConDeployClient.exe -a DEPLOY -s OPC170-PROD -pkg “PKG001” -v 2 -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==

Example Three

In this example, the deployment of schedule SCHED003 version 2 to system OPC170-PROD is performed by user “user1”, with schedule auto build 1 day in advance for 3 days, auto delete 10 days ago, and do not overwrite existing schedule definitions in target system. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a DEPLOY -s OPC170-PROD -u user1 -p lBsC5ohnSf2P7/Ku81FiGw== -w SCHED003 -v 2 -bda 1 -bd 3 -dd 10 -dno

Example Four

In this example, the import of schedule SCHED005 from system OPC170-DV1 is performed by user “user1”. If the schedule already exists, a new version will be created. If the schedule does not exist, an initial version will be created. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a IMPORT -s OPC170-DV1 -w “SCHED005” -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==

Example Five

In this example, the import of two schedules from system OPC170-DV1 is performed by user “user1” using definition in file C:\test\deploy\import.txt. The file contains two records, SCHEDEASE01 and SCHEDEASE02. Both schedules will be imported into the repository. If the schedules already exist, new versions will be created. If the schedules do not exist, an initial version will be created. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a IMPORT -s OPC170-DV1 -fw “C:\test\deploy\import.txt” -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==
File C:\test\deploy\import.txt contents

SCHEDEASE01

SCHEDEASE02

Example Six

In this example, the import of two transformation rule files is performed by user “user1” using definition in file C:\test\deploy\import_rules.txt. The file contains the full path and name of two transformation rule files, OPCONXPS_T-USERS.json and OPCONXPS_T-MACHINES.json. If the rules already exist, new versions will be created. If the rules do not exist, an initial version will be created. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a IMPORT -tf “C:\test\deploy\import_rules.txt” -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==
File C:\test\deploy\import_rules.txt contents
C:\test\deploy\transformations\OPCONXPS_T-USERS.json
C:\test\deploy\transformations\OPCONXPS_T-MACHINES.json

Example Seven

In this example, the OpCon Deploy repository is populated by user “user1” with schedules from the production system PROD. The list of schedule names can be extracted from the OpCon database using SQL Server Management Studio. Then the list of schedule names to be imported are inserted into the file import_schedules.txt. Example:

C:\test\Batch.SMAOpConDeployClient.exe -a INIT -s PROD -fw “C:\test\deploy\import_schedules.txt” -u user1 -p lBsC5ohnSf2P7/Ku81FiGw==