Defining a Process > Defining Model Elements and Advanced Elements > Advanced Elements > Subroutines

Subroutines

A subroutine is a user-defined model element that can be called to perform a block of logic.They are normally used when the same set of statements is repeated in multiple places, such as at multiple activities. In this case, calling the same subroutine from each activity simplifies the logic and provides a single source where the logic can be modified. Subroutines can be called from arrival, activity, and move logic.

 

When a subroutine in encountered in logic, Process Simulator executes the statements contained in the subroutine directly inline with the logic from where it is called. All logic before a subroutine in executed prior to the subroutine's logic. All logic after a subroutine is executed once the subroutine's logic is complete.This is done by simply referencing the subroutine by name in some logic or expression.

 

Subroutines are defined in the Model Elements dialog which is accessed through Advanced Elements of the Process Simulator Ribbon.

 


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