Defining Logic > Statements > Activate

Activate

The ACTIVATE statement initiates a subroutine to execute independently. The calling logic then continues without waiting for the activated subroutine to finish. Therefore, activated subroutines can run in parallel with the logic that called them. Activated subroutines are not dependent upon entity or activity, and they run without regard to what happens inside the logic that called them.

 

Use ACTIVATE to process logic that has WAIT or WAIT UNTIL statements when you do not want to use an entity to process the WAIT or WAIT UNTIL statements. For example, an ACTIVATE in the initialization logic could call a subroutine that adjusts the arrival frequency for a type of entity depending on the time of day.

 

Subroutines called with ACTIVATE cannot use entity-specific or activity-specific system functions. If a return value is associated with the subroutine, then that value is ignored.

 

The following are examples of the ACTIVATE statement:

ACTIVATE Check_Levels(Param1,Param2)

ACTIVATE Monitor()

Components

Subroutine — the name of the subroutine to run. This name should appear exactly as if the subroutine were being called normally. Any return value for this function is ignored.


© 2015 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com