ElievprcService
ElievprcService.asmx
This web service provides methods related to an event. Including:
- CreateEvent
- CancelEvent
- CreateEventDetail
- ExtendEvent
- ViewEvent
- NewFilter: Add filter criteria to an event.
- TemplateVar: Specity template variable for an event.
CreateEvent
This method creates a new event.
Usage:
CreateEventResult = A.CreateEvent(UserName, UserPassword, CreateEventInput)
Parameters UserName and UserPassword are not used at this moment.
CreateEventInput Structure
Please refer to the following screenshots for properties of this structure:

 
 


| Property | Length | Type | Upper | Detail | 
| SYEVTACT_FILE_NAME | 8 | String | Y | Required. This is the file that creates this event. | 
| SYEVTACT_REFERENCE | 30 | String | Y | Required. | 
| SYEVTACT_PROGRAM | 8 | String | Y | Required. | 
| SYEVTACT_TYPE | 8 | String | Y | Required. | 
| SYEVTACT_OWNER | 10 | String | Y | Default is “SUPERVISOR.” | 
| SYEVTACT_CREATE_DATE | 8 | Date | 
 | Default to system date. | 
| SYEVTACT_CREATE_TIME | 6 | Integer | 
 | Default to system time. | 
| SYEVTACT_SOURCE | 10 | String | Y | Default to “Default Event Source” in Elliott Global Setup. | 
| SYEVTACT_ACTION_TYPE | 1 | String | Y | Default to “Default Action Type” in Elliott Global Setup. Does not support the following values: E: E-mail T: Tickler C: COBOL Only U: User defined | 
| SYEVTACT_RECUR_TYPE | 1 | String | Y | Default to “Default Recurring Type” in Elliott Global Setup. Must be “O” (One-time request) or “R” (Recurring request). | 
| SYEVTACT_NOTIFY_SUBJ | 80 | String | 
 | Notification subject. | 
| SYEVTACT_TRG_USER | 1 | String | Y | “Y” or ”N” (default). If “Y”, the Elliott user name will be moved to SYEVTACT_NOTIFY_FROM instead of the email of the creator of the event. This only applies to Ticklers. | 
| SYEVTACT_NOTIFY_FROM | 60 | String | Y | If SYEVTACT_TRG_USER is “Y”, this field will be overwritten to blank. If SYEVTACT_TRG_USER is not “Y” and this field is blank, this field’s value will default to the email of SYEVTACT_OWNER. This only applies to Ticklers. | 
| SYEVTACT_EXP_DATE | 8 | Date | 
 | Expire date. | 
| SYEVTACT_EXP_TIME | 6 | Integer | 
 | Expire time. | 
| SYEVTACT_COBOL_PROGRAM | 8 | String | Y | Required when SYEVTACT_TYPE = “C” (COBOL Only). | 
| SYEVTACT_ADD_DAYS_EX | 4 | Integer | 
 | This is how many days the expiration date will be extended while calling “ExtendEvent” method. For example, the original expiration date is 9/1/2010, and the value of this field is 10 (days), then if you called ExtendEvent method, the new expiration date will be 9/11/2010. | 
| SYEVTACT_DAYS_2_ALRT | 4 | Integer | 
 | Send alert how many days before expiration. | 
| SYEVTACT_NXT_ALRT_DT | 8 | Date | 
 | Next alert date. If this field is not provided, it will be calculated by “create date” and “days to alert.” For example, if create date is 9/1/2010, and days to alert is 10, than the default next alert date will be 9/11/2010. | 
| SYEVTACT_TKL_NOTE_TP | 6 | String | Y | This field can only be set when SYEVTACT_TYPE = “T” (Tickler). | 
| SYEVTACT_TKL_FOLDER | 10 | String | Y | This field can only be set when SYEVTACT_TYPE = “T” (Tickler). | 
| TemplateID | 9 | Integer | 
 | This field can only be set when SYEVTACT_TYPE = “T” (Tickler). | 
| AlertTemplateID | 9 | Integer | 
 | This field can only be set when SYEVTACT_TYPE = “E” (E-mail). When this field is not zero, SYEVTACT_DAYS_2_ALRT must be greater than zero. | 
| ExpireTemplateID | 9 | Integer | 
 | Template ID for expire message. | 
