Create work order (optimcmd -workorder action=create)

Use the Create work order command to create a work order. The work order is created based on the properties in a specified text file.

Command structure

The following diagram indicates the structure of the command and its parameters.

Read syntax diagramSkip visual syntax diagram
>>-optimcmd--+- -workorder-+--action=-+-create-+--properties.txt-><
             '- -w---------'          '-c------'                   

Input

The following information can be entered with the command.

optimcmd
The optimcmd tool.
-workorder or -w
The Work order command.
action=create or action=c
Indicates that the command is to create a work order.
properties.txt
The name of the text file that specifies the initial properties of the work order. The text file must contain the following properties. Specify each property on a separate line of the text file.
wfID=workflow_id
The ID of the workflow that is to be used by the work order.
stated=initial_state
The ID of the initial state for the work order. Use the Display work order states command to view a list of all active states for the workflow, find the state with a name of NEW, and use the ID for that state here.
description=description
A short description of what the work order is to do. For example, Create a subset of customers.
priority=priority_id
The time in which the work order is to be completed. Valid priorities are:
  • Immediately
  • Within 8 Hours
  • Within 16 Hours
  • Within 24 Hours
  • Within 48 Hours
comments=comments
Additional information to add to the work order. This information is available to others who work with the work order.
createdBy=creator_id
The user ID of the user who is creating the work order.

Return codes

The following return codes can be received when you enter the command.

Return code Description
0 No errors.
4 The specified work order was not found.
8 The command was not formed correctly.
12 The command cannot connect with the connection manager. The connection manager is not active or there is no active network connection between the computer and the connection manager computer.


Feedback