Advanced Customization > Info*Engine User’s Guide > Task Webject Reference > Message Webjects > Queue-Task
  
Queue-Task
Allows a subscriber of an Info*Engine task queue to add a task to the queue for execution. The task is built from a task execution name and if necessary one or more existing Info*Engine groups.
* 
This webject can be used only after your environment has been set up for queuing tasks.
SYNTAX
<ie:webject name=Queue-Task type="MSG">
  <ie:param name="CORRELATION_ID" data="message_selector"/>
  <ie:param name="DBUSER" data="username"/>
  <ie:param name="DESTINATION" data="queue_name"/>
  <ie:param name="GROUP_IN" data="group_name"/>
  <ie:param name="PASSWD" data="password"/>
  <ie:param name="PRIORITY" data="numeric_value"/>
  <ie:param name="QUEUE" data="queue_name"/>
  <ie:param name="RESULT_TIME_TO_LIVE" data="minutes"/>
  <ie:param name="TASK" data="task_uri"/>
  <ie:param name="TASK_TIME_TO_LIVE" data="minutes"/>
</ie:webject>
PARAMETERS
Required
Select
Optional
TASK
CORRELATION_ID
DBUSER
SERVICE
DESTINATION
GROUP_IN
PASSWD
PRIORITY
QUEUE
RESULT_TIME_TO_LIVE
TASK_TIME_TO_LIVE
CORRELATION_ID
Specifies a JMS message selector to set as the JMS header correlation identifier of the result. The value of this parameter can then be used as the value of the WHERE parameter of the Query-Results or Delete-Results webjects to select the corresponding result.
The default value of this parameter is derived from the auth-user HTTP header value found in the SERVER context group. If auth-user is not defined and no explicit correlation identifier is specified, no correlation identifier is associated with the task. In this case, the Info*Engine group returned from Query-Task returns the value of the correlation identifier that was associated with the task. This parameter is optional.
DESTINATION
The LDAP distinguished name of the queue where the response should be queued after the task is executed. The default for this parameter is to use the value specified in the com.infoengine.msg.defaultResponseQueue property. This parameter is optional.
DBUSER
The username to use when connecting to the MOM. If this parameter is specified, the parameter value takes precedence over any existing credentials mapping for the authenticated user, or any value specified in the .msg.username and .jms.username properties of the service that is used to connect to the MOM. For more information, see Credentials Mapping for MOMs.
If this parameter is omitted, the mapped credentials for the Info*Engine messaging software are used. If no such mapping is found, then the mapped credentials for the Java Messaging Service (JMS) are used. If neither of these mapped credentials are found, then the value set in the .msg.username property is used. If the .msg.username property is not set, then the value set in the .jms.username property is used. If neither property is set and you do not specify a value for this DBUSER parameter, Info*Engine does not specify a username when connecting to the MOM, and an anonymous connection is attempted. This parameter is optional.
SERVICE
The name of the Info*Engine property set that is configured for connectivity to a specific JMS service. This allows you to configure more than one JMS service per Info*Engine Virtual Machine (VM). This parameter is optional.
GROUP_IN
The name of a local VDB Info*Engine group object to attach to the task to be queued. The default behavior is that no group is attached. Multiple groups can be specified on this parameter. This parameter is optional.
PASSWD
The password to use when connecting to the MOM. If this parameter is specified, the parameter value takes precedence over existing credentials mapping for the authenticated user, or any value specified in the .msg.password and .jms.password properties of the service that is used to connect to the MOM.
If this parameter is omitted, the mapped credentials for the Info*Engine messaging software are used. If no such mapping is found, then the mapped credentials for the Java Messaging Service (JMS) are used. If neither such mapped credentials are found, then the value set in the .msg.password property is used. If the .msg.password property is not set, then the value set in the .jms.password property is used. If neither property is set and you do not specify a value for this PASSWD parameter, Info*Engine does not specify a password when connecting to the MOM. This parameter is optional.
PRIORITY
Specifies an integer priority to be set on the outgoing messages. The valid range for JMS Queue priorities is from 0 – 9, with 4 the typical default value. Priorities are ignored by Info*Engine, but can be used by third-party software receiving events sent by Info*Engine. The default for this parameter is not to set a priority which results in the message being queued with the MOM’s default priority. This parameter is optional.
QUEUE
The LDAP distinguished name of the queue where the task is to be placed. The default for this parameter is to use the value specified in the com.infoengine.msg.defaultExecutionQueue property. This parameter is optional.
RESULT_TIME_TO_LIVE
Indicates a numeric value specifying how long the results of a task execution should remain in the response queue before being discarded by the MOM. This parameter is specified as a numeric string in minutes. The default for this parameter is 0, in which case the MOM does not discard the response. This parameter is optional.
TASK
Specifies a URI that is the location of the XML task file for the listener on the EXECUTION_QUEUE to execute. The URI can be a relative or absolute URI:
Relative URIs reference files that reside under the root file system directory that is defined for the local Info*Engine task processor.
Absolute URIs reference files that reside in the local file system, reside on a remote HTTP server, or are referenced through an accessible LDAP directory.
For example URIs, see Specifying URIs and URLs.
This parameter is required.
* 
The URIs shown in this guide use the forward slash as the separator (/) in file paths even though the back slash (\) is the directory separator used on NT systems. Info*Engine correctly identifies all system URIs when you specify the forward slash. If you prefer to use the back slash for NT URIs, you must escape the back slash in the URI. This means that you enter two \\ for each \ in the URI.
TASK_TIME_TO_LIVE
Indicates a numeric value specifying how long the message should remain in the execution queue before it can be discarded by the MOM. This parameter is specified as a numeric string in minutes. The default for this parameter is 0, in which case the MOM does not discard the message. This parameter is optional.
EXAMPLE
The following example adds the specified task to the specified queue:
<%@page language="java" session="false"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:webject name="queue-task" type="MSG">
  <ie:param name="TASK" data="$(@FORM[]TASK[0])"
             default="/com/company/CreateGroup.xml"/>
  <ie:param name="QUEUE" data="$(@FORM[]QUEUE[0])"/>
  <ie:param name="TASK_TIME_TO_LIVE"
                                  data="$(@FORM[]TTTL[0])"/>
  <ie:param name="RESULT_TIME_TO_LIVE"
                                  data="$(@FORM[]RTTL[0])"/>
  <ie:param name="DESTINATION" data="$(@FORM[]DEST[0])"/>
  <ie:param name="CORRELATION_ID"
                                data="$(@FORM[]CORRID[0])"/>
  <ie:param name="PRIORITY" data="$(@FORM[]PRIORITY[])"/>
  <ie:param name="GROUP_OUT" data="myQueueResults"/>
</ie:webject>
To actually run this example you would need to provide a form where the TASK, QUEUE, TTTL, RTTL, DEST, CORRID, and PRIORITY variables are identified.