| SYEVTACT_CBL_PARAMTR | 80 | String | Y | COBOL passing parameter. | 
| SYEVTACT_CONSOLIDATE | 1 | String | Y | Consolidate duplicates in the same batch. Should be “Y” or “N.” | 
CreateEventResult Structure
| Property | Type | Detail | 
| ReturnCode | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
| ReturnMsg | String | This is description of return code. For example, if return code is zero, you can expect “OK” in this field. | 
| SYEVTACT_ACTION_ID | Integer | The action id just created | 
Code Example
The following sample code will create one event for customer “000001.”
Dim Service As New webServicesevprc.ElievprcService
Dim Result As New webServicesevprc.CreateEventResult
Dim Input As New webServicesevprc.CreateEventInput
Input.SYEVTACT_FILE_NAME = “ARCUSFIL”
Input.SYEVTACT_REFERENCE = “000001”
Input.SYEVTACT_PROGRAM = “CP0101”
Input.SYEVTACT_TYPE = “ADDORDCU”
Input.SYEVTACT_ACTION_TYPE = “E”
Input.SYEVTACT_ADD_DAYS_EX = 30
Input.SYEVTACT_NOTIFY_SUBJ = _
“CO#@@CO-NO@@ $@@REF-ID09@@ Order Added for @@REF-ID05@@”
Result = Service.CreateEvent(“”, “”, Input)
If Result.ReturnCode = 0 Then
lblResult.Text = “Event Created. ID:” & Result.SYEVTACT_ACTION_ID
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ReturnCode.ToString
End If
This method will cancel (delete) one event.
Usage:
CancelEventResult = A.CancelEvent(UserName, UserPassword, SYEVTACT_ACTION_ID)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Upper | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | 
 | Required. | 
Output Parameter
| Parameter | Type | Detail | 
| CancelEventResult | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
Code Example
The following sample codes will cancel event id 34.
Dim Service As New webServicesevprc.ElievprcService
Dim Result As Integer
Dim SYEVTACT_ACTION_ID As Integer = 34
Result = Service.CancelEvent(“”, “”,SYEVTACT_ACTION_ID)
If Result = 0 Then
lblResult.Text = “Event Canceled.”
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ToString
End If
This method will create one event detail record.
Usage:
CreateEventDetailResult = A.CreateEventDetail(UserName, UserPassword, SYEVTACT_ACTION_ID, SYEVTACD_DETAIL_TP, SYEVTACD_SEQ_NO, SYEVTACD_DETAIL_LEN, SYEVTACD_DETAIL_TXT)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Upper | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | 
 | Required. | 
| SYEVTACD_DETAIL_TP | 2 | String | Y | Required. TO = E-mail To: CC = E-mail cc: BC = E-mail bcc: ( E-mail subject is in SYEVTACT-NOTIFY-SUBJECT ) TX = E-mail text AT = E-mail attachment TU = Tickler follow-up user TT = Tickler Text AS = Alert Subject AX = Alert Text ES = Expire Subject EX = Expire Text FL = Filter | 
| SYEVTACD_SEQ_NO | 4 | Integer | 
 | If this field is not set (or set to zero), this method will auto assign a sequence number. | 
| SYEVTACD_DETAIL_LEN | 2 | Integer | 
 | Default to 80. | 
| SYEVTACD_DETAIL_TXT | 80 | String | 
 | 
 | 
Output Parameter
| Parameter | Type | Detail | 
| CreateEventDetailResult | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
Code Example
The following sample code will create one event detail record of E-mail text (TX) for event action id 34.
Dim Service As New webServicesevprc.ElievprcService
Dim Result As Integer
Dim SYEVTACT_ACTION_ID As Integer = 34
Dim SYEVTACD_DETAIL_TP As String = “TX”
Dim SYEVTACD_DETAIL_LEN As Integer = 80
Dim SYEVTACD_DETAIL_TXT As String = “For details of this order, visit: http://abc.com”
Result = Service.CreateEventDetail(“”, “”, SYEVTACT_ACTION_ID, SYEVTACD_DETAIL_TP, 0, SYEVTACD_DETAIL_LEN, SYEVTACD_DETAIL_TXT)
If Result = 0 Then
lblResult.Text = “Event Detail Created.”
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ToString
End If
Extend an event so that the expiration date becomes system date plus the days in “SYEVTACT_ADD_DAYS_EX” field.
Usage:
ExtendEventResult = A.ExtendEvent(UserName, UserPassword, SYEVTACT_ACTION_ID)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | Required. The expiration date will be system date plus the days in “SYEVTACT_ADD_DAYS_EX” field. | 
Output Parameter
| Parameter | Type | Detail | 
| ExtendEventResult | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
Code Example
The following sample code will extend event action id 34.
Dim Service As New webServicesevprc.ElievprcService
Dim Result As Integer
Dim SYEVTACT_ACTION_ID As Integer = 34
Result = Service.ExtendEvent(“”, “”, SYEVTACT_ACTION_ID)
If Result = 0 Then
lblResult.Text = “Event Expiration Date Extended.”
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ToString
End If
This method returns one event’s file name, reference, email address, and expire date.
Usage:
ViewEventResult = A.ViewEvent(UserName, UserPassword, SYEVTACT_ACTION_ID)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | Required. | 
ViewEventResult Structurer
| Property | Type | Detail | 
| ReturnCode | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
| ReturnMsg | String | This is description of return code. For example, if return code is zero, you can expect “OK” in this field. | 
| SYEVTACT_FILE_NAME | String | 
 | 
| SYEVTACT_REFERENCE | String | 
 | 
| EmailAddress | String | 
 | 
| ExpDate | Date | 
 | 
Code Example
The following sample code will return information of event id 34.
Dim Service As New webServicesevprc.ElievprcService
Dim Result As New webServicesevprc.ViewEventResult
Dim SYEVTACT_ACTION_ID As Integer = 34
Result = Service.ViewEvent(“”, “”, SYEVTACT_ACTION_ID)
If Result.ReturnCode = 0 Then
lblResult.Text = “Event File Name:” + Result.SYEVTACT_FILE_NAME + _
“ Email:” + Result.EmailAddress
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ReturnCode.ToString
End If
This method will create a new filter for an event. If you create a filter with that has a duplicate ActionID + FilterNo, the old filter will be replaced by a new one.
Usage:
NewFilterResult = A.NewFilter(UserName, UserPassword, SYEVTACT_ACTION_ID, FilterNo, FilterOper, FilterRule)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Upper | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | 
 | Required. | 
| FilterNo | 2 | Integer | 
 | Required. This field is filter sequence number which can be from 1 to 10. | 
| FilterOper | 2 | String | Y | Required. Must be one of the following: “EQ”= equal to. “NE”= not equal to. “GT”= greater than. “GE”= greater than or equal to. “LT”= less than. “LE”= less than or equal to. “BT”= between. Note that if you use this operator, you need to assign two values separated by a space in FilterRule. | 
| FilterRule | 80 | String | Y | 
 | 
Output Parameter
| Parameter | Type | Detail | 
| NewFilterResult | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
Code Example
The following sample code will create a new filter for event id 34.
Dim Service As New webServicesevprc.ElievprcService
Dim Result As Integer
Dim SYEVTACT_ACTION_ID As Integer = 34
Dim FilterNo As Integer = 1
Dim FilterOper As String = “GT”
Dim FilterRule As String = “1”
Result = Service.NewFilter(“”, “”, SYEVTACT_ACTION_ID, FilterNo, FilterOper, FilterRule)
If Result = 0 Then
lblResult.Text = “Filter Added.”
Else
lblResult.Text = “Error”
lblErrorCode.Text = ReturnCode.ToString
End If
This method will replace a template variable with a value. This applies to both E-mail text and Alert text.
Usage:
TemplateVarResult = A.TemplateVar(UserName, UserPassword, SYEVTACT_ACTION_ID, RplName, RplValue)
Parameters UserName and UserPassword are not used at this moment.
Input Parameter
| Parameter | Length | Type | Upper | Detail | 
| SYEVTACT_ACTION_ID | 9 | Integer | 
 | Required. | 
| RplName | 14 | String | Y | This is the variable name (without leading ‘@#’ and trailing ‘#@’ ) to be replaced. | 
| RplValue | 60 | String | Y | This is the value that will replace the variable. | 
Output Parameter
| Parameter | Type | Detail | 
| TemplateVarResult | Integer | Contains return code. Zero means OK; for other return codes, please see “ElievprcService Return Code” section. | 
Code Example
The following sample code will replace variable “cust01” to “000001.”
Dim Service As New webServicesevprc.ElievprcService
Dim Result As Integer
Dim SYEVTACT_ACTION_ID As Integer = 34
Dim RplName As String = “cust01”
Dim RplValue As String = “000001”
Result = Service.TemplateVar ("", "", SYEVTACT_ACTION_ID, RplName, RplValue)
If Result = 0 Then
lblResult.Text = “Success.”
Else
lblResult.Text = “Error”
lblErrorCode.Text = Result.ToString
End If
ElievprcService Return Code
0 = OK (Create/Create Detail/Cancel/Extend)
1 = File Error (Create/Create Detail/Cancel/Extend)
2 = No Action ID (Create Detail/Cancel/Extend/View)
3 = Data Missing ((File, Reference ID, Program, Type)
4 = Invalid Action Type (Create)
5 = Invalid Recurring Type (Create)
6 = Invalid Trigger User (Create)
7 = Add Days To Extended/Expiration Date Missing (Create)
8 = Days To Alert Missing (Create)
9 = Expiration Date Mismatch (Create)
10 = Invalid COBOL Program (Create)
11 = Next Alert Date Mismatch (Create)
12 = No Need To Provide Tickler Information
13 = Detail Type Missing (Create Detail)
14 = No Event Record Exists or is Locked (Cancel/Extend/View)
15 = Only E-mail have template ID
16 = Only E-mail & Day To Alert > 0 have Alert template ID
17 = Invalid Filter No Range (1-10)
18 = Invalid Filter Operator (EQ, NE, GT, GE, LT, LE,BT)
19 = Only E-mail & Notify & Purge Have Expire template ID
CLS
