Add basic ActivityTask model
This commit is contained in:
parent
49e44c8ee6
commit
fa4608be98
3 changed files with 45 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ from ..exceptions import (
|
|||
SWFTypeDeprecatedFault,
|
||||
SWFValidationException,
|
||||
)
|
||||
from .activity_task import ActivityTask
|
||||
from .activity_type import ActivityType
|
||||
from .decision_task import DecisionTask
|
||||
from .domain import Domain
|
||||
|
|
|
|||
20
moto/swf/models/activity_task.py
Normal file
20
moto/swf/models/activity_task.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from __future__ import unicode_literals
|
||||
import uuid
|
||||
|
||||
|
||||
class ActivityTask(object):
|
||||
def __init__(self, activity_id, activity_type, workflow_execution, input=None):
|
||||
self.activity_id = activity_id
|
||||
self.activity_type = activity_type
|
||||
self.input = input
|
||||
self.started_event_id = None
|
||||
self.state = "SCHEDULED"
|
||||
self.task_token = str(uuid.uuid4())
|
||||
self.workflow_execution = workflow_execution
|
||||
|
||||
def start(self, started_event_id):
|
||||
self.state = "STARTED"
|
||||
self.started_event_id = started_event_id
|
||||
|
||||
def complete(self):
|
||||
self.state = "COMPLETED"
|
||||
Loading…
Add table
Add a link
Reference in a new issue