Documentation Center

EventMonitor 2.5 StartEvent

Starts a new event


Parameters

NameTypeDirectionDescription
psAuthContextStringInOutDeprecated 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.
psEventTypeStringInThe type of the event (e.g EXPORTFORPUBLICATION)
psDescriptionStringInDescription of the event
plParentProgressIdLongInThe identifier of the main event if the event belongs to a cluster of smaller events.
piMaximumProgressInThe number with the expected workload for the event
psOutEventIdStringOutThe name of the new event
plOutProgressIdLongOutThe unique identifier of the new event.

Note that:
  • The following fields are set automatically:
    • The initial status is BUSY
    • The creation date and modification date are initialized to the current date (and time)
    • The userid is set to the current user
    • The initial value for the current progress is 0
  • The psDescription is 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 piMaximumProgress must 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 plParentProgressId is specified, it must be an existing event. Only one level is supported, so the supplied plParentProgressId cannot 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)