class StateMachine(db.Model): __tablename__ = 'state_machine' name = db.Column(db.String(), primary_key=True) definition = db.Column(db.Text()) roleArn = db.Column(db.String()) creationDate = db.Column(db.BigInteger())
class ActivityTask(db.Model): __tablename__ = 'activity_task' token = db.Column(db.String(), primary_key=True, autoincrement=False) activity_id = db.Column(db.Integer()) state_machine_step_id = db.Column(db.Integer(), unique=True) worker_name = db.Column(db.String())
class StateMachineExecution(db.Model): __tablename__ = 'state_machine_execution' id = db.Column(db.Integer(), primary_key=True) state_machine_name = db.Column(db.String(), index=True) # Name can be user input, defaults to a uuid name = db.Column(db.String(), unique=True) raw_input = db.Column(db.Text()) # current/final output data = db.Column(db.Text()) startDate = db.Column(db.BigInteger()) stopDate = db.Column(db.BigInteger()) status = db.Column(db.String(), index=True) waiting_for_task = db.Column(db.Boolean(), default=False, nullable=False)
class StateMachineStep(db.Model): __tablename__ = 'state_machine_step' id = db.Column(db.Integer(), primary_key=True) state_machine_execution_id = db.Column(db.String(), index=True) type = db.Column(db.String()) name = db.Column(db.String()) input = db.Column(db.String()) output = db.Column(db.String()) status = db.Column(db.String()) end = db.Column(db.Boolean()) startDate = db.Column(db.BigInteger()) stopDate = db.Column(db.BigInteger())
class Activity(db.Model): __tablename__ = 'activity' name = db.Column(db.String(), primary_key=True) uuid = db.Column(db.String(), unique=True) creationDate = db.Column(db.BigInteger())