EventMonitor 2.5 StartEvent
Starts a new event
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
| psAuthContext | String | InOut | Deprecated proprietary authentication context only used by .ASMX web services based on internal username/password authentication. Claims based security standards drive all the WCF .SVC web services making this parameter redundant. |
| psEventType | String | In | The type of the event (e.g EXPORTFORPUBLICATION) |
| psDescription | String | In | Description of the event |
| plParentProgressId | Long | In | The identifier of the main event if the event belongs to a cluster of smaller events. |
| piMaximumProgress | In | The number with the expected workload for the event | |
| psOutEventId | String | Out | The name of the new event |
| plOutProgressId | Long | Out | The unique identifier of the new event. |
Note that:
- The following fields are set automatically:
- The initial
statusis BUSY - The
creation dateandmodification dateare initialized to the current date (and time) - The
useridis set to the current user - The initial value for the
current progressis 0
- The initial
The
psDescriptionis the short description of the event. Although the size is limited to 255 characters, you should try to include the parameters which define your event uniquely into the description.Remember: If the string is too large, the string will be truncated!
The
piMaximumProgressmust be a positive number and specifies the upper limit for the current progress. If everything went well at the end of your (background) process, the current progress should be the same as the maximum progress.The value of the maximum progress can be anything you want:- The total number of objects to process. In this case you can raise the current progress with each object that is (successfully) processed
- The timeout duration of an event. So, if you know that the process will have a duration of about 1 hour, you can initialize the maximum progress to 60 minutes and raise the current progress every minute.
- Another possibility is to use percentages. The maximum progress is 100 and after executing x percent of the background process, you can raise the current progress accordingly.
- If the
plParentProgressIdis specified, it must be an existing event. Only one level is supported, so the suppliedplParentProgressIdcannot be part of another main event.
Example
StartEvent(authContext, "EXPORTFORPUBLICATION", "Publish process for GUID-70ADD682-FF68-40D2-AA03-4BB66E00EA74=1=Manual=en", null, 100, outEventId, outProgressId)