Tutorial: Setting CustomĀ TSR/ACK Names and Folders
This tutorial shows you how to set the TSR/ACK names andĀ folders.
RequiresĀ IWS version 1.0.1.254 or higher.
Ā
The workflow below was created for this tutorial. It contains objects of several levels.
Simple CSV to EagleML Data Transformation
This is a simple CSVĀ to EagleMLĀ data transformation processĀ wrapped into a subprocess envelope to make the workflow tree a bit more complicated for the purposes of this section:
To manage the TSR/ACK names and locations clickĀ the Settings tab andĀ click Workflow Settings.
A popup window should appear. Expand the tree to find the process you want to edit and customize the corresponding line of the process.
There are several columns:
1.Ā Workflows & Tasks āĀ illustrates the tree of all existingĀ tasks/subprocesses/processes/workflows. ItĀ is built using "parent-child" links.
2. TSR Name Prefix ā setsĀ the TSR name prefix for all tasks/subprocesses/processes, for which theĀ workflow in the line is parent.Ā Ā
Here you can customize your TSR reply messages names according to the following model:Ā
CorrelationID_workflow_name_subprocess_name_object_name_20141222_130130.xml Ā
Here is the breakdown of this model:Ā Ā Ā Ā
Black text = CorrelationID (will be set manually in the control message file later)
Red textĀ = the global workflow nameĀ (prefix on all TSR message)
Blue text = the sub-process name
Green textĀ = the component name
Light blue text = date and time stamp
For example, the settings:
tsr_ack_rename_demo to root_name
tsr_ack_name_loc_setting_demo_subprocess to sub_name
tsr_ack_translator toĀ obj_nametimestamp
eagle_ml-2-0_default_in_xml_reference toĀ default_name
will rename the TSR reply for the transformation processĀ as follows (date-timestamp may differ):
CorrelationID_root_name_sub_name.xml
CorrelationID_root_name_sub_name_obj_name.xml
CorrelationID_root_name_sub_name_ default_name _20141222_130130.xml
TheĀ keyword "timestamp" will be replaced by current date and time (format: yyyymmdd_hhmmss). ThisĀ keyword canĀ only be used onceĀ per aĀ TSR name. If it isĀ set more than once, only the last one setĀ will be processed andĀ the restĀ will be removed.
renames TSRs for the transform process to:
CorrelationID_root_name_sub_name_ obj_name_20141222_13013.xml
3. ACK Name Prefix - sets ACK name prefix for all tasks/subpocesses/processes, for which this workflow is parent (the logic is absolutelyĀ the same as for the TSR Name Prefix).
4. Custom TSR Location ā sets a custom TSR files location. E.g.: set "../../../cmw/reply/my_folder/" (relative path) value to put TSRs into the subfolder "my_folder" of the default "reply" folder.
5. Custom ACK Location ā sets a custom ACK files location. E.g.: set "../../../cmw/ack/my_folder/"Ā (relative path)Ā value to putĀ ACKsĀ into the subfolder "my_folder" of the default "ack" folder.
The following settings will create a new folder in "../../../cmw/" calledĀ "demo" (if it didn't exist before)Ā containing two separate subfolders for TSR and ACK messages:
6. TSR Name Case - sets TSR Name case for the TSR Name Pattern property. This property can beĀ usedĀ to support previous versions of TSR Name generating.
7. TSR Name Pattern - sets TSR Name Pattern. There is difference between TSR Prefix and TSR Pattern: if the pattern set, the prefix set will be ignored; TSR Pattern set is only a part of the TSR name.
8. Emails for Notifications - sets theĀ emails, to whichĀ Notifications should be sent. Use comma to set more than oneĀ email, for example: myemail@rr.ru, myemail2@tt.ru, myemail3@dd.com, etc.
If the TSR/ACK name is too long, it will be cut and the result TSR/ACK name turns into: "corrID_cut_[task_name]timestamp.xml".
To reset the TSR/ACK names and locations to defaultsĀ click the Reset & Save button.
After your preferences are set click theĀ Save & CloseĀ button and close the Workflow settingsĀ popup window.
Save all files:
and Publish your solution:
ToĀ executeĀ the newly created process you need to make upĀ aĀ control message and sendĀ it into theĀ default eagle_ml-2-0_default_cm_control_messageĀ stream or use the Run option of IWS.Ā The control message to launch the example workflow is given below.
<EagleML
xmlns="http://www.eagleinvsys.com/2011/EagleML-2-0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="RunTaskRequest"
eaglemlVersion="2-0"
xsi:schemaLocation="http://www.eagleinvsys.com/2011/EagleML-2-0 eagleml-main-2-0.xsd"
eaglemlType="RunTaskRequest">
<header>
<messageId>TST_TSR_ACK_RENAME</messageId>
<sentBy>http://www.eagleinvsys.com</sentBy>
<sendTo>http://www.eagleinvsys.com/eagle_ml-2-0_default_cm_control_message</sendTo>
<creationTimestamp/>
</header>
<taskIdentifier>
<correlationId>TST_TSR_ACK_RENAME</correlationId>
<businessTaskId>TST_TSR_ACK_RENAME</businessTaskId>
</taskIdentifier>
<workflowState>
<processCorrelationId correlationIdScheme="correlationIdScheme">TST_TSR_ACK_RENAME</processCorrelationId>
<originatingCorrelationId correlationIdScheme="correlationIdScheme">TST_TSR_ACK_RENAME</originatingCorrelationId>
</workflowState>
<taskTypeEnum>LOAD</taskTypeEnum>
<taskParameters>
<taskParameter>
<name>StreamName</name>
<dataType>S</dataType>
<value>eagle_ml-2-0_default_cm_execwkfl</value>
</taskParameter>
<taskParameter>
<name>ActionType</name>
<dataType>S</dataType>
<value>EXECUTE</value>
</taskParameter>
<taskParameter>
<name>WorkflowName</name>
<dataType>S</dataType>
<value>tsr_ack_rename_demo</value>
</taskParameter>
</taskParameters>
</EagleML>
The next step is sending your data file with the fileĀ mask matchingĀ the data file mask set in your IWS workflowĀ into the defaultĀ eagle_ml-2-0_default_cm_ndfaĀ stream to let your workflow process it. (For example: demo_data.txt matches demo_data* file mask given on page).
When the process finishes you will find your TSR and ACK files as expected:
Alternative Settings
How to set TSR / ACK custom names via editing theĀ "W_REPLYCM_MODE" parameter
W_REPLYCM_MODE is a special parameter in the include fileĀ /eagle_ml-2-0_custom_cm/w_config_custom.inc. It canĀ be set to one of theĀ following values:
N/OFFĀ ā eagle_ml-2-0_default_cm_task_reporter stream will use old logic to generate TSR and ACK names (if W_REPLYCM_MODE is not set, then OFF option will be applied).
Y/ONĀ ā eagle_ml-2-0_default_cm_task_reporter stream will use new logic to generate TSR and ACK names.
ONonlyForIWSĀ ā eagle_ml-2-0_default_cm_task_reporter stream will use theĀ new logic toĀ generateĀ TSR and ACK names only for IWS created workflows.
NOTE: If the TSR /ACK name is too long, it will be cut and the result TSR/ACK name will be: "corrID_cut_[task_name]timestamp.xml".
ONuseExactFileNameĀ ā excludes the correlationID prefix when you use ACKStrictPattern and TSRStrictPattern parameters to modify the file name.
How to set TSR / ACK custom foldersĀ via editing the "W_REPLY_CUSTOM_LOCATIONS_MODE" parameter
W_REPLY_CUSTOM_LOCATIONS_MODE is a special parameter in the include file: /eagle_ml-2-0_custom_cm/w_config_custom.inc. It can be set toĀ one of theĀ following values:
N/OFFĀ ā eagle_ml-2-0_default_cm_task_reporter stream will use default folders to save TSR and ACK messagesĀ (../cmw/reply and ../cmw/ack).
Y/ONĀ ā eagle_ml-2-0_default_cm_task_reporter stream will create aĀ special folder for each workflow (and use its name as a folder name) (Example: ../cmw/reply/testsolution).
ONonlyForIWSĀ ā eagle_ml-2-0_default_cm_task_reporter stream will use theĀ new logic to createĀ folders only for IWS created workflows.
Using this option can makeĀ your navigation inĀ reply and ack folders much more comfortable.
Examples of Use
UsingĀ W_REPLYCM_MODE
The goal of theĀ tests was to check eagle_ml-2-0_default_cm_task_reporter stream usabilityĀ with different values of theĀ W_REPLYCM_MODE andĀ W_REPLY_CUSTOM_LOCATIONS_MODEĀ parametersĀ assigned. TheĀ 3 options for the parameter were describedĀ in the previous paragraph and can be set in w_config_custom.inc.
Workflow used: tsr_ack_name_loc_setting_demo.
Its solution was created via IWS. The following messages namesĀ were set:
W_REPLYCM_MODE ā N/OFF
Testing W_REPLYCM_MODE "N" or OFF" in w_config_custom.inc:
Related content of the defaultĀ /../../cmw/reply folder:
Related content of the defaultĀ /../../cmw/ackĀ folder:
W_REPLYCM_MODE ā Y/ON
TestingĀ W_REPLYCM_MODE "Y" or "ON"Ā in w_config_custom.inc:
Related contentĀ of the defaultĀ /../../cmw/reply folder:
Related content of theĀ defaultĀ /../../cmw/ackĀ folder:
Messages are located in default folders and theirĀ names have been generated according to the required model:
CorrelationID_WorkflowName_ParentName_TaskName_yyyymmdd_hhmmss.xml
W_REPLYCM_MODE ā ONonlyForIWS
ThisĀ parameter should be used if customized settings are to be appliedĀ only to solutions created via IWS. There is no difference between ON and ONonlyForIWSĀ flagged for solutions created via IWS.
UsingĀ W_REPLY_CUSTOM_LOCATIONS_MODE
W_REPLY_CUSTOM_LOCATIONS_MODE is a variable located in w_config_custom.inc. It can be set to:
Y/ONĀ ā TSR messages will be saved inĀ ../cmw/reply/workflowname and ACK messages in ../cmw/ack/workflowname. Using this feature willĀ make yourĀ navigating in reply - ack folders easier.
N/OFFĀ ā TSR and ACK use default folders as their location.
ONonlyForIWS ā Only IWS created solutions will use custom folders as their location.
As a resultĀ of theĀ test with thisĀ parameter set to "Y" or "ON"Ā subfolders, namedĀ tsr_ack_name_loc_setting_demo (matches the workflow name)Ā inĀ ../cmw/reply/ andĀ ../cmw/ack/ have beenĀ created. The TSR and ACK files have been saved inside.
Reference tables
Ā | In the config file:Ā Ā | As a setting in IWS |
Ā | /eagle_ml-2-0_custom_cm/w_config_custom.inc | Ā |
Parameter name | W_REPLYCM_MODE | Ā |
Possible values Ā Ā | N/OFF - TSR and ASK messages are named by default. Y/ON - TSR and ASK messages are named as defined in the IWS solution. ONonlyForIWS - If the solution was created via IWS, TSR and ASK messages are named as defined in the solution. If not - default names are assigned. ONuseExactFileName - excludes correlationID prefix from the file name when you use ACKStrictPattern and TSRStrictPattern parameters to modify it. Ā | To reset the settings to default, click the Reset&Save button in the bottom of the settings window. |
To define specific names, fill the corresponding boxes. | ||
Ā | ||
Example of use | <COL TAG="W_REPLYCM_MODE" EXPRESSION="Y"/> | Ā |
Default value | N | all fields clear or default file names set |
Ā
Ā | In the config file:Ā Ā | As a setting in IWS |
Ā | /eagle_ml-2-0_custom_cm/w_config_custom.inc | Ā |
Parameter name | W_REPLY_CUSTOM_LOCATIONS_MODE | Ā |
Possible values | N/OFF - TSR and ACK files are saved in the default ../cmw/reply and ../cmw/ack folders | To resetĀ settings to default manually clear the boxes. |
Ā | Y/ON - TSR and ACK files are saved in the ../cmw/reply/%workflowname% and ../cmw/ack/%workflowname% subfolders of the corresponding default folders | Using this feature in IWS allows you to set any folder name to save the TSR/ACK messages, you may prefer to make it differing from the workflow name. You can also specify a non-default folder. |
Ā | ONonlyForIWS - If the solution was created via IWS, the TSR/ASK messages are saved in the ../cmw/reply/%workflowname% and ../cmw/ack/%workflowname% subfolders in the corresponding default folders. If not - default folders are used (no subfolders are created). | Ā |
Example of use | <COL TAG="W_REPLY_CUSTOM_LOCATIONS_MODE" EXPRESSION="Y"/> | Ā |
Default value | N | All fields clear or ../../../cmw/reply/ and |
Ā