Please review this subset of transitions for FGCP. Is the
pending->:finish valid here?

      start.to( :pending )          .on( :create )  # new instances do
not start automatically
      pending.to( :stopped )        .automatically  # after creation
they are in a stopped state
      pending.to( :finish )         .on(:destroy)   # after creation
they can be destroyed
      stopped.to(:finish)           .on( :destroy ) # only destroy
removes an instance, and it has to be stopped first

If 'pending' transitions to :stopped automatically, the user wouldn't
have a chance to action :destroy on it, so I suppose only the fourth
transition is possible. Should I remove pending->:finish?

What confused me is the following in ec2 driver:

          pending.to( :running )        .automatically
          pending.to( :stopping )       .on( :stop )
          pending.to( :stopped )        .automatically

How can a state automatically transition to two opposite states, and at
the same time allowing a user to action on it?

Thanks,
Dies

Reply via email to