Refactoring and business state machines
When you refactor parts of your business state machine, dependencies on those parts are automatically and universally updated throughout the product as a whole.
About this task
Procedure
Results
- Refactoring an interface
- When you rename an interface or change its namespace via the refactor
menu, all business state machines that reference this interface will
be automatically updated.
When you rename an interface operation via the refactor menu, you may notice the following error in the Problems view if you've created Java™ or visual snippets that use its inputs or outputs: <variable_name> cannot be resolved.
It happens because the state machine editor creates arbitrary variables to hold the input/output of operations. These variables can be used in Java or visual snippets, or in an invoke. The form of these variables is: <operation_name>_<Input/Output>_<operation_parameter_name> For example, the variable for operation "myOperation" input parameter "input1" is: myOperation_Input_input1 Currently, there is no refactoring support to rename these variables used in Java or visual snippets.
To resolve this error, you must manually update all occurrences of the variable in the Java or visual snippets, according to the new operation name.
- Refactoring a business object
- When you rename a business object or change its namespace via
the refactor menu, all business state machines that reference this
business object will be automatically updated.
When you rename a business object attribute via the refactor menu, all visual snippets that reference this attribute will be automatically updated.
- Refactoring a visual snippet
- When you rename a visual snippet or change its namespace via the refactor menu, all business state machines that reference this visual snippet will be automatically updated.