extract

You can use the command option to create a text file by copying the item definitions from the database.

Overview

You can configure the command line syntax with different parameters to create specific item definitions. You can either use create or extract commands to copy the item definitions. You must have display access to the items being copied and modify access, if you want to use the ;lock keyword.
Note: When you extract an existing item definition, the ID’s associated with the definitions are not copied as it is unique for each item. Therefore the noid option does not have an impact when used with the extract command.

Syntax and command line options

You must provide at least one scheduling or security item and the filename with the command to perform the action. The ;lock parameter is optional.
ocli model create | cr | extract | ext filename from Scheduling or Security item [;lock]
For the list of scheduling or security parameters that you can use and the format that needs to be followed, see the tables below.
filename
Specify the name of the file you want to use to save the item definition.
Scheduling and Security items

You can specify any one of the item from the following tables:

Table 1. Scheduling items
Scheduling items Description
calendars | calendar | cal [folder/]calname You can specify the name of the calendar and optionally, the folder in which the calendar is defined. Otherwise use wildcard characters to copy all the calendar definitions into the file.
eso | eventsource | so [folder/]eventsourcename You can specify the name of the event source and optionally, the folder in which the event source is defined. If you do not specify the eventsourcename, all the event source definitions are copied into the file. Wildcard characters are permitted.
folder | fol foldername You can specify the name of the folder. If you do not provide the foldername, all the folder definitions are copied into the file. Wildcard characters are permitted.
parms | parm | variable | vb [[folder/]tablename.]variablename You must provide the [[folder/]tablename.]variablename to copy a specific variable within a specific table. If you specify the variablename only, the variable definition in the default variable is displayed. If you do not provide the [[folder/]tablename.]variablename, all the global variable definitions in the default variable table are copied into the file. Wildcard characters are permitted on both [folder/]tablename and variablename.
jobs | jobdefinition | jd [[folder/]workstationame#][folder/]jobname If you provide a specific jobname only that particular task definition is copied and if not, all the task definitions are copied into the file. You can provide [folder/]workstationame#] and the folder in which the task is defined to make the selection more specific. Wildcard characters are permitted.
jobstream | js | sched [[folder/]workstationame#][folder/]jstreamname[valid from date|valid to date|valid in date][;full]] If you provide a specific jstreamname only that particular workflow definition is copied and if not, all the workflow definitions are copied into the file. You can provide [folder/]workstationame#] and the folder in which the workflow is defined to make the selection more specific. Wildcard characters are permitted. You can also add the options below to provide more details of the workflow.

valid from date: You can specify a date which will restrict the selection of workflow, that have a valid from date equal to the value specified. The format is mm/dd/yyyy.

valid to date: You can specify a date which will restrict the selection of workflows, that have a valid to date equal to the value specified. The format is mm/dd/yyyy.

valid in date: Specify the time frame at which the task is run. You can specify one of the dates as @. The format is mm/dd/yyyy-mm/dd/yyyy.

full: If you add the option, all the task definitions in the workflow are displayed.

resource | res [[/workstationfolder/workstationname#/foldername/resourcename] | [workstationname#/foldername/resourcename] | [/foldername/resourcename] | resourcename Enter the resource key to copy a specific definition or use wildcard characters to copy all the resource definitions at the same time. If the resource is defined in the root folder, specify only the name of the resource. Otherwise add the resource key that contains the workstation name and folder name.
user | credential | cred [[folder/]workstationame#]username [;password] You must specify the username from which the user definitions are copied to the file. You can provide [folder/]workstationame#] and the folder in which the user is defined, to make the selection more specific. Wildcard characters are permitted.
vartable | vt [folder/]tablename You can specify the name of the variable table and optionally, you can provide the folder in which the variable table is defined. If you do not specify the tablename and add wildcard characters, all the variable table definitions are copied into the file. Wildcard characters are permitted.
workstation | ws | cpu [folder/]workstationame] You can specify the name of the workstation or workstation class or domain and optionally, you can provide the folder in which these items are located. Wildcard characters are permitted.
Table 2. Security items
Security items Description
accesscontrollist | acl foldername|F+foldername|A+ADMIN If you specify the foldername|F+foldername|A+ADMIN, the access control list definition for that particular folder is copied and if not, the access control list definitions for all the folders are copied into the file. Wildcard characters are permitted.

foldername|F+foldername: You can specify the option if you want to filter out the lists that are associated with a folder. The security roles are valid, only for the items available in the folder.

A+ADMIN: You can specify this option, if you want to filter out the lists that allows specific permissions on API keys (that are not defined in folders) and on agent registration action.

securityrole | srol securityrolename If you specify the securityrolename, the security role definition for that particular security role is copied and if not, the security role definitions for all the security roles are copied into the file. Wildcard characters are permitted.
Table 3. Item
Items Description
aiagent aiagent_name If you specify the aiagent_name, the definition for that particular AI agent is copied and if not, the definitions for all the AI agents are copied into the file. Wildcard characters are permitted.
lock

You can use the option to lock the selected items. If the selected items are locked by any other user, you cannot copy the definitions into the file.

Note: You can also extract all scheduling and security item definitions for which you have required permissions (see Access required to run Orchestration CLI commands) with a single command. For more information, see Managing multiple items in a folder.

Examples

  1. Run the following command to create the file calperm with all calendars defined in the database:
    ocli model create calperm from calendars=@
  2. Run the following command to create the file store with all workflows defined in the database:
    ocli model cr store from jobstream=@
  3. Run the following command to create the file mainvid.txt with the definition of user rorshar of workstation serv2356, including the encrypted password:
    ocli model extract c:\mainvid.txt from user=serv2356#rorshar;password
    The contents of file mainvid.txt will be:
    USERNAME rorshar
      PASSWORD "ENCRYPT:EIu7PP+gvS8="
    END