Working with RuleSession State

  • Updated

Prerequisites: A valid RuleSession
Namespaces: InRule.Runtime
Classes: Entity, RuleSession
See Also: Retrieving a Rule Application, Creating a RuleSession, Creating Entities

The following demonstrates how to serialize RuleSession state, also known as a Test Scenario, to the file system and then subsequently load the RuleSession state back into memory.  The persisted file on the file system can be loaded directly in irVerify by selecting File --> Load Test Scenario and selecting the file.

Saving RuleSession State to the File System

// Save RuleSession state
ruleSession.SaveState(@"c:\work\state.testscenario");

Loading RuleSession State from the File System

// Load RuleSession state
ruleSession.LoadState(@"c:\work\state.testscenario");

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.