
C# |
public Session CreateSession( string sessionName, string sessionType, SessionFlags sessionFlags, SessionCallback callback, Message commonData )

- sessionName (String)
- This is just a name for your session, so that your session can be easily identified. Maximum 1024 characters.
- sessionType (String)
- This argument tells Symphony which type of session to create. In the application profile, you can define different types of sessions with different attributes. Symphony also defines a system default session type with the name "". For this argument, specify the name of the session type you would like to use. An exception will be thrown if a session type is specified that is not defined.
- sessionFlags (SessionFlags)
This argument tells Symphony how you would like to receive task results for the session.
See the SessionFlags enum for explanation of the various flags and their usage.
- callback (SessionCallback)
- This argument allows you to provide a SessionCallback object, which allows you to register event handlers to process your session's task results asynchronously. This argument should only be provided when you have set the appropriate session flag argument to indicate that you will be receiving task results asynchronously.
- commonData (Message)
- This argument allows you to provide common data to the session. Common data is any data that is common to all of the tasks in your session. You can send common data rather than sending duplicate data to each task, and thus save on network overhead.
IMPORTANT NOTE: This CreateSession overload uses Symphony Serialization. That is, it sends your common data to the service as a Platform.Symphony.Soam.Message. If you send your common data using this overload, you must retrieve your common data on the service with the SessionContext.PopulateCommonData(Platform.Symphony.Soam.Message) method.
By using Symphony Serialization, this overload provides best performance and memory usage for sending common data.
For more details, please refer to the Application Development Guide.


Deprecated.
Note: For recoverable sessions, all submissions will wait for a special confirmation from the middleware that the submission has been stored in a manner that it can be recovered. This means that the submission times may be longer than those of non-recoverable sessions.
Create a recoverable session by setting the recoverable flag "true" in the Application Profile.