Deep History State VS Shallow History State

1. Concept Definition 

A composite state may contain deep history and shallow history states.

(1)  Deep history state is a reference to the most recently visited simple state with the composite state.

(2) Shallow history state is a reference to the most recently visited state on the same hierarchy level within the composite state.

 When the control comes to a deep/shallow state, its action is executed, and the control is immediately passed to the "rea" state referred by it. Transitions may not exit a history state.

2. Deference Description

The difference between Deep and Shallow HIstory State is explained in the following section:

(1) Deep history state

 Deep History: A transition to the deep history state within a composite state invokes the state that was active, immediately before the most recent exit of the composite state. The last active can be nested at any depth. The image above illustrates the snapshot of active states after a series of events took place in the order indicated by numbers. The key point is, the deep history state remembers state_2 as well as substates (state_9 and state_10) were active till the most recent exit caused by evOpen, and restore them back as "active" when the invocation of evClose caused the execution come back to the composite state of state_0.

(1) Shallow history state

 

  Shallow History: A transition to the shallow history state in a composite state invokes the last state that was active, at the same depth as the history state itself, prior to the most recent exit of the composite state. Similarly, the image above illustrates the snapshot of active states after a series of events took place in the order indicated by numbers. The only difference from the previous scenario is shallow history is used this time. Unlike the Deep history state, the shallow history state doesn't go and remember the most recent states inside state_2. Therefore, it will only restore state_2 back as "active", triggering the invocation of the initial transition within state_4 and state_5 as ordinarily expected.

References:General information of Deep and Shallow History Connector in Rhapsody

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值