jcommit

submits commits a flow definition to Process Manager.

Synopsis

jcommit [-H] [-r [-v version]|-d] [-m "ver_comment"] [[[-T time_event] ...] [[-F "file_event"] ...] [[-p "proxy_event"] ...] [-C combination_type]] flow_file_name

jcommit [-H] [-r [-v version]|-d] [-m "ver_comment"] [-k] flow_file_name
jcommit -h|-V

Description

You use this command to submit commit a flow definition to Process Manager. When you submit commit the flow definition, you may specify the event that triggers the flow, if applicable. If you do not specify an event to trigger the flow, it requires a manual trigger. You must be the owner of the flow definition, or have Process Manager administrator authority to submit commit a flow definition.

Note: The flow definition may contain pre-defined events that trigger the flow. Use the -k option to preserve triggering events defined in the flow definition. If you do not use the use the-k option, when you submit commit this flow using the jcommit command, those events are overwritten by any specified in the command. If the flow definition contains triggering events, and you submit commit the flow definition without specifying a triggering event and do not use the -k option, those events are deleted from the definition that is submitted committed, and the flow definition requires a manual trigger.

Options

-H

Submits the flow definition on hold. No automatic events can trigger this definition until it has been explicitly released. Use this option when the flow definition is complete, but you are not yet ready to start running flows on its defined schedule. When a definition is on hold, it can still be triggered manually, such as for testing purposes.

Commits the flow definition on hold, with event triggers disabled. No automatic events can submit this definition until it has been explicitly released and event triggers enabled. Use this option when the flow definition is complete, but you are not yet ready to start running flows on its defined schedule. When a definition is on hold, it can still be submitted manually, such as for testing purposes.

-r [-v version]

Replace. If a flow definition with the same name already exists in Process Manager, replace it with the definition being committedsubmitted. Use -v to assign a version number to the flow definition being committedsubmitted. If you do not assign a version number, a version number is automatically assigned incremental to the last version number.

If you do not specify -r and the flow definition already exists, commitsubmission fails.

-d

Duplicate. Specifies that, if a flow definition with the same name already exists in Process Manager, a unique number is appended to the flow definition name to make it unique. The new name of the flow definition is displayed in the confirmation message when the flow definition is successfully committedsubmitted.

-m "ver_comment"

CommitSubmit the flow with version comments. A flow version number is returned after each successful commitsubmission.

-T time_event

Overwrites time events specified in the flow definition. Specifies to automatically triggersubmit a flow when the specified time events are true. Specify the time event in the following format:

[cal_name[@username]:]hour:minute[%duration]][#occurences][+time_zone_id]

Note: You can find a list of valid time zone IDs in JS_HOME/JS_VERSION/resources/timezones.properties.
cal_name

Specify the name of an existing calendar, which is used to calculate the days on which the flow runs. If you do not specify a calendar name, it defaults to Daily@Sys. If you do not specify a user name, the commitsubmission user user name is assumed. Therefore, the calendar must exist under that user name.

hour:minute

Specify the time within each calendar day that the time event begins. You can specify the time in the following formats:

  • hour:minutes, for example, 13:30 for 1:30 p.m. You can also specify the wildcard character * in the hour or minutes fields to indicate every hour or every minute, respectively.

  • A list of hours, separated by commas, for example, 5,12,23 for 5:00 a.m., noon and 11:00 p.m.

  • A range of numbers—for example, 14-17 for on the hour, every hour from 2:00 p.m. to 5:00 p.m.

The value you specify for hour must be a number between 0 and 23. The value for minute must be a number between 0 and 59. All numbers are values in the 24-hour clock.

%duration

Specify the number of minutes for which the time event should remain valid after it becomes true. After the duration expires, the event can no longer trigger any activity. The default duration is 1 minute. The minimum duration you can specify is also 1 minute.

-F "file_event"

Overwrites file events specified in the flow definition. Specifies to automatically triggersubmit a flow when the specified file events are true.

When specifying the file name, you can also specify wildcard characters: * to represent a string or ? to represent a single character. For example, a*.dat* matches abc.dat, another.dat and abc.dat23. S??day* matches Satdays.tar and Sundays.dat. *e matches smile.

Note:

There are some differences between UNIX™ and Windows™ when using wildcard characters. Because UNIX is case-sensitive and Windows is not, if you specify A*, on UNIX it matches only files beginning with A. On Windows, it matches files beginning with A and a. Also, on UNIX, if you specify ??, it matches exactly two characters. On Windows, it matches one or two characters. These behaviors are consistent with UNIX ls command behavior, and Windows dir command behavior.

Specify the file event in one of the following formats:

arrival(file_location)

TriggerSubmit a flow when the specified file arrives in the specified location, and subsequently only if the file is deleted and arrives again. This option looks for a transition from nonexistence of the file to existence. When the file is on a shared file system, specify the file location in the following format:

absolute_directory/filename

exist(file_location)

TriggerSubmit a flow if the specified file exists in the specified location, and continue to triggersubmit the flow every time the test for the file is performed, as long as the file continues to exist. When the file is on a shared file system, specify the file location in the following format:

absolute_directory/filename

! exist(file_location)

TriggerSubmit a flow if the specified file does not exist in the specified location, and continue to triggersubmit the flow every time the test for the file is performed, as long as the file does not exist. When the file is on a shared file system, specify the file location in the following format:

absolute_directory/filename

size(file_location) operator size

TriggerSubmit a flow when the size of the file meets the criteria specified with operator and size. When the file is on a shared file system, specify the file location in the following format:

absolute_directory/filename

Valid values for operator are: >, <, >=,

<=, == and !=.

Note:

For csh, if you specify != (not equal), you need to precede the operator with a backslash escape character

Specify the size in bytes.

age(file_location) operator age

Trigger a flow when the age of the file meets the criteria specified with operator and age.

When the file is on a shared file system, specify the file location in the following format:

absolute_directory/filename

Valid values for operator are: >, <, >=, <=, == and !=.

Note:

For csh, if you specify != (not equal), you need to precede the operator with a backslash escape character.

Specify the age in minutes.

-p "proxy_event"

Overwrites proxy events specified in the flow definition. Specifies to automatically triggersubmit a flow when the specified proxy event is true.

Specify the proxy event in one the following formats:

job(exit|done|start|end(user_name:flow_name:[subflow_name:]job_name) [operator value])

TriggerSubmit a flow when the specified job meets the specified condition. You must specify the user name to fully qualify the flow containing the job. You only specify a subflow name if the job is contained within a subflow.

Valid operators are >=, >, <=, <, != and ==.

If you are specifying exit codes, you can specify multiple exit codes when using the operators != and ==. Separate the exit codes with spaces, and specify a number from 0 to 255.

Note:

For csh, if you specify != (not equal), you need to precede the operator with a backslash escape character.

  • Example: on successful completion of J1:

    -p "job(done(jdoe:myflow:J1))"

  • Example: if payjob exits with an exit code greater than 5:

    -p "job(exit(jdoe:myflow:testflow:payjob)>5)"

  • Example: if payjob ends with any of the following exit codes: 5, 10, 12, or 14:

    -p "job(exit(jdoe:myflow:testflow:payjob)==5 10 12 14)"

  • Example: if payjob does NOT end with any of the following exit codes: 7, 9, 11:

    -p "job(exit(jdoe:myflow:testflow:payjob)!=7 9 11)"

jobarray(exit|done|end|numdone|numexit|numend|numstart (user_name:flow_name:[subflow_name:] job_array_name )[operator value])

TriggerSubmit a flow when the specified job array meets the specified condition. You must specify the user name to fully qualify the flow containing the job array. You only specify a subflow name if the job array is contained within a subflow.

Valid operators are >=, >, <=, <, != and ==.

  • Example: on successful completion of all jobs in Array1:

    -p "jobarray(done(jdoe:myflow:Array1))"

  • Example: if arrayjob exits with an exit code greater than 5:

    -p "jobarray(exit(jdoe:myflow:testflow:arrayjob)>5)"

  • Example: if more than 3 jobs in A1 exit:

    -p "jobarray(numexit(jdoe:myflow:testflow:arrayjob)>3)"

flow(exit|done|end|numdone|numexit|numstart(user_name: flow_name:[subflow_name])[operator value])

TriggerSubmit a flow when the specified flow or subflow meets the specified condition. You must specify the user name to fully qualify the flow. Specify a subflow name if applicable.

Valid operators are >=, >, <=, <, !=, ==.

Example: on successful completion of all jobs in myflow:

-p "flow(done(jdoe:myflow))"

Example: if myflow exits with an exit code greater than 5:

-p "flow(exit(jdoe:myflow)>5)"

Example: if more than 3 jobs in the subflow testflow exit:

-p "flow(numexit(jdoe:myflow:testflow)>3)"

Note: When Process Manager calculates the number of jobs in a flow, for successful jobs, failed jobs, and so on, it does not count the jobs in a subflow, and it counts a job array as a single job. It also does not count other objects in the flow, such as events or alarms.

-C combination_type
Overwrites combination events specified in the flow definition. When multiple events are specified, the combination type specifies whether one event is sufficient to triggersubmit a flow, or if all of the events must be true to triggersubmit it. The default is all.
AND

Specifies that all events must be true before a flow is triggeredsubmitted. This is the default.

OR

Specifies that a flow will triggersubmit when any event is true.

-k

Use the triggering events defined in the flow definition. If you do not specify this option, you can overwrite triggering events defined in the flow definition with the options -T, -F, -p, -C.

flow_file_name

Specifies the name of the file containing the flow definition.

-h

Prints the command usage to stderr and exits.

-V

Prints the Process Manager release version to stderr and exits.

Examples

jsub -r -T "Weekends@Sys:0-8:30%30" -F "exists(/tmp/1.dat)" -C 
AND myflow.xml

SubmitCommit the flow definition in myflow.xml, to be triggeredsubmitted when both of the following are true:

  • Saturdays and Sundays every hour on the half hour, beginning at midnight until 8:00 a.m.

  • The file /tmp/1.dat exists

    Any triggering information defined within the flow definition is overwritten. If this flow definition already exists, replace it.

    % jsub -d -F "size(/data/tmp.log) >3500000" -F "arrival(/tmp/1.dat)"
     -C OR backup.xml
    

    SubmitCommit the flow definition in backup.xml, to be triggeredsubmitted when one of the following is true:

  • The size of /data/tmp.log exceeds 3.5 MB

  • The file /tmp/1.dat arrives

    Any triggering information defined within the flow definition is overwritten. If this flow definition already exists, create a duplicate.