How can I make a picklist for states mdriven?

42 Views Asked by At

I want my state machine to be a picklist on one of my viewmodels, how can I do this?

I tried putting self.oclGetStates & self.OclGetStates.asString in the expression of a picklist but I don't know where to begin.

1

There are 1 best solutions below

0
Hans Karlsen On

Where to start: What is your end goal? Do you want the user to be able to pick and execute a valid trigger from the current state - to move it to another state? Then its the triggers you want to list. The triggers you get from oclGetTriggers are the triggers available from the current state your object has. What about oclGetStates - why is it not called oclGetState? A class can have multiple state machines - and thus be in multiple states at a time. enter image description here