Work Queue Commands

A command is an action that can be executed on a work queue message. It can be either a built-in action (move to queue, change record’s value) or a custom action based on a sequential workflow.

Command definition can be configured for a class in the Commands tab in the WorkQueuesConfiguration screen section (Konfigurace front zpráv) with the following fields:

Field name Data type Description
Order Int Order of autoprocessing, see Autoprocess field for more details
Text String Caption of command to be shown to the users
Type enum, one of QueueCommand, Remove, Archive To Queue, Execute Queue Loader, Move To Queue, Run Notifications and Status Change Type of the command.
Command String Name of the model element to be triggererd. Valid for Type QueueCommand
Parametr 1 String Value to be send to the workflow command as Parameter1. For each command type it has a different meaning. Parameter is sent as-is, so ti’s a constant value.
Parameter 2 String Value to be send to the the workflow command as Parameter2. For each command type it has a different meaning. Parameter is sent as-is, so ti’s a constant value.
Roles String List of Application Roles capable to view and run the command in a standard Origam format
Autoprocess Bool If at least one command is checked, the queue messages will be autoprocessed. Each message is autoprocessd by all the commands that are checked by this in the ascending order of Order column. All the commands are processed in one database transaction. It’s necessary to ensure, that the command or group of commands beeing part of autoprocessing must manage the message to dissapear from the queue, or fail. Otherwise, the processing of message will loop indefinitely
Autoprocess With Errors Bool Normally, failed messages aren’t autprocessed. This behaviour can be overriden. It’s very dangerous to use, because the processing must not fail. Otherwise, the processing of message will loop indefinitely
Default Bool If checked, the command can be triggered by doubleclicking the row or pressing enter instead of click on the command button
Error Queue Guid (reference to other work queue) Optional, If defined, the message is moved to the queue defined here in case of error during processing the message (both automatic or manual)
Autoprocessing Condition String Xpath being evaluated over a context store of current work queue entry loaded as a work queue datastructure (defined in the WorkQueueClass model element). The datastructure name typically begins with WQ_. XPath is triggered from the position /ROOT/WorkQueueEntry. So an exapmple of xpath woud be.: @Quantity > 0. Warning: Once you decide to use Autoprocess condition it is necessary to ensure, that the workqueue entry is processed by some command and is being managed to disappear from the queue. So, for our example, it’s necessary to define a command with Autoprocess condition set to @Quantity <= 0, or without any condition, otherwise the whole work queue processing stucks indefinitely on the message with Quantity <= 